Skip to content

Instantly share code, notes, and snippets.

@pirate
Created January 21, 2014 04:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pirate/d2660ce9491584ca3de4 to your computer and use it in GitHub Desktop.
Save pirate/d2660ce9491584ca3de4 to your computer and use it in GitHub Desktop.
function exec(fn) {
var script = document.createElement('script');
script.setAttribute("type", "application/javascript");
script.textContent = '(' + fn + ')();';
document.body.appendChild(script); // run the script
document.body.removeChild(script); // clean up
}
// with the below added to the manifest file
exec(function() {
$("body").load('hacked.html');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment