This file contains 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 JSON = Components.classes['@mozilla.org/dom/json;1'].createInstance(Components.interfaces.nsIJSON); | |
if (typeof(JSON) == "undefined") { | |
Components.utils.import("resource://gre/modules/JSON.jsm"); | |
} |
This file contains 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
use constant SIG_BUFFER => 32768; # SIG_BUFFER > max(length($signature)) | |
sub sig($) { | |
open(RDF, '>', $tmp) or die "Failed to create a temporary file: $!\n"; | |
binmode(RDF, ':raw:utf8'); | |
ser(*RDF, $_[0], '', ' ', 1); | |
close(RDF); | |
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | |
open(SIG, '-|', qq[openssl dgst -sha512 -sign "$pem"]. | |
($pwd? qq[ -passin "$pwd"]: '').qq[ -binary "$tmp"]) | |
or die "Failed to run OpenSSL to generate the signature: $!\n"; |
This file contains 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
%grep 'aksr.*util.errors' 'irclogs/OFTC/#pentadactyl.log' | |
16:34 < John-Galt> aksr: :yank echo String(util.errors) | |
07:42 <John-Galt> aksr: :yank String(util.errors) |
This file contains 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
let objects = Class({ | |
get eventTarget() this, | |
fooEvents: { | |
popupshowing: function onPopupShowing(event) { | |
mow.contextEvents.popupshowing.call(mow, event); | |
} | |
}, | |
events: { | |
popupshowing: function onPopupShowing(event) { |
This file contains 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
framework.browser = {}; | |
framework.browser.MSIE = "MSIE"; | |
framework.browser.FIREFOX = "Firefox"; | |
framework.browser.FLOCK = "Flock"; | |
framework.browser.GOOGLE = "Google Inc."; | |
framework.browser.CHROME = "Chrome"; | |
framework.browser.WINDOWS95 = "Windows 95"; | |
framework.browser.WINDOWS98 = "Windows 98"; | |
framework.browser.WINDOWS = "Windows"; | |
framework.browser.MAC = "Mac"; |
This file contains 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
LibreJS | |
Copyright (C) 2011 Loic J. Duros | |
Released under the GPL v3 | |
Current Version: 2.3.0 -- 11/26/2011 | |
Overview |
This file contains 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
Error: document.getElementById("pushfox-toolbar-button") is null | |
Source file: chrome://pushfox/content/overlay.js | |
Line: 69 |
This file contains 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
/** | |
* Makes the passed function yieldable. Each time the function calls | |
* yield, execution is suspended for the yielded number of | |
* milliseconds. | |
* | |
* Example: | |
* let func = yieldable(function () { | |
* util.dump(Date.now()); // 0 | |
* yield 1500; | |
* util.dump(Date.now()); // 1500 |
This file contains 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
function addUserStyles() { | |
var twdtprefsinstance = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces.nsIPrefBranch); | |
var twdtsbiconhide = twdtprefsinstance.getBoolPref("extensions.themefontsizechanger.sbiconhide"); | |
if (twdtsbiconhide) { | |
var sss = Components.classes['@mozilla.org/content/style-sheet-service;1'].getService(Components.interfaces.nsIStyleSheetService); | |
var ios = Components.classes['@mozilla.org/network/io-service;1'].getService(Components.interfaces.nsIIOService); | |
var css = "@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);#themefontsizechanger-panel {display: none !important;}"; | |
var uri = ios.newURI("data:text/css," + encodeURIComponent(css), null, null); | |
if (!sss.sheetRegistered(uri, sss.USER_SHEET)) { | |
sss.loadAndRegisterSheet(uri, sss.USER_SHEET); |
This file contains 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
function pageLinks(context, win) { | |
context.title = ["Link Text", "Destination"]; | |
context.keys = { text: function (item) item.textContent.trim(), description: "href" }; | |
context.anchored = false; | |
context.pushProcessor(0, function (item, text, next) <a href={item.item.href}>{next(item, text)}</a>); | |
context.filters[0] = CompletionContext.Filter.textDescription; | |
context.filters.push(function (item) item.text); |