schoolbox web extension :)
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

refactor: rename defineStPlugin and defineStSnippet

willow 14eb5c24 28eb5b69

+13 -13
+1 -1
src/entrypoints/plugins/homepageSwitcher.ts
··· 1 1 export default function init() { 2 - defineStPlugin( 2 + definePlugin( 3 3 "homepageSwitcher", 4 4 (_id, data) => { 5 5 const logos = Array.from(document.getElementsByClassName("logo")) as HTMLAnchorElement[];
+1 -1
src/entrypoints/plugins/modernIcons/index.ts
··· 1 1 import styleText from "./styles.css?inline"; 2 2 3 3 export default function init() { 4 - defineStPlugin( 4 + definePlugin( 5 5 "modernIcons", 6 6 async (_id, data) => { 7 7 // [className, iconName] (material icons)
+1 -1
src/entrypoints/plugins/progressBar/index.ts
··· 1 1 import styleText from "./styles.css?inline"; 2 2 3 3 export default function init() { 4 - defineStPlugin( 4 + definePlugin( 5 5 "progressBar", 6 6 () => { 7 7 if (window.location.pathname === "/" && document.querySelector(".timetable")) {
+1 -1
src/entrypoints/plugins/scrollPeriod.ts
··· 1 1 export default function init() { 2 - defineStPlugin( 2 + definePlugin( 3 3 "scrollPeriod", 4 4 async (_id, data) => { 5 5 const timetable = document.querySelector("[data-timetable-container] div.scrollable");
+1 -1
src/entrypoints/plugins/scrollSegments/index.ts
··· 1 1 import styleText from "./styles.css?inline"; 2 2 3 3 export default function init() { 4 - defineStPlugin( 4 + definePlugin( 5 5 "scrollSegments", 6 6 () => { 7 7 const content = document.getElementById("content");
+1 -1
src/entrypoints/plugins/subheader.ts
··· 1 1 export default function init() { 2 - defineStPlugin( 2 + definePlugin( 3 3 "subheader", 4 4 (_id, data) => { 5 5 const style = document.createElement("style");
+1 -1
src/entrypoints/plugins/tabTitle.ts
··· 1 1 export default function init() { 2 - defineStPlugin( 2 + definePlugin( 3 3 "tabTitle", 4 4 async (_id, data) => { 5 5 const path = window.location.pathname;
+4 -4
src/entrypoints/snippets.content.ts
··· 8 8 runAt: "document_start", 9 9 excludeMatches: EXCLUDE_MATCHES, 10 10 async main() { 11 - defineStSnippet("roundedCorners", roundedCorners); 12 - defineStSnippet("hidePfp", hidePfp); 13 - defineStSnippet("hidePwaPrompt", hidePwaPrompt); 14 - defineStSnippet("censor", censor); 11 + defineSnippet("roundedCorners", roundedCorners); 12 + defineSnippet("hidePfp", hidePfp); 13 + defineSnippet("hidePwaPrompt", hidePwaPrompt); 14 + defineSnippet("censor", censor); 15 15 }, 16 16 });
+1 -1
src/utils/plugin.ts
··· 1 - export async function defineStPlugin( 1 + export async function definePlugin( 2 2 pluginId: PluginId, 3 3 injectLogic: (id: PluginId, data: PluginData) => void, 4 4 elementsToWaitFor: string[] = [],
+1 -1
src/utils/snippet.ts
··· 1 - export async function defineStSnippet(snippetId: SnippetId, styleText: string) { 1 + export async function defineSnippet(snippetId: SnippetId, styleText: string) { 2 2 const snippet = await snippets[snippetId].toggle.storage.getValue(); 3 3 4 4 logger.info(`${snippets[snippetId].info.name}: ${snippet.toggle ? "enabled" : "disabled"}`);