FFExt: Add JS file to loaded document

/ Published in: JavaScript
Save to your folder(s)

Copy this code and paste it in your HTML
  1. window.addEventListener("DOMContentLoaded", function(){
  2. gBrowser.addEventListener("DOMContentLoaded", function(){
  3. var script = content.document.createElement("script")
  4. script.src = "chrome://<ext>/content/script.js"
  5. content.document.body.appendChild(script)
  6. }, false)
  7. }, false);

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.