Created
August 16, 2012 17:28
-
-
Save f0t0n/3371881 to your computer and use it in GitHub Desktop.
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<title>Open in new window</title> | |
<script type="text/javascript"> | |
if(!window.opener) { | |
window.open(window.location.href, '_blank'); | |
} | |
</script> | |
</head> | |
<body> | |
<h1>I'm <span id="not"></span>going to open myself in new window!</h1> | |
<script type="text/javascript"> | |
if(window.opener) { | |
document.getElementById('not').innerHTML = 'not '; | |
} | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment