Last active
January 2, 2022 19:49
-
-
Save RanolP/d72ac7512a16fdca66b9bd263fc434b3 to your computer and use it in GitHub Desktop.
Bypass Screen Share Restriction in Guild on Discord.
This file contains 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
(() => { | |
const data = [ | |
[], | |
{ | |
run: (_ignored1, _ignored2, { c: result }) => { | |
for (const field of Object.getOwnPropertyNames(result)) { | |
const exported = result[field].exports; | |
if (exported && exported.isDeveloper === false) { | |
Object.defineProperty(exported, "isDeveloper", { | |
value: true, | |
configurable: true | |
}); | |
} | |
} | |
} | |
}, | |
[["run"]] | |
]; | |
if(typeof webpackJsonp === "object") { | |
webpackJsonp.push(data); | |
} else { | |
webpackJsonp(...data); | |
} | |
})(); |
This file contains 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
// Remove const to make code shorter | |
// Rename variable more short | |
// Remove semicolons if it's not ambigious | |
a = [ | |
[], | |
{ | |
b: (d, e, { c }) => { | |
// Make reused long value as variable | |
h = "isDeveloper"; | |
for (f of Object.getOwnPropertyNames(c)) { | |
g = c[f].exports; | |
if (g && g[h] === false) { | |
Object.defineProperty(g, h, { value: true, configurable: true }) | |
} | |
} | |
} | |
}, | |
[["b"]] | |
]; | |
// Change if-else to elvis operator | |
typeof webpackJsonp == "object" ? webpackJsonp.push(a) : webpackJsonp(...a) |
This file contains 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
a=[[],{b:(d,e,{c})=>{h="isDeveloper";for(f of Object.getOwnPropertyNames(c)){g=c[f].exports;if(g&&g[h]===false){Object.defineProperty(g,h,{value:true,configurable:true})}}}},[["b"]]];typeof webpackJsonp=="object"?webpackJsonp.push(a):webpackJsonp(...a) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Some people say it does not work anymore. if you're one of them it would be useful for you.