schoolbox web extension :)
0
fork

Configure Feed

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

feat: remove schooltape from footer

willow 91872937 5881f379

+8 -14
+8 -14
src/entrypoints/end.content.ts
··· 1 1 import { browser, defineContentScript } from "#imports"; 2 + import { dataAttr, hasChanged, setDataAttr } from "@/utils"; 2 3 import { EXCLUDE_MATCHES } from "@/utils/constants"; 3 4 import { logger } from "@/utils/logger"; 4 5 import { globalSettings, schoolboxUrls } from "@/utils/storage"; ··· 14 15 logger.info((await schoolboxUrls.storage.getValue()).urls); 15 16 16 17 if (!settings.global) return; 18 + 17 19 const footer = document.querySelector("#footer > ul"); 18 - if (footer && footer.innerHTML.includes("Schoolbox")) { 19 - const footerListItem = document.createElement("li"); 20 - const footerLink = document.createElement("a"); 21 - footerLink.href = "https://github.com/schooltape/schooltape"; 22 - footerLink.textContent = `Schooltape v${browser.runtime.getManifest().version}`; 23 - footerListItem.appendChild(footerLink); 24 - footer.appendChild(footerListItem); 25 20 21 + if (footer && footer.innerHTML.includes("Schoolbox")) { 26 22 if (!urls.includes(window.location.origin)) { 27 - logger.info("[end.content.ts] URL not in settings, adding..."); 28 - if (!urls.includes(window.location.origin)) { 29 - urls.push(window.location.origin); 30 - await schoolboxUrls.storage.setValue({ urls }); 31 - // TODO: hot reload 32 - window.location.reload(); 33 - } 23 + logger.info(`URL ${window.location.origin} not in storage, adding...`); 24 + urls.push(window.location.origin); 25 + await schoolboxUrls.storage.setValue({ urls }); 26 + // TODO: hot reload 27 + window.location.reload(); 34 28 } 35 29 } 36 30 },