Skip to content

Instantly share code, notes, and snippets.

@adryd325
Created December 6, 2023 03:56
Show Gist options
  • Save adryd325/8fc6bf8722be966894d4de2bd17349cb to your computer and use it in GitHub Desktop.
Save adryd325/8fc6bf8722be966894d4de2bd17349cb to your computer and use it in GitHub Desktop.
// ==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);
})();
@Korb
Copy link

Korb commented Mar 7, 2025

What does this userscript do?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment