Skip to content

Instantly share code, notes, and snippets.

@kobelb
Created May 1, 2019 23:28
Show Gist options
  • Save kobelb/90bf7f8f7a2fb0e7cce5e21fb16e2354 to your computer and use it in GitHub Desktop.
Save kobelb/90bf7f8f7a2fb0e7cce5e21fb16e2354 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>I AM REAL</title>
</head>
<body>
<script>
function ready(fn) {
if (document.attachEvent ? document.readyState === "complete" : document.readyState !== "loading"){
fn();
} else {
document.addEventListener('DOMContentLoaded', fn);
}
}
ready(function () {
function log(msg) {
var elem = document.createElement('div');
elem.innerText = msg;
document.body.appendChild(elem);
}
var date = new Date();
log('gonna do that thing ' + date.toString());
if (window.opener) {
log('daggum tab nabbing, cow stealing, bastards');
window.opener.location = 'https://www.foxnews.com/';
} else {
log('no tab nabbing for you');
}
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment