Skip to content

Instantly share code, notes, and snippets.

@44uk
Created May 1, 2018 02:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 44uk/233ca283f7f0bd264d5b3b3be826ae20 to your computer and use it in GitHub Desktop.
Save 44uk/233ca283f7f0bd264d5b3b3be826ae20 to your computer and use it in GitHub Desktop.
verify.js
<html>
<head>
<script src="verify.js"></script>
</head>
<body>
<img src="http://dummyimage.com/300x800" />
</body>
</html>
!function() {
if(/verified=1/.test(document.cookie)) { return false }
var overlay = document.createElement('div')
overlay.style = 'position:absolute;top:0;left:0;background:#222A;width:100%;min-height:100%;z-index:9999'
window.addEventListener('DOMContentLoaded', function () {
document.body.style.overflow = 'hidden'
document.body.style.filter = 'blur(4px)'
document.body.appendChild(overlay)
setTimeout(function () {
if(confirm('Are you sure?')) {
document.cookie = 'verified=1'
document.body.style.overflow = null
document.body.style.filter = null
document.body.removeChild(overlay)
} else {
window.location = 'https://yahoo.co.jp'
}
}, 500)
})
}();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment