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
// ==UserScript== | |
// @name FF4 window test | |
// @namespace ventero.de | |
// @include http://ventero.de/temp/test_gm_ff4.html | |
// ==/UserScript== | |
if(typeof window.functionInPageScope !== "undefined") | |
window.functionInPageScope(); | |
alert(functionInPageScope); |
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
// ==UserScript== | |
// @name Document Start Test | |
// @namespace vidzbigger.com | |
// @description This scrip tests document-start | |
// @include http://* | |
// @run-at document-start | |
// ==/UserScript== | |
GM_addStyle('body{display:none;}'); |
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
function getDominantColor(aImg) { | |
let canvas = document.createElement("canvas"); | |
canvas.height = aImg.height; | |
canvas.width = aImg.width; | |
let context = canvas.getContext("2d"); | |
context.drawImage(aImg, 0, 0); | |
// keep track of how many times a color appears in the image | |
let colorCount = {}; |
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
// 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 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
// ==UserScript== | |
// @include main | |
// @compatibility Firefox 4.0+ | |
// ==/UserScript== | |
document.getElementById('cmd_find').setAttribute('oncommand', 'gFindBar.hidden ? gFindBar.onFindCommand() : gFindBar.close();'); |
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
// ==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 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
// ==UserScript== | |
// @name UserScriptLoader.uc.js | |
// @author Griever | |
// @include main | |
// @description Greasemonkey っぽいもの | |
// @version 0.1.6.1 | |
// @note 0.1.6.1 uAutoPagerize との連携ができなかったのを修正 | |
// @note 0.1.6.1 .user.js 間での連携は多分できません。。 | |
// @note 0.1.6 色々修正。unsafeWindow 使ってて動かなかった物が動くかも | |
// @note 0.1.6 Firefox 3.6 は切り捨てた |
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
(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 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
// ==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 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
/*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) |