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 uriString = "https://addons.mozilla.org/firefox/downloads/latest/413716/addon-413716-latest.xpi"; | |
var referer = "https://addons.mozilla.org/"; | |
var private = false; // Отсылать запрос в приватном режиме | |
var ios = Components.classes["@mozilla.org/network/io-service;1"] | |
.getService(Components.interfaces.nsIIOService); | |
var uri = ios.newURI(uriString, null, null); | |
var scheme = uri.scheme && uri.scheme.toLowerCase(); | |
var channel = scheme == "about" && "nsIAboutModule" in Components.interfaces |
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
// https://gist.github.com/Infocatcher/5387328 | |
// More: https://github.com/Infocatcher/Download_Panel_Tweaker | |
// (c) Infocatcher 2013, 2015 | |
var itemCountLimit = 5; | |
// resource://app/modules/DownloadsCommon.jsm, see getSummary() function | |
if(DownloadsCommon._privateSummary) | |
DownloadsCommon._privateSummary._numToExclude = itemCountLimit; | |
if(DownloadsCommon._summary) | |
DownloadsCommon._summary._numToExclude = itemCountLimit; |
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 stack = 'before@resource://gre/modules/XPIProvider.jsm -> jar:file:///Z:/FirefoxPortable/Data/profile/extensions/[email protected]!/bootstrap.js:1899\n\ | |
wrapper@resource://gre/modules/XPIProvider.jsm -> jar:file:///Z:/FirefoxPortable/Data/profile/extensions/[email protected]!/bootstrap.js:2211\n\ | |
SocialUI.enabled@chrome://browser/content/browser.js:4292\n\ | |
SSB_updateShareState@chrome://browser/content/browser.js:4644\n\ | |
XULBrowserWindow.onLocationChange@chrome://browser/content/browser.js:11409\n\ | |
@chrome://browser/content/tabbrowser.xml:384\n\ | |
_callProgressListeners@chrome://browser/content/tabbrowser.xml:381\n\ | |
updateCurrentBrowser@chrome://browser/content/tabbrowser.xml:896\n\ | |
onselect@chrome://browser/content/browser.xul:1\n\ | |
set_selectedIndex@chrome://global/content/bindings/tabbox.xml:661\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
var c = 30e3; | |
var tmr = "performance" in window && "now" in performance | |
? performance | |
: Date; | |
var Cu = Components.utils; | |
var i = c + 1, t = tmr.now(); | |
while(--i) | |
Cu.import("resource://gre/modules/Services.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
// https://gist.github.com/Infocatcher/5787749 | |
// More: https://github.com/Infocatcher/Download_Panel_Tweaker | |
// (c) Infocatcher 2013 | |
function showDownloadRate(patch) { | |
//var {DownloadUtils} = Components.utils.import("resource://gre/modules/DownloadUtils.jsm", {}); | |
const bakKey = "_customButtons_getDownloadStatusNoRate"; | |
if(!patch ^ bakKey in DownloadUtils) | |
return; | |
if(patch) { |
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 WindowListener = { | |
handleEvent: function(aEvent) { | |
var trg = aEvent.originalTarget; | |
if( // I don't know, how do better checks here :( | |
trg.className != "hoverBox" | |
|| String.toLowerCase(trg.localName) != "div" | |
|| !trg.parentNode | |
|| trg.parentNode.className != "mainBox" | |
//|| String.toLowerCase(aEvent.target.localName) != "embed" | |
|| !(aEvent.target instanceof Ci.nsIObjectLoadingContent) |
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
// Allow styles like | |
// :root[cb_pressed] { /* Pressed any modifier */ } | |
// :root[cb_pressed~="shift"] { /* Pressed Shift */ } | |
var pressed = { | |
ctrl: false, | |
alt: false, | |
shift: false, | |
meta: false, | |
__proto__: null | |
}; |
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
// https://gist.github.com/Infocatcher/6200149 | |
// Version: 0.1.2 - 2014-07-17 | |
// Author: Infocatcher | |
//// Delete current file | |
// Usage: | |
// Call("Scripts::Main", 1, "deleteCurrentFile.js") | |
var confirm = AkelPad.GetArgValue("confirm", true); |