Skip to content

Instantly share code, notes, and snippets.

@wellington1993
wellington1993 / UrlbarUtils.jsm
Created January 29, 2020 02:48
view-source:resource:///modules/UrlbarUtils.jsm
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
/**
* This module exports the UrlbarUtils singleton, which contains constants and
* helper functions that are useful to all components of the urlbar.
*/
@wellington1993
wellington1993 / network-response-listener.js
Created January 14, 2020 18:32
view-source:resource://devtools/server/actors/network-monitor/network-response-listener.js
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const { Cc, Ci, Cr } = require("chrome");
const ChromeUtils = require("ChromeUtils");
const Services = require("Services");
@wellington1993
wellington1993 / customizableWidgets.properties
Created February 3, 2020 13:36
chrome://browser/locale/customizableui/customizableWidgets.properties
history-panelmenu.label = History
history-panelmenu.tooltiptext2 = Show your history (%S)
remotetabs-panelmenu.label = Synced Tabs
remotetabs-panelmenu.tooltiptext2 = Show tabs from other devices
privatebrowsing-button.label = New Private Window
privatebrowsing-button.tooltiptext = Open a new Private Browsing window (%S)
@wellington1993
wellington1993 / CustomizableUI.jsm
Created February 3, 2020 13:36
resource:///modules/CustomizableUI.jsm
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
var EXPORTED_SYMBOLS = ["CustomizableUI"];
const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
const { XPCOMUtils } = ChromeUtils.import(
"resource://gre/modules/XPCOMUtils.jsm"
@wellington1993
wellington1993 / ShortcutUtils.jsm
Created February 3, 2020 13:37
resource://gre/modules/ShortcutUtils.jsm
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
var EXPORTED_SYMBOLS = ["ShortcutUtils"];
const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
const { XPCOMUtils } = ChromeUtils.import(
@wellington1993
wellington1993 / backgroundPageThumbsContent.js
Last active April 26, 2024 21:39
chrome://global/content/backgroundPageThumbsContent.js
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* eslint-env mozilla/frame-script */
const { PageThumbUtils } = ChromeUtils.import(
"resource://gre/modules/PageThumbUtils.jsm"
);
const { XPCOMUtils } = ChromeUtils.import(
@wellington1993
wellington1993 / fix-cnpj-rj.js
Last active April 26, 2024 21:38
Fix CNPJ Paste RJ
document.formulario.critica_dado[0].checked = true;
ocultaTabelaCampos();
document.formulario.radio_cpfcnpj[1].checked = true;
ocultaTabelaCampos();
document.getElementById("destcnpj").style= "";
document.getElementById("destcnpj").onpaste = "";
document.getElementById("destcnpj").onblur = "";
document.getElementById("destcnpj").onkeypress = "";
@wellington1993
wellington1993 / service.js
Created February 4, 2020 21:09
resource://services-sync/service.js
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var EXPORTED_SYMBOLS = ["Service"];
// How long before refreshing the cluster
const CLUSTER_BACKOFF = 5 * 60 * 1000; // 5 minutes
// How long a key to generate from an old passphrase.
@wellington1993
wellington1993 / config.json
Created February 5, 2020 01:22
Auto discard config
{
"chrome.storage.local": {
"audio": true,
"battery": false,
"check-delay": 30000,
"click": "click.popup",
"faqs": true,
"favicon": true,
"favicon-delay": 500,
"form": true,