Last active
October 31, 2018 22:53
-
-
Save okunishinishi/56e0dde10f06d76fd9dbf923177f88f8 to your computer and use it in GitHub Desktop.
Webページの認証を1行の記述だけでやってみる ref: https://qiita.com/okunishinishi@github/items/7353cd3d7f2cdae7ff4f
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(prompt('合言葉は?') !== 'たこやき') && document.write('だめだこりゃ') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<body> | |
<h3>ようこそ!</h3> | |
<script>;(prompt('合言葉は?') !== 'たこやき') && document.write('だめだこりゃ')</script> | |
</body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(localStorage.getItem('authorized') == 'YES' || (prompt('合言葉は?') === 'たこやき')) ? localStorage.setItem('authorized', 'YES') : document.write('だめだこりゃ') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment