(function(){ var body = document.body; body.append( "<p>some text</p>" ); //this paragraph will be appended to every webpage in which add addparagraph.js is loaded })();