Created
June 25, 2013 17:04
-
-
Save nickjacob/5860265 to your computer and use it in GitHub Desktop.
really basic framekiller
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
;(function (window) { | |
if (window.top !== window.self) { | |
killFrame(); | |
} | |
var _frame_ = "<html><head><title>Not Allowed</title>\ | |
</head><body><h1>We don't allow This</h1></body></html>"; | |
function killFrame() { | |
document.open(); | |
document.write(_frame_); | |
document.close(); | |
// seriously fuck up any other scripts | |
window.confirm = window.alert = function(){}; | |
undefined = 1; window.onload = null; | |
window.onbeforeunload = null; | |
// lets hope these work | |
window.addEventListener = function(){}; | |
window.attachEventHandler = function(){}; | |
} | |
}(window)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment