schoolbox web extension :)
0
fork

Configure Feed

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

feat(plugins/legacyTimetable): remove

* close #227

willow 67f73f97 0ef37992

+1 -33
-2
src/entrypoints/plugins.content.ts
··· 5 5 import modernIcons from "./plugins/modernIcons"; 6 6 import tabTitle from "./plugins/tabTitle"; 7 7 import homepageSwitcher from "./plugins/homepageSwitcher"; 8 - import legacyTimetable from "./plugins/legacyTimetable"; 9 8 10 9 export default defineContentScript({ 11 10 matches: ["<all_urls>"], ··· 19 18 modernIcons(); 20 19 tabTitle(); 21 20 homepageSwitcher(); 22 - legacyTimetable(); 23 21 }, 24 22 });
-20
src/entrypoints/plugins/legacyTimetable.ts
··· 1 - export default function init() { 2 - defineStPlugin( 3 - "legacyTimetable", 4 - () => { 5 - if (window.location.pathname === "/" && document.querySelector(".timetable")) { 6 - // get the timetable container and add the 'columns' class 7 - const timetableContainer = document.querySelector("[data-timetable-container]"); 8 - if (timetableContainer) { 9 - timetableContainer.classList.add("columns"); 10 - // get the row element and move the timetable container to the beginning 11 - const rowElement = document.querySelector(".Component_Dashboard_TimetableController")?.parentNode?.parentNode; 12 - if (rowElement) { 13 - rowElement.insertBefore(timetableContainer, rowElement.firstChild); 14 - } 15 - } 16 - } 17 - }, 18 - [".timetable"], 19 - ); 20 - }
-4
src/utils/constants.ts
··· 61 61 name: "Homepage Switcher", 62 62 description: "The logo will switch to existing Schoolbox homepage when available", 63 63 }, 64 - legacyTimetable: { 65 - name: "Legacy Timetable", 66 - description: "Moves the timetable to its own row", 67 - }, 68 64 }; 69 65 70 66 // Snippets
-5
src/utils/storage.ts
··· 63 63 toggle: true, 64 64 }, 65 65 }), 66 - legacyTimetable: storage.defineItem<Types.PluginGeneric>("local:plugin-legacyTimetable", { 67 - fallback: { 68 - toggle: false, 69 - }, 70 - }), 71 66 }; 72 67 73 68 // Snippets
+1 -2
src/utils/types.ts
··· 50 50 | "progressBar" 51 51 | "modernIcons" 52 52 | "tabTitle" 53 - | "homepageSwitcher" 54 - | "legacyTimetable"; 53 + | "homepageSwitcher"; 55 54 56 55 export interface PluginInfo extends ItemInfo {} 57 56 export interface PluginGeneric extends ItemGeneric {}