Created
August 1, 2013 15:51
-
-
Save ajwaxman/6132646 to your computer and use it in GitHub Desktop.
chrome extension js
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
console.log("Hello World"); | |
var addHtml = { | |
addForm: function() { | |
var form = document.createElement('div'); | |
form.innerHTML = '<form id="dynForm" action="http://example.com/" method="get"><input type="hidden" name="q" value="a"></form>'; | |
document.body.appendChild(form); | |
document.getElementById("dynForm").submit(); | |
} | |
}; | |
// Run our kitten generation script as soon as the document's DOM is ready. | |
document.addEventListener('DOMContentLoaded', function () { | |
addHtml.addForm(); | |
}); | |
document.body.innerHTML += '<form id="dynForm" action="http://example.com/" method="post"><input type="hidden" name="q" value="a"></form>'; | |
document.getElementById("dynForm").submit(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment