Basic method to Add html content to the page with Greasemonkey?
Is there a Greasemonkey method to append basic HTML content to the end of a page right after the <body> tag, or right before it ends? I found before/after methods but I need to know names of elements which may change page to page.. The quick and dirty way: Please only use innerHTML for brand- new content. var newHTML = document.createElement ('div'); newHTML.innerHTML = ' \ <div id="gmSomeID"> \ <p>Some paragraph</p> \ etc. \ </div> \ '; document.body.appendChild (newHTML); A complete script showing the somewhat better jQuery way (and with new, ECMAScript 6, multiline string): // ==UserScript=