schoolbox web extension :)
0
fork

Configure Feed

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

Reapply "refactor: disable auto imports"

This reverts commit 51e8184c3da79290d14c05a55d3c89d40759dfa5.

willow 3ae91291 51e8184c

+85 -9
+4
src/entrypoints/background.ts
··· 1 + import type { Browser } from "#imports"; 2 + import { browser, defineBackground, storage } from "#imports"; 3 + import { logger } from "@/utils/logger"; 4 + import { globalSettings, updated } from "@/utils/storage"; 1 5 import semver from "semver"; 2 6 3 7 export default defineBackground(() => {
+5
src/entrypoints/end.content.ts
··· 1 + import { browser, defineContentScript } from "#imports"; 2 + import { EXCLUDE_MATCHES } from "@/utils/constants"; 3 + import { logger } from "@/utils/logger"; 4 + import { globalSettings, schoolboxUrls } from "@/utils/storage"; 5 + 1 6 export default defineContentScript({ 2 7 matches: ["<all_urls>"], 3 8 runAt: "document_end",
+2
src/entrypoints/plugins.content.ts
··· 1 + import { defineContentScript } from "#imports"; 2 + import { EXCLUDE_MATCHES } from "@/utils/constants"; 1 3 import homepageSwitcher from "./plugins/homepageSwitcher"; 2 4 import modernIcons from "./plugins/modernIcons"; 3 5 import progressBar from "./plugins/progressBar";
+3
src/entrypoints/plugins/homepageSwitcher.ts
··· 1 + import { browser } from "#imports"; 2 + import { definePlugin } from "@/utils/plugin"; 3 + 1 4 export default function init() { 2 5 definePlugin( 3 6 "homepageSwitcher",
+2
src/entrypoints/plugins/modernIcons/index.ts
··· 1 + import { injectStyles } from "@/utils"; 2 + import { definePlugin } from "@/utils/plugin"; 1 3 import styleText from "./styles.css?inline"; 2 4 3 5 export default function init() {
+4
src/entrypoints/plugins/progressBar/index.ts
··· 1 + import { injectStyles } from "@/utils"; 2 + import type { Period } from "@/utils/periodUtils"; 3 + import { getListOfPeriods } from "@/utils/periodUtils"; 4 + import { definePlugin } from "@/utils/plugin"; 1 5 import styleText from "./styles.css?inline"; 2 6 3 7 export default function init() {
+3
src/entrypoints/plugins/scrollPeriod.ts
··· 1 + import { getCurrentPeriod } from "@/utils/periodUtils"; 2 + import { definePlugin } from "@/utils/plugin"; 3 + 1 4 export default function init() { 2 5 definePlugin( 3 6 "scrollPeriod",
+2
src/entrypoints/plugins/scrollSegments/index.ts
··· 1 + import { injectStyles } from "@/utils"; 2 + import { definePlugin } from "@/utils/plugin"; 1 3 import styleText from "./styles.css?inline"; 2 4 3 5 export default function init() {
+3
src/entrypoints/plugins/subheader.ts
··· 1 + import { getCurrentPeriod } from "@/utils/periodUtils"; 2 + import { definePlugin } from "@/utils/plugin"; 3 + 1 4 export default function init() { 2 5 definePlugin( 3 6 "subheader",
+2
src/entrypoints/plugins/tabTitle.ts
··· 1 + import { definePlugin } from "@/utils/plugin"; 2 + 1 3 export default function init() { 2 4 definePlugin( 3 5 "tabTitle",
+6 -4
src/entrypoints/popup/App.svelte
··· 1 1 <script lang="ts"> 2 + import { flavors } from "@catppuccin/palette"; 3 + import { globalSettings, needsRefresh, schoolboxUrls, updated } from "@/utils/storage"; 4 + import { RotateCw } from "@lucide/svelte"; 5 + import { logger } from "@/utils/logger"; 6 + import { browser, onMount } from "#imports"; 7 + 2 8 import Router from "svelte-spa-router"; 3 9 import active from "svelte-spa-router/active"; 4 10 import Home from "./routes/Home.svelte"; ··· 6 12 import Themes from "./routes/Themes.svelte"; 7 13 import Snippets from "./routes/Snippets.svelte"; 8 14 import Banner from "./components/Banner.svelte"; 9 - 10 - import { flavors } from "@catppuccin/palette"; 11 - import { needsRefresh } from "@/utils/storage"; 12 - import { RotateCw } from "@lucide/svelte"; 13 15 14 16 const routes = { 15 17 "/": Home,
+2
src/entrypoints/popup/components/Footer.svelte
··· 1 1 <script lang="ts"> 2 2 import { onMount } from "svelte"; 3 + import { browser } from "#imports"; 4 + import { updated } from "@/utils/storage"; 3 5 import Button from "./inputs/Button.svelte"; 4 6 import { RotateCcw, Globe, GitBranch } from "@lucide/svelte"; 5 7
+1
src/entrypoints/popup/components/Motd.svelte
··· 1 1 <script lang="ts"> 2 + import { motd } from "@/utils/storage"; 2 3 import { onMount } from "svelte"; 3 4 4 5 onMount(async () => {
+1
src/entrypoints/popup/routes/Home.svelte
··· 1 1 <script lang="ts"> 2 + import { globalSettings } from "@/utils/storage"; 2 3 import Footer from "../components/Footer.svelte"; 3 4 import Motd from "../components/Motd.svelte"; 4 5
+3 -1
src/entrypoints/popup/routes/Plugins.svelte
··· 1 1 <script lang="ts"> 2 + import type { PluginId } from "@/utils/storage"; 3 + import { globalSettings, plugins } from "@/utils/storage"; 4 + import { Settings } from "@lucide/svelte"; 2 5 import Title from "../components/Title.svelte"; 3 6 import Button from "../components/inputs/Button.svelte"; 4 - import { Settings } from "@lucide/svelte"; 5 7 import Modal from "../components/Modal.svelte"; 6 8 import Toggle from "../components/inputs/Toggle.svelte"; 7 9 import Slider from "../components/inputs/Slider.svelte";
+3
src/entrypoints/popup/routes/Snippets.svelte
··· 1 1 <script lang="ts"> 2 + import type { SnippetId, UserSnippet } from "@/utils/storage"; 3 + import { globalSettings, snippets } from "@/utils/storage"; 4 + 2 5 import Title from "../components/Title.svelte"; 3 6 import Toggle from "../components/inputs/Toggle.svelte"; 4 7 import TextInput from "../components/inputs/TextInput.svelte";
+6 -1
src/entrypoints/popup/routes/Themes.svelte
··· 1 1 <script lang="ts"> 2 + import { browser } from "#imports"; 3 + import type { LogoId } from "@/utils/storage"; 4 + import { globalSettings } from "@/utils/storage"; 5 + import { LOGO_INFO } from "@/utils/constants"; 6 + import { Palette } from "@lucide/svelte"; 7 + 2 8 import Title from "../components/Title.svelte"; 3 9 import Modal from "../components/Modal.svelte"; 4 10 import Button from "../components/inputs/Button.svelte"; 5 11 import Toggle from "../components/inputs/Toggle.svelte"; 6 - import { Palette } from "@lucide/svelte"; 7 12 8 13 const flavours = ["latte", "frappe", "macchiato", "mocha"]; 9 14 const accents = [
+3
src/entrypoints/snippets.content.ts
··· 1 + import { defineContentScript } from "#imports"; 2 + import { EXCLUDE_MATCHES } from "@/utils/constants"; 3 + import { defineSnippet } from "@/utils/snippet"; 1 4 import censor from "./snippets/censor.css?inline"; 2 5 import hidePfp from "./snippets/hidePfp/styles.css?inline"; 3 6 import hidePwaPrompt from "./snippets/hidePwaPrompt.css?inline";
+5
src/entrypoints/start.content.ts
··· 1 + import { browser, defineContentScript } from "#imports"; 2 + import { injectCatppuccin, injectLogo, injectStylesheet, injectUserSnippets } from "@/utils"; 3 + import { EXCLUDE_MATCHES, LOGO_INFO } from "@/utils/constants"; 4 + import type { LogoId } from "@/utils/storage"; 5 + import { globalSettings, schoolboxUrls } from "@/utils/storage"; 1 6 import cssUrl from "./catppuccin.css?url"; 2 7 3 8 export default defineContentScript({
+2
src/utils/constants.ts
··· 1 + import type { LogoId, LogoInfo } from "./storage"; 2 + 1 3 export const EXCLUDE_MATCHES: string[] = ["*://*/learning/quiz/*"]; 2 4 export const LOGO_INFO: Record<LogoId, LogoInfo> = { 3 5 default: {
+3 -1
src/utils/index.ts
··· 1 - export * from "./storage"; 1 + import { browser } from "#imports"; 2 2 import { flavorEntries } from "@catppuccin/palette"; 3 + import { logger } from "./logger"; 4 + import type { LogoInfo, UserSnippet } from "./storage"; 3 5 4 6 export function injectStyles(styleText: string) { 5 7 logger.info(`[content-utils] Injecting styles`);
+2
src/utils/periodUtils.ts
··· 1 1 // these utility functions are intended to be used on the dashboard, as that is where the timetable is displayed 2 2 3 + import { logger } from "./logger"; 4 + 3 5 interface PeriodHeader { 4 6 name: string; 5 7 time: {
+4
src/utils/plugin.ts
··· 1 + import { logger } from "./logger"; 2 + import type { PluginId, PluginSetting, Slider } from "./storage"; 3 + import { globalSettings, plugins, schoolboxUrls } from "./storage"; 4 + 1 5 export async function definePlugin( 2 6 pluginId: PluginId, 3 7 callback: (settings?: { toggle: Record<string, boolean>; slider: Record<string, Slider> }) => Promise<void> | void,
+5
src/utils/snippet.ts
··· 1 + import { injectStyles } from "."; 2 + import { logger } from "./logger"; 3 + import type { SnippetId } from "./storage"; 4 + import { globalSettings, schoolboxUrls, snippets } from "./storage"; 5 + 1 6 export async function defineSnippet(snippetId: SnippetId, styleText: string) { 2 7 const snippet = await snippets[snippetId].toggle.storage.getValue(); 3 8
+2 -1
src/utils/storage/global.ts
··· 1 + import { storage } from "#imports"; 1 2 import { StorageState } from "./state.svelte"; 2 - import * as Types from "./types"; 3 + import type * as Types from "./types"; 3 4 4 5 export const globalSettings = new StorageState<Types.Settings>( 5 6 storage.defineItem<Types.Settings>("local:globalSettings", {
+2 -1
src/utils/storage/plugins.ts
··· 1 + import { storage } from "#imports"; 1 2 import { StorageState } from "./state.svelte"; 2 - import * as Types from "./types"; 3 + import type * as Types from "./types"; 3 4 4 5 export const pluginConfig: Record<Types.PluginId, Types.PluginConfig> = { 5 6 subheader: {
+1
src/utils/storage/snippets.ts
··· 1 + import { storage } from "#imports"; 1 2 import { StorageState } from "./state.svelte"; 2 3 import type * as Types from "./types"; 3 4
+3
src/utils/storage/state.svelte.ts
··· 1 + import type { WxtStorageItem } from "#imports"; 2 + import { needsRefresh } from "./global"; 3 + 1 4 export class StorageState<T> { 2 5 public state; 3 6
+1
wxt.config.ts
··· 18 18 srcDir: "src", 19 19 outDir: "dist", 20 20 modules: ["@wxt-dev/module-svelte"], 21 + imports: false, 21 22 vite: () => ({ 22 23 plugins: [tailwindcss()], 23 24 }),