Skip to content

Instantly share code, notes, and snippets.

/* 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 https://mozilla.org/MPL/2.0/. */
/*
* ImageObjectProcessor
* Implementation of Image Object processing algorithms from:
* http://www.w3.org/TR/appmanifest/#image-object-and-its-members
*
* This is intended to be used in conjunction with ManifestProcessor.jsm
*
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
const {AddonTestUtils} = ChromeUtils.import("resource://testing-common/AddonTestUtils.jsm", {});
ChromeUtils.defineModuleGetter(this, "AddonManager", "resource://gre/modules/AddonManager.jsm");
const {
createAppInfo,
@thoughtsunificator
thoughtsunificator / main.js
Created February 18, 2024 22:03
Allow installing of unsigned web extensions in Firefox
let { XPIDatabase } = ChromeUtils.import('resource://gre/modules/addons/XPIDatabase.jsm', {});
XPIDatabase.isDisabledLegacy = (addon) => false;
XPIDatabase.mustSign = (aType) => false;
@eeejay
eeejay / install_addon.js
Created November 16, 2020 17:31
Sideload addon in Firefox for Android
// In main process JS console:
const { AddonManager } = ChromeUtils.import("resource://gre/modules/AddonManager.jsm")
AddonManager.getInstallForURL(XPI_URL).then(r => r.install())
/* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set sts=2 sw=2 et tw=80: */
/* 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";
// Copied form
// taskcluster/docker/periodic-updates/scripts/getHSTSPreloadList.js,
diff --git a/browser/base/content/contentSearchUI.js b/browser/base/content/contentSearchUI.js
--- a/browser/base/content/contentSearchUI.js
+++ b/browser/base/content/contentSearchUI.js
@@ -46,17 +46,17 @@ this.ContentSearchUIController = (functi
searchPurpose,
isPrivateWindow,
idPrefix = ""
) {
this.input = inputElement;
this._idPrefix = idPrefix;
@xiaoxiaoflood
xiaoxiaoflood / highlightScrollbar.uc.js
Created June 30, 2019 18:59
demo. very incomplete.
// ==UserScript==
// @name highlightScrollbar.uc.js
// @include main
// ==/UserScript==
(function() {
messageManager.loadFrameScript('data:application/javascript;charset=UTF-8,' +
encodeURIComponent('('+(function(){
var dis = this;
commit f9a9b6199dabdaef823bdebf95c0e4f95eb3297d
Author: Jason Laster <jlaster@mozilla.com>
Date: Sun May 3 11:22:48 2020 -0700
add about-replay
diff --git a/toolkit/content/aboutWebReplay.css b/toolkit/content/aboutWebReplay.css
deleted file mode 100644
index cb588e91ef32..000000000000
--- a/toolkit/content/aboutWebReplay.css
@kergalym
kergalym / SessionSaver.jsm
Created October 1, 2018 16:44
firefox-61.0/browser/components/sessionstore/SessionSaver.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 = ["SessionSaver"];
ChromeUtils.import("resource://gre/modules/Timer.jsm", this);
ChromeUtils.import("resource://gre/modules/Services.jsm", this);
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active April 26, 2024 22:02
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser! If you absolutely need to use browser instead of desktop app, use an extension to add the string Electron/ anywhere in your user-agent.

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
  2. Join a vc
  3. Stream any window (can be notepad or something)
  4. Press Ctrl+Shift+I to open DevTools