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
4d4dae5
commit 9d0e254
Showing
17 changed files
with
342 additions
and
166 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,29 @@ | ||
import alwaysTrust from "../modules/alwaysTrust.ts"; | ||
import antiTrack from "../modules/antiTrack.ts"; | ||
import colorSighted from "../modules/colorSighted.ts"; | ||
import muteNewGuild from "../modules/muteNewGuild.ts"; | ||
import noCallIdle from "../modules/noCallIdle.ts"; | ||
import noConsoleSpam from "../modules/noConsoleSpam.ts"; | ||
import noDevtoolsDetection from "../modules/noDevtoolsDetection.ts"; | ||
import noNitroUpsell from "../modules/noNitroUpsell.ts"; | ||
import noReplyMention from "../modules/noReplyMention.ts"; | ||
import noTyping from "../modules/noTyping.ts"; | ||
import noTypingAnimation from "../modules/noTypingAnimation.ts"; | ||
import steamStatusSync from "../modules/steamStatusSync.ts"; | ||
import timestampedFiles from "../modules/timestampedFiles.ts"; | ||
|
||
export default { | ||
alwaysTrust, | ||
antiTrack, | ||
colorSighted, | ||
muteNewGuild, | ||
noCallIdle, | ||
noConsoleSpam, | ||
noDevtoolsDetection, | ||
noNitroUpsell, | ||
noReplyMention, | ||
noTyping, | ||
noTypingAnimation, | ||
steamStatusSync, | ||
timestampedFiles, | ||
}; |
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,48 +1,29 @@ | ||
import modules from "./helpers/modules.ts"; | ||
|
||
const { | ||
plugin: { store }, | ||
plugin: { store, showSettings }, | ||
ui: { showToast }, | ||
} = shelter; | ||
|
||
export function onLoad() { | ||
for (const module of Object.keys(store)) { | ||
if (store[module]) { | ||
if (modules[module].start()) { | ||
showToast({ | ||
...modules[module], | ||
title: `${modules[module].title} - Enabled`, | ||
content: null, | ||
duration: 0, | ||
}); | ||
} | ||
modules[module].start(); | ||
} | ||
} | ||
|
||
showSettings(); | ||
} | ||
|
||
export function onUnload() { | ||
for (const module of Object.keys(store)) { | ||
if (store[module]) { | ||
if (modules[module].stop()) { | ||
showToast({ | ||
...modules[module], | ||
title: `${modules[module].title} - Disabled`, | ||
content: null, | ||
duration: 0, | ||
}); | ||
} else { | ||
showToast({ | ||
...modules[module], | ||
title: "Restat Required", | ||
content: `${modules[module].title} requires a restart to disable.`, | ||
onClick() { | ||
location.reload(); | ||
}, | ||
duration: Number.POSITIVE_INFINITY, | ||
}); | ||
} | ||
} | ||
} | ||
showToast({ | ||
title: "Restart Required", | ||
content: "€tilities requires a restart to disable.", | ||
onClick() { | ||
location.reload(); | ||
}, | ||
duration: Number.POSITIVE_INFINITY, | ||
}); | ||
} | ||
|
||
export * from "./components/settings.tsx"; |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
const { flux, patcher } = shelter; | ||
const { stores } = flux; | ||
const { instead } = patcher; | ||
const { MaskedLinkStore } = stores; | ||
|
||
export default { | ||
title: "Always Trust", | ||
content: 'Remove the "You are leaving Discord" popup.', | ||
start: () => { | ||
instead("isTrustedDomain", MaskedLinkStore, () => true, 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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
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 } }; | ||
}; | ||
}; | ||
} | ||
).__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/, () => {}); | ||
}, | ||
}; |
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.