Skip to content

Instantly share code, notes, and snippets.

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");
}
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";
%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)
let objects = Class({
get eventTarget() this,
fooEvents: {
popupshowing: function onPopupShowing(event) {
mow.contextEvents.popupshowing.call(mow, event);
}
},
events: {
popupshowing: function onPopupShowing(event) {
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";
LibreJS
Copyright (C) 2011 Loic J. Duros
Released under the GPL v3
Current Version: 2.3.0 -- 11/26/2011
Overview
Error: document.getElementById("pushfox-toolbar-button") is null
Source file: chrome://pushfox/content/overlay.js
Line: 69
/**
* 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
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);