generated from uwu/shelter-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
813a24b
commit 74144ba
Showing
15 changed files
with
114 additions
and
199 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,24 @@ | ||
const { http } = shelter; | ||
const { intercept } = http; | ||
|
||
export default { | ||
title: "Anti Track", | ||
content: "Stop some tracking, not all.", | ||
start: () => { | ||
try { | ||
( | ||
window as unknown as { | ||
__SENTRY__: { | ||
hub: { | ||
getClient: () => { getOptions: () => { enabled: boolean } }; | ||
}; | ||
export default () => { | ||
try { | ||
( | ||
window as unknown as { | ||
__SENTRY__: { | ||
hub: { | ||
getClient: () => { getOptions: () => { enabled: boolean } }; | ||
}; | ||
} | ||
).__SENTRY__.hub | ||
.getClient() | ||
.getOptions().enabled = false; | ||
for (const x of Object.keys(console)) { | ||
console[x] = console[x].__sentry_original__ ?? console[x]; | ||
}; | ||
} | ||
} catch {} | ||
).__SENTRY__.hub | ||
.getClient() | ||
.getOptions().enabled = false; | ||
for (const x of Object.keys(console)) { | ||
console[x] = console[x].__sentry_original__ ?? console[x]; | ||
} | ||
} catch {} | ||
|
||
// @ts-ignore | ||
intercept("post", /^\/science|^\/error-reporting-proxy/, () => {}); | ||
}, | ||
// @ts-ignore | ||
intercept("post", /^\/science|^\/error-reporting-proxy/, () => {}); | ||
}; |
This file was deleted.
Oops, something went wrong.
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,19 @@ | ||
const originalConsoleMethods: { [key: string]: (...args: unknown[]) => void } = | ||
{}; | ||
|
||
export default { | ||
title: "No Console Spam", | ||
content: "Filter the console spam.", | ||
start: () => { | ||
for (const method of Object.keys(console)) { | ||
originalConsoleMethods[method] = console[method]; | ||
export default () => { | ||
for (const method of Object.keys(console)) { | ||
originalConsoleMethods[method] = console[method]; | ||
|
||
console[method] = (...args: unknown[]) => { | ||
const message = args[0]; | ||
if ( | ||
typeof message === "string" && | ||
(message.includes("%c[") || message.toLowerCase().includes("sentry")) | ||
) { | ||
return; | ||
} | ||
originalConsoleMethods[method].apply(console, args); | ||
}; | ||
} | ||
}, | ||
console[method] = (...args: unknown[]) => { | ||
const message = args[0]; | ||
if ( | ||
typeof message === "string" && | ||
(message.includes("%c[") || message.toLowerCase().includes("sentry")) | ||
) { | ||
return; | ||
} | ||
originalConsoleMethods[method].apply(console, args); | ||
}; | ||
} | ||
}; |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,10 @@ | ||
const { flux } = shelter; | ||
const { intercept } = flux; | ||
|
||
export default { | ||
title: "No Reply Mention", | ||
content: "Disable replies by default.", | ||
start: () => { | ||
intercept((dispatch) => { | ||
if (dispatch.type !== "CREATE_PENDING_REPLY") return; | ||
export default () => { | ||
intercept((dispatch) => { | ||
if (dispatch.type !== "CREATE_PENDING_REPLY") return; | ||
|
||
dispatch.shouldMention = false; | ||
}); | ||
}, | ||
dispatch.shouldMention = false; | ||
}); | ||
}; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,7 @@ | ||
const { http } = shelter; | ||
const { intercept } = http; | ||
|
||
export default { | ||
title: "No Typing", | ||
content: "Stop Discord from sending your typing status.", | ||
start: () => { | ||
// @ts-ignore | ||
intercept("post", /.*typing$/, () => {}); | ||
}, | ||
export default () => { | ||
// @ts-ignore | ||
intercept("post", /.*typing$/, () => {}); | ||
}; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,5 @@ | ||
export default { | ||
title: "No Typing Animation", | ||
content: "Disable the CPU-intensive typing dots animation.", | ||
start: () => { | ||
document.hasFocus = () => { | ||
return false; | ||
}; | ||
}, | ||
export default () => { | ||
document.hasFocus = () => { | ||
return false; | ||
}; | ||
}; |
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
Oops, something went wrong.