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 f16a05a05363d45debb4616f44207c6f195b9969
parent 38c2a0e8f30f8440fb6ec37465a33ad541a9cc30
Author: Ryan Wolf <rwolf@borderstylo.com>
Date:   Fri, 25 Jun 2010 15:53:57 -0700

applies stack hack to pages

Diffstat:
Mchrome.manifest | 1-
Achrome/content/binding.xml | 18++++++++++++++++++
Mchrome/content/browser.xul | 10----------
Mchrome/content/content.js | 19+++++++++++++++----
Dchrome/modules/module.js | 7-------
Ddefaults/preferences/.gitignore | 0
Minstall.rdf | 2+-
Mlocale/en-US/stringbundle.dtd | 7+------
8 files changed, 35 insertions(+), 29 deletions(-)

diff --git a/chrome.manifest b/chrome.manifest @@ -2,5 +2,4 @@ content mft3k chrome/content/ content mft3k chrome/content/ contentaccessible=yes locale mft3k en-US locale/en-US/ skin mft3k classic/1.0 chrome/skin/ -resource mft3k chrome/modules/ overlay chrome://browser/content/browser.xul chrome://mft3k/content/browser.xul diff --git a/chrome/content/binding.xml b/chrome/content/binding.xml @@ -0,0 +1,18 @@ +<?xml version="1.0"?> +<xbl:bindings xmlns:xbl="http://www.mozilla.org/xbl" + xmlns:html="http://www.w3.org/1999/xhtml"> + <xbl:binding id="seats" inheritstyle="false"> + <xbl:resources> + <xbl:stylesheet src="chrome://mft3k/skin/stylesheets/stylesheet.css" /> + </xbl:resources> + <xbl:content> + <xbl:children includes="head" /> + <html:body id="stack"> + <html:div id="page"> + <xbl:children /> + </html:div> + <html:div id="seats" /> + </html:body> + </xbl:content> + </xbl:binding> +</xbl:bindings> diff --git a/chrome/content/browser.xul b/chrome/content/browser.xul @@ -1,15 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<?xml-stylesheet type="text/css" - href="chrome://mft3k/skin/stylesheets/stylesheet.css" ?> -<!DOCTYPE overlay SYSTEM "chrome://mft3k/locale/stringbundle.dtd"> <overlay xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script type="application/x-javascript" src="chrome://mft3k/content/content.js" /> - <menubar id="main-menubar"> - <menu label="&mft3k.menu.title;" insertbefore="tools-menu"> - <menupopup> - <menuitem label="&mft3k.menu.item;" oncommand="alert('Hello World!');"/> - </menupopup> - </menu> - </menubar> </overlay> diff --git a/chrome/content/content.js b/chrome/content/content.js @@ -1,4 +1,15 @@ -new function () { - var scope = {}; - Components.utils.import("resource://mft3k/module.js", scope); -}; +window.addEventListener( + "load", + function () { + gBrowser.addEventListener( + "DOMContentLoaded", + function (event) { + var doc = event.originalTarget; + var bindingUrl = 'url("chrome://mft3k/content/binding.xml#seats")'; + doc.body.parentNode.style.MozBinding = bindingUrl; + }, + false + ); + }, + false +); diff --git a/chrome/modules/module.js b/chrome/modules/module.js @@ -1,7 +0,0 @@ -var EXPORTED_SYMBOLS = ["state"]; - -var state = { - foo: 0, - bar: 1, - baz: 2 -}; diff --git a/defaults/preferences/.gitignore b/defaults/preferences/.gitignore diff --git a/install.rdf b/install.rdf @@ -2,7 +2,7 @@ <RDF xmlns:em="http://www.mozilla.org/2004/em-rdf#" xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <Description about="urn:mozilla:install-manifest"> - <em:id>rwolf+mft3k@borderstylo.com</em:id> + <em:id>mft3k@borderstylo.com</em:id> <em:name>mft3k</em:name> <em:version>1.0.0</em:version> <em:type>2</em:type> diff --git a/locale/en-US/stringbundle.dtd b/locale/en-US/stringbundle.dtd @@ -1,7 +1,2 @@ -<!-- See: https://developer.mozilla.org/en/Localizing_an_extension --> -<!ENTITY mft3k.menu.title "mft3k"> -<!ENTITY mft3k.menu.item "Say Hi"> - -<!ENTITY mft3k.about "mft3k"> +<!ENTITY mft3k.about "Mystery Firefox Theater 3000"> <!ENTITY mft3k.about.close "close"> -