Skip to content

Instantly share code, notes, and snippets.

@RanolP
Last active January 2, 2022 19:49
Show Gist options
  • Save RanolP/d72ac7512a16fdca66b9bd263fc434b3 to your computer and use it in GitHub Desktop.
Save RanolP/d72ac7512a16fdca66b9bd263fc434b3 to your computer and use it in GitHub Desktop.
Bypass Screen Share Restriction in Guild on Discord.
(() => {
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);
}
})();
// 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)
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)
@RanolP
Copy link
Author

RanolP commented Jan 24, 2019

A Guide to Apply This Bypass

  1. If you enabled developer mode (or else you're using web version), ignore this.
    Go to the Appearance tab and turn on the Developer Mode in Advanced section.
  2. Open the Console in Developer Tools. You can open Developer Tools via key combo. I'm sure that is Ctrl + Shift + I or F12.
  3. Copy the content of bypass-tricked.min.js and paste it to the Console.
  4. Maybe requires reconnecting to the voice channel.
  5. 🎉 You unlocked screen sharing feature at any Guild for this time. If you restart the app, You should do this procedure again.

@RanolP
Copy link
Author

RanolP commented Jan 25, 2019

Note that Discord Screen Sharing is not available on Web Client (both Chrome and Firefox). So if you're on the web platform, you only can watch others' screen (or not work correctly). But I found a Extension for Chrome! You can share your screen on Chrome!

@RanolP
Copy link
Author

RanolP commented May 1, 2019

Some people say it does not work anymore. if you're one of them it would be useful for you.

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