mft3k

Firefox Extension that adds a MST3K row of seats to the bottom of the browser
git clone Https://wehaveforgeathome.hates.computer/mft3k.git
Log | Files | Refs | LICENSE

commit 7762e593b19b4f45ff8fa63fae94e437755b0be9
parent a4d7991c9722d2d676416c89d8885720f31ad375
Author: Nicolas LaCasse <nlacasse@borderstylo.com>
Date:   Wed, 13 Oct 2010 14:02:25 -0700

use stylesheet service.  now ff4 compatible.

Diffstat:
Mchrome/content/content.js | 11+++++++++--
Achrome/skin/stylesheets/binding.css | 3+++
2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/chrome/content/content.js b/chrome/content/content.js @@ -9,8 +9,15 @@ window.addEventListener( // don't add binding to frames if (doc.defaultView.frameElement) return; - var bindingUrl = 'url("chrome://mft3k/content/binding.xml#seats")'; - doc.body.parentNode.style.MozBinding = bindingUrl; + var styleSheetService = Cc["@mozilla.org/content/style-sheet-service;1"]. + getService(Ci.nsIStyleSheetService); + var IOService = Cc["@mozilla.org/network/io-service;1"]. + getService(Ci.nsIIOService); + var flashHackURI = IOService. + newURI("chrome://mft3k/skin/stylesheets/binding.css", null, null); + var type = styleSheetService.USER_SHEET; + styleSheetService. + loadAndRegisterSheet(flashHackURI, styleSheetService.USER_SHEET); }, false ); diff --git a/chrome/skin/stylesheets/binding.css b/chrome/skin/stylesheets/binding.css @@ -0,0 +1,3 @@ +html { + -moz-binding: url("chrome://mft3k/content/binding.xml#seats") !important; +}