Posted By

eternicode on 02/18/10


javascript Firefox extension mdc addon

Versions (?)

FFExt: Safely include jQuery in a browser overlay

 / Published in: JavaScript

If you just use a <script> element in the overlay, the browser toolbars are reset to their default configuration (at least with jQ 1.3.2).

  1. var _jq = "chrome://clpics/content/jquery-1.3.2.min.js"
  3. // Load jQuery without messing with the toolbars.
  4. // Dunno why this is necessary, but it is and it works, so meh
  5. Components.classes[";1"]
  6. .getService(Components.interfaces.mozIJSSubScriptLoader)
  7. .loadSubScript(_jq);

Report this snippet  

You need to login to post a comment.