Created
September 18, 2009 10:30
-
-
Save fearphage/188999 to your computer and use it in GitHub Desktop.
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
// one-line quick test | |
javascript:(function(iframe) { iframe.src = 'data:text/html;base64,PCFkb2N0eXBlIGh0bWw+DQo8aHRtbD4NCjxoZWFkPg0KICA8c2NyaXB0IHR5cGU9InRleHQvamF2YXNjcmlwdCI+DQogICAgYWRkRXZlbnRMaXN0ZW5lcignbWVzc2FnZScNCiAgICAgICxmdW5jdGlvbihlKSB7DQogICAgICAgIGFsZXJ0KGUub3JpZ2luICsgJyBzYWlkOiAnICsgZS5kYXRhKTsNCiAgICAgIH0NCiAgICAgICxmYWxzZQ0KICAgICk7DQogIDwvc2NyaXB0Pg0KPC9oZWFkPg0KPGJvZHk+PC9ib2R5Pg0KPC9odG1sPg=='; iframe.contentWindow.postMessage('testing stuff', '*'); })(document.documentElement.appendChild(document.createElement('iframe'))) | |
// multi-line | |
javascript:(function(iframe) { | |
iframe.src = 'data:text/html;base64,PCFkb2N0eXBlIGh0bWw+DQo8aHRtbD4NCjxoZWFkPg0KICA8c2NyaXB0IHR5cGU9InRleHQvamF2YXNjcmlwdCI+DQogICAgYWRkRXZlbnRMaXN0ZW5lcignbWVzc2FnZScNCiAgICAgICxmdW5jdGlvbihlKSB7DQogICAgICAgIGFsZXJ0KGUub3JpZ2luICsgJyBzYWlkOiAnICsgZS5kYXRhKTsNCiAgICAgIH0NCiAgICAgICxmYWxzZQ0KICAgICk7DQogIDwvc2NyaXB0Pg0KPC9oZWFkPg0KPGJvZHk+PC9ib2R5Pg0KPC9odG1sPg=='; | |
iframe.contentWindow.postMessage('testing stuff', '*'); | |
})(document.documentElement.appendChild(document.createElement('iframe'))) |
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
// source of the base64 encoded html | |
<!doctype html> | |
<html> | |
<head> | |
<script type="text/javascript"> | |
addEventListener('message' | |
,function(e) { | |
alert(e.origin + ' said: ' + e.data); | |
} | |
,false | |
); | |
</script> | |
</head> | |
<body></body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment