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
// source: https://github.com/RequestPolicyContinued/requestpolicy/blob/1c9810d005a0bc12a7719484bf63f58616ff6cbf/tests/mocha/lib/sinon-chrome.js | |
const stableApiFx = require("sinon-chrome/config/stable-api-ff.json"); | |
const Api = require("sinon-chrome/api"); | |
for (let ns of stableApiFx) { | |
if (ns.namespace === "management") { | |
if (!("events" in ns)) ns.events = []; | |
ns.events.push({ | |
"name": "onEnabled", |
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
interface IMapValueFactory<K, T> { | |
construct: (key: K) => T; | |
} | |
interface IMapBuilder<K, T> { | |
maybeConstruct: (key: K) => void; | |
get: ( | |
((key: K, maybeConstruct?: boolean) => T | undefined) & | |
((key: K, maybeConstruct: true) => 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
#!/usr/bin/python3 | |
# source: https://github.com/RequestPolicyContinued/requestpolicy/issues/876 | |
import os | |
import re | |
default_locale = 'en-US' | |
locales = [ | |
'de', 'en-US', 'eo', 'es-ES', 'es-MX', 'eu', 'fr', 'it', 'ja', 'ko-KR', |
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
#rpc-contents { | |
background-color: #ffffff; | |
} | |
#rpc-origins-destinations [selected-origin="true"] { | |
border-color: #ddd !important; | |
background-color: #eaeaea; | |
} | |
#rpc-origins-destinations [selected-origin="false"]:hover { | |
border-color: #eee !important; |
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
body { | |
border: dashed 2px magenta; | |
} |
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
/** | |
* This function will be called before an add-on wraps | |
* a `gBrowser` function. A reference to the original | |
* function will be saved in `gBrowser.originalFunctions`. | |
*/ | |
function beforeWrap(gBrowser, fnName) { | |
// Ensure that `gBrowser.originalFunctions` exists. | |
if (!gBrowser.hasOwnProperty("originalFunctions")) { | |
gBrowser.originalFunctions = {}; | |
} |
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
usage: see the bash script |