Moved to https://github.com/LouCypher/userscripts/tree/master/addons.mozilla.org
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
/*jshint asi:true globalstrict:true*/ | |
'use strict'; | |
let { Cc, Ci } = require('chrome') | |
let ioService = Cc['@mozilla.org/network/io-service;1']. | |
getService(Ci.nsIIOService) | |
let resourceHandler = ioService.getProtocolHandler('resource'). | |
QueryInterface(Ci.nsIResProtocolHandler) |
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
/*jshint asi:true globalstrict:true*/ | |
'use strict'; | |
// Workaround for Bug 785891 | |
// and sugar around: https://developer.mozilla.org/en-US/docs/XPCOM_Interface_Reference/nsIComponentManager#addBootstrappedManifestLocation%28 | |
let { Cc, Ci, Cm } = require('chrome') | |
let ioService = Cc['@mozilla.org/network/io-service;1']. | |
getService(Ci.nsIIOService) |
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(d) { | |
var dl = d.createElement('a'); | |
dl.innerText = 'Download MP3'; | |
dl.href = "http://media.soundcloud.com/stream/"+d.querySelector('#main-content-inner img[class=waveform]').src.match(/\.com\/(.+)\_/)[1]; | |
dl.download = d.querySelector('em').innerText+".mp3"; | |
d.querySelector('.primary').appendChild(dl); | |
dl.style.marginLeft = '10px'; | |
dl.style.color = 'red'; | |
dl.style.fontWeight = 700; | |
})(document); |
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
// ==UserScript== | |
// @name set val test | |
// @include * | |
// @version 0.2 | |
// ==/UserScript== | |
GM_log(GM_getValue("test").toString()); |
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
// ==UserScript== | |
// @name Emulate `unsafeWindow` in browsers that don’t support it. | |
// ==/UserScript== | |
// http://mths.be/unsafewindow | |
window.unsafeWindow || ( | |
unsafeWindow = (function() { | |
var el = document.createElement('p'); | |
el.setAttribute('onclick', 'return window;'); | |
return el.onclick(); |
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
// ==UserScript== | |
// @name View Add-on Compatibility Reports | |
// @namespace http://userscripts.org/scripts/show/61398 | |
// @version 0.1 | |
// @description Adds a link to add-on compatibility reports to addons.mozilla.org. | |
// @include https://addons.mozilla.org/* | |
// @include https://preview.addons.mozilla.org/* | |
// @author http://userscripts.org/users/fcp | |
// @license This program is in the public domain. | |
// ==/UserScript== |
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
/* Includes a javascript file with loadSubScript | |
* By Erik Vold <[email protected]> http://erikvold.com/ | |
* | |
* @param src (String) | |
* The url of a javascript file to include. | |
*/ | |
(function(global) global.include = function include(src) { | |
var o = {}; | |
Components.utils.import("resource://gre/modules/Services.jsm", o); | |
var uri = o.Services.io.newURI( |
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
// Run this in your error console | |
var wc=0, tc=0; | |
var wm = window.top.opener.Services.wm; | |
var e = wm.getEnumerator("navigator:browser"); | |
var uc = { }; | |
while (e.hasMoreElements()) { | |
var tabs = e.getNext().gBrowser.tabs; | |
wc+=1; | |
tc += tabs.length; | |
Array.forEach(tabs, function(t) { |
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
// ==UserScript== | |
// @include main | |
// @compatibility Firefox 4.0+ | |
// ==/UserScript== | |
document.getElementById('cmd_find').setAttribute('oncommand', 'gFindBar.hidden ? gFindBar.onFindCommand() : gFindBar.close();'); |
NewerOlder