Created
April 22, 2011 16:38
-
-
Save cowboy/937006 to your computer and use it in GitHub Desktop.
JavaScript: Duck Punching vs Dick Punching
This file contains 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
// Duck Punching. | |
window._alert = window.alert; | |
window.alert = function(n) { | |
return typeof n === 'number' | |
? window._alert('QU' + Array(n + 1).join('A') + 'CK') | |
: window._alert.apply(window, arguments); | |
}; | |
// Dick Punching. | |
window._alert = window.alert; | |
window.alert = function(n) { | |
return typeof n === 'number' | |
? window._alert('8' + Array(n + 1).join('=') + 'D') | |
: window._alert.apply(window, arguments); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
// Duck pinching
location.href="http://furf.it/6O";
// Dick pinching
return; // will not go there