Skip to content

Instantly share code, notes, and snippets.

@wellington1993
wellington1993 / top.js
Created February 11, 2020 02:56
moz-extension://936423b4-ebd6-4837-882e-1d71a488c57e/data/inject/top.js
'use strict';
let now = Date.now();
const prefs = {
'period': 10 * 60, // in seconds
'audio': true, // audio = true => do not discard if audio is playing
'pinned': false, // pinned = true => do not discard if tab is pinned
'online': false, // online = true => do not discard if there is no INTERNET connection
'form': true, // form = true => do not discard if form data is changed
@wellington1993
wellington1993 / AsyncTabSwitcher.jsm
Created February 11, 2020 03:08
resource:///modules/AsyncTabSwitcher.jsm
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
* 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 = ["AsyncTabSwitcher"];
const { XPCOMUtils } = ChromeUtils.import(
@wellington1993
wellington1993 / ExtensionCommon.jsm
Created February 11, 2020 03:11
resource://gre/modules/ExtensionCommon.jsm
/* -*- 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";
/**
* This module contains utilities and base classes for logic which is
* common between the parent and child process, and in particular
(function(){/*
Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
var k;function aa(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}}function ba(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:aa(a)}}function ca(a){for(var b,c=[];!(b=a.next()).done;)c.push(b.value);return c}function da(a){a=["object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global,a];for(var b=0;b<a.length;++b){var c=a[b];if(c&&c.Math==Math)return c}return globalThis}var ea=da(this);
;(function(){
/* UNBUILD */
var root;
if(typeof window !== "undefined"){ root = window }
if(typeof global !== "undefined"){ root = global }
root = root || {};
var console = root.console || {log: function(){}};
function USE(arg, req){
return req? require(arg) : arg.slice? USE[R(arg)] : function(mod, path){
;(function(){
/* UNBUILD */
var root;
if(typeof window !== "undefined"){ root = window }
if(typeof global !== "undefined"){ root = global }
root = root || {};
var console = root.console || {log: function(){}};
function USE(arg, req){
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active April 26, 2024 21:34
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
!function(e){var t={};function n(i){if(t[i])return t[i].exports;var o=t[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(e,t,n){var i;"undefined"!=typeof self&&self,i=function(){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var o=t[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=3)}([function(e,t,n){"use st
!function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return t[r].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var n={};e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){n(6),n(340),n(345),n(3),n(346),n(350),n(381),n(383),n(385),n(386),n(388),n(398),t.exports=n(399)},,function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.deviceType=void 0;var r=n(3),i=function(t){return t&&t.__esModule?t:{default:t}}(r),o=i.default.os;e.deviceType=i.default.type;e.default=o},function(t,e){"use strict";function n(t){return-1!==m.indexOf(t)}function r(t){return p.className.match(RegExp(t,"i"))}function i(t){var e=null;r(t)||(e=p.className.replace(/^\s+|\s+$/g,""),p.className=e+" "+t)}function o(t){r(t)&&(p.className=p.className.replace(" "+t,""))}function a(){d.landscape()?(o("portrait"),i("landscape"),s("landscape")):(o("landscape"),i("portrait"),s("portrait")),c()}function s(t){for(var e in h)h[e](t)}function u(t){for(var e=0;e<t.length;e++)if(d[t[e]]())return t