Created
December 6, 2023 03:56
-
-
Save adryd325/8fc6bf8722be966894d4de2bd17349cb to your computer and use it in GitHub Desktop.
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 Experiments | |
// @namespace Violentmonkey Scripts | |
// @version 0.1 | |
// @description Experiements | |
// @author adryd | |
// @match https://discord.com/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=discord.com | |
// @grant none | |
// @run-at document-start | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
function globalEnvPatcher() { | |
let GLOBAL_ENV; | |
Object.defineProperty(window, "GLOBAL_ENV", { | |
set: function set(value) { | |
GLOBAL_ENV = value | |
window.GLOBAL_ENV.RELEASE_CHANNEL = "staging" | |
}, | |
get: function get() { | |
return GLOBAL_ENV | |
}, | |
configurable: true | |
}) | |
} | |
const script = document.createElement("script") | |
script.text = "(" + globalEnvPatcher.toString()+")()" | |
document.documentElement.appendChild(script); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment