···55import modernIcons from "./plugins/modernIcons";
66import tabTitle from "./plugins/tabTitle";
77import homepageSwitcher from "./plugins/homepageSwitcher";
88-import legacyTimetable from "./plugins/legacyTimetable";
98109export default defineContentScript({
1110 matches: ["<all_urls>"],
···1918 modernIcons();
2019 tabTitle();
2120 homepageSwitcher();
2222- legacyTimetable();
2321 },
2422});
-20
src/entrypoints/plugins/legacyTimetable.ts
···11-export default function init() {
22- defineStPlugin(
33- "legacyTimetable",
44- () => {
55- if (window.location.pathname === "/" && document.querySelector(".timetable")) {
66- // get the timetable container and add the 'columns' class
77- const timetableContainer = document.querySelector("[data-timetable-container]");
88- if (timetableContainer) {
99- timetableContainer.classList.add("columns");
1010- // get the row element and move the timetable container to the beginning
1111- const rowElement = document.querySelector(".Component_Dashboard_TimetableController")?.parentNode?.parentNode;
1212- if (rowElement) {
1313- rowElement.insertBefore(timetableContainer, rowElement.firstChild);
1414- }
1515- }
1616- }
1717- },
1818- [".timetable"],
1919- );
2020-}
-4
src/utils/constants.ts
···6161 name: "Homepage Switcher",
6262 description: "The logo will switch to existing Schoolbox homepage when available",
6363 },
6464- legacyTimetable: {
6565- name: "Legacy Timetable",
6666- description: "Moves the timetable to its own row",
6767- },
6864};
69657066// Snippets