https://opensource.org/licenses/MIT
-->
-<!-- Run userChrome.js/userChrome.xul and .uc.js/.uc.xul/.css files -->
+<!-- Run userChrome.js/userChrome.xul and .uc.js/.uc.xul/as.css files -->
<bindings xmlns="http://www.mozilla.org/xbl">
- <binding id="js" extends="chrome://global/content/bindings/toolbarbutton.xml#menu">
- <implementation>
- <constructor><![CDATA[
- if(window.userChromeJsMod) return;
- window.userChromeJsMod = true;
-
- var chromeFiles = FileUtils.getDir("UChrm", []).directoryEntries;
- var xulFiles = [];
- var sss = Cc['@mozilla.org/content/style-sheet-service;1'].getService(Ci.nsIStyleSheetService);
-
- while(chromeFiles.hasMoreElements()) {
- var file = chromeFiles.getNext().QueryInterface(Ci.nsIFile);
- var fileURI = Services.io.newFileURI(file);
-
- if(file.isFile()) {
- if(/(^userChrome|\.uc)\.js$/i.test(file.leafName)) {
- Services.scriptloader.loadSubScriptWithOptions(fileURI.spec, {target: window, ignoreCache: true});
- }
- else if(/(^userChrome|\.uc)\.xul$/i.test(file.leafName)) {
- xulFiles.push(fileURI.spec);
- }
- else if(/\.as\.css$/i.test(file.leafName)) {
- if(!sss.sheetRegistered(fileURI, sss.AGENT_SHEET))
- sss.loadAndRegisterSheet(fileURI, sss.AGENT_SHEET);
- }
- else if(/^(?!(userChrome|userContent)\.css$).+\.css$/i.test(file.leafName)) {
- if(!sss.sheetRegistered(fileURI, sss.USER_SHEET))
- sss.loadAndRegisterSheet(fileURI, sss.USER_SHEET);
- }
- }
- }
-
- setTimeout(function loadXUL() {
- if(xulFiles.length > 0) {
- document.loadOverlay(xulFiles.shift(), null);
- setTimeout(loadXUL, 5);
- }
- }, 0);
- ]]></constructor>
- </implementation>
- </binding>
+ <binding id="js" extends="chrome://global/content/bindings/toolbarbutton.xml#menu">
+ <implementation>
+ <constructor><![CDATA[
+ if(window.userChromeJsMod) return;
+ window.userChromeJsMod = true;
+
+ var chromeFiles = FileUtils.getDir("UChrm", []).directoryEntries;
+ var xulFiles = [];
+ var sss = Cc['@mozilla.org/content/style-sheet-service;1'].getService(Ci.nsIStyleSheetService);
+
+ while(chromeFiles.hasMoreElements()) {
+ var file = chromeFiles.getNext().QueryInterface(Ci.nsIFile);
+ var fileURI = Services.io.newFileURI(file);
+
+ if(file.isFile()) {
+ if(/(^userChrome|\.uc)\.js$/i.test(file.leafName)) {
+ Services.scriptloader.loadSubScriptWithOptions(fileURI.spec, {target: window, ignoreCache: true});
+ }
+ else if(/(^userChrome|\.uc)\.xul$/i.test(file.leafName)) {
+ xulFiles.push(fileURI.spec);
+ }
+ else if(/\.as\.css$/i.test(file.leafName)) {
+ if(!sss.sheetRegistered(fileURI, sss.AGENT_SHEET))
+ sss.loadAndRegisterSheet(fileURI, sss.AGENT_SHEET);
+ }
+ else if(/^(?!(userChrome|userContent)\.css$).+\.css$/i.test(file.leafName)) {
+ if(!sss.sheetRegistered(fileURI, sss.USER_SHEET))
+ sss.loadAndRegisterSheet(fileURI, sss.USER_SHEET);
+ }
+ }
+ }
+
+ setTimeout(function loadXUL() {
+ if(xulFiles.length > 0) {
+ document.loadOverlay(xulFiles.shift(), null);
+ setTimeout(loadXUL, 5);
+ }
+ }, 0);
+ ]]></constructor>
+ </implementation>
+ </binding>
</bindings>