This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Cu.import('resource://gre/modules/ctypes.jsm'); | |
| var is64bit = ctypes.voidptr_t.size == 4 ? false : true; | |
| var ifdef_UNICODE = true; | |
| var TYPES = { | |
| ABI: is64bit ? ctypes.default_abi : ctypes.winapi_abi, | |
| CALLBACK_ABI: is64bit ? ctypes.default_abi : ctypes.stdcall_abi, | |
| BOOL: ctypes.bool, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const {interfaces: Ci, utils: Cu} = Components; | |
| Cu.import('resource://gre/modules/Services.jsm'); | |
| const locationToMatch = 'mozillazine'; | |
| function addDiv(theDoc) { | |
| //Cu.reportError('addDiv'); | |
| if (!theDoc) { | |
| Cu.reportError('no theDoc!') | |
| //document not provided, it is undefined likely | |
| return; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const {interfaces: Ci,utils: Cu} = Components; | |
| Cu.import('resource://gre/modules/Services.jsm'); | |
| /*start - windowlistener*/ | |
| var windowListener = { | |
| //DO NOT EDIT HERE | |
| onOpenWindow: function (aXULWindow) { | |
| // Wait for the window to finish loading | |
| let aDOMWindow = aXULWindow.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowInternal || Ci.nsIDOMWindow); | |
| aDOMWindow.addEventListener("load", function () { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const {interfaces: Ci,utils: Cu} = Components; | |
| Cu.import('resource://gre/modules/Services.jsm'); | |
| /*start - windowlistener*/ | |
| var windowListener = { | |
| //DO NOT EDIT HERE | |
| onOpenWindow: function (aXULWindow) { | |
| // Wait for the window to finish loading | |
| let aDOMWindow = aXULWindow.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowInternal || Ci.nsIDOMWindow); | |
| aDOMWindow.addEventListener("load", function () { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const {Cc, Ci, Cu, components} = require('chrome'); | |
| Cu.import('resource://gre/modules/Services.jsm'); | |
| var utils = require("sdk/window/utils"); | |
| var tabs = require("sdk/tabs"); | |
| var self = require("sdk/self"); | |
| var data = self.data; | |
| function createPanel() { | |
| var winsize = tabs.activeTab.attach({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const {classes: Cc, interfaces: Ci, utils: Cu} = Components; | |
| const self = { | |
| id: 'Bootstrap-Skeleton-Plus', | |
| suffix: '@jetpack', | |
| path: 'chrome://bootstrap-skeleton-plus/content/', | |
| aData: 0, | |
| }; | |
| const myServices = {}; | |
| Cu.import('resource://gre/modules/Services.jsm'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var spwin = Services.wm.getMostRecentWindow(null); //this gets the scratchpad window | |
| var str = 'rawr'; | |
| var str = str[0].toUpperCase() + str.substr(1); | |
| spwin.alert(str) // will upper case str this is just to demo the alert comes in the scratchpad window |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //https://github.com/jublonet/codebird-js/blob/master/codebird.js#L745 | |
| function _nonce(length) { | |
| if (typeof length === "undefined") { | |
| length = 8; | |
| } | |
| if (length < 1) { | |
| console.warn("Invalid nonce length."); | |
| } | |
| var nonce = ""; | |
| for (var i = 0; i < length; i++) { |
OlderNewer