From d14280724e012cc14ff955e871e91cd738a1278f Mon Sep 17 00:00:00 2001 From: Crazypersonalph <93847055+Crazypersonalph@users.noreply.github.com> Date: Mon, 4 Dec 2023 20:50:24 +0800 Subject: [PATCH] mostly working, themes are broken, as are others. --- src/SEQTA.ts | 8 ++++---- src/background.ts | 2 +- src/seqta/ui/Loading.ts | 2 +- src/seqta/ui/colors/Manager.ts | 8 ++++---- src/seqta/utils/MessageListener.ts | 6 +++--- src/seqta/utils/StorageListener.ts | 6 +++--- tsconfig.json | 2 +- 7 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/SEQTA.ts b/src/SEQTA.ts index f2e17d16..1123df5d 100644 --- a/src/SEQTA.ts +++ b/src/SEQTA.ts @@ -2,7 +2,7 @@ import browser from 'webextension-polyfill'; import { animate, spring, stagger } from 'motion'; import Color from 'color'; -import Sortable, { AutoScroll } from 'sortablejs'; +import Sortable from 'sortablejs'; import ShortcutLinks from './seqta/content/links.json'; import MenuitemSVGKey from './seqta/content/MenuItemSVGKey.json'; @@ -20,7 +20,6 @@ import { updateBgDurations } from './seqta/ui/Animation'; import { updateAllColors } from './seqta/ui/colors/Manager'; import { appendBackgroundToUI } from './seqta/ui/ImageBackgrounds'; import { enableCurrentTheme } from './seqta/ui/Themes'; -import { info } from 'autoprefixer'; declare global { interface Window { @@ -1044,7 +1043,7 @@ export function OpenMenuOptions() { result1.then(open, onError); try { - Sortable.mount(new AutoScroll()); + Sortable.mount(new Sortable.AutoScroll()); var el = document.querySelector('#menu > ul'); var sortable = Sortable.create((el as HTMLElement), { @@ -2042,8 +2041,9 @@ function CreateUpcomingSection(assessments: any, activeSubjects: any) { } CreateFilters(activeSubjects); - + // @ts-ignore let type; + // @ts-ignore let class_; for (let i = 0; i < assessments.length; i++) { diff --git a/src/background.ts b/src/background.ts index c81b21ef..6ebe0b85 100644 --- a/src/background.ts +++ b/src/background.ts @@ -72,7 +72,7 @@ function reloadSeqtaPages() { // Helper function to handle setting permissions // Main message listener -browser.runtime.onMessage.addListener((request, sender, sendResponse: any) => { +browser.runtime.onMessage.addListener((request, sendResponse: any) => { switch (request.type) { case 'reloadTabs': reloadSeqtaPages(); diff --git a/src/seqta/ui/Loading.ts b/src/seqta/ui/Loading.ts index 62bcfafd..fbac1fbe 100644 --- a/src/seqta/ui/Loading.ts +++ b/src/seqta/ui/Loading.ts @@ -1,5 +1,5 @@ import browser from 'webextension-polyfill' -import stringToHTML from '../utils/stringToHTML.js'; +import stringToHTML from '../utils/stringToHTML'; const loadingSpinner = ` diff --git a/src/seqta/ui/colors/Manager.ts b/src/seqta/ui/colors/Manager.ts index 52f29b82..d5f57aee 100644 --- a/src/seqta/ui/colors/Manager.ts +++ b/src/seqta/ui/colors/Manager.ts @@ -1,8 +1,8 @@ import browser from 'webextension-polyfill' -import { GetThresholdOfColor, GetCSSElement } from '../../../SEQTA.js'; -import { lightenAndPaleColor } from './lightenAndPaleColor.js'; -import ColorLuminance from './ColorLuminance.js'; -import { onError } from '../../utils/onError.js'; +import { GetThresholdOfColor, GetCSSElement } from '../../../SEQTA'; +import { lightenAndPaleColor } from './lightenAndPaleColor'; +import ColorLuminance from './ColorLuminance'; +import { onError } from '../../utils/onError'; // Helper functions const setCSSVar = (varName: any, value: any) => document.documentElement.style.setProperty(varName, value); diff --git a/src/seqta/utils/MessageListener.ts b/src/seqta/utils/MessageListener.ts index d2a4b902..273eb009 100644 --- a/src/seqta/utils/MessageListener.ts +++ b/src/seqta/utils/MessageListener.ts @@ -1,14 +1,14 @@ import browser from 'webextension-polyfill' -import { MenuOptionsOpen, OpenMenuOptions, closeSettings } from '../../SEQTA.js'; -import { deleteTheme, disableTheme, downloadTheme, listThemes, setTheme } from '../ui/Themes.js'; +import { MenuOptionsOpen, OpenMenuOptions, closeSettings } from '../../SEQTA'; +import { deleteTheme, disableTheme, downloadTheme, listThemes, setTheme } from '../ui/Themes'; export class MessageHandler { constructor() { browser.runtime.onMessage.addListener(this.routeMessage.bind(this)); } - routeMessage(request: any, sender: any, sendResponse: any) { + routeMessage(request: any, sendResponse: any) { switch (request.info) { case 'EditSidebar': diff --git a/src/seqta/utils/StorageListener.ts b/src/seqta/utils/StorageListener.ts index 92b3ec22..48b07709 100644 --- a/src/seqta/utils/StorageListener.ts +++ b/src/seqta/utils/StorageListener.ts @@ -8,9 +8,9 @@ import { addShortcuts, disableNotificationCollector, enableNotificationCollector, -} from '../../SEQTA.js'; -import { updateBgDurations } from '../ui/Animation.js'; -import { getDarkMode, updateAllColors } from '../ui/colors/Manager.js'; +} from '../../SEQTA'; +import { updateBgDurations } from '../ui/Animation'; +import { getDarkMode, updateAllColors } from '../ui/colors/Manager'; export default class StorageListener { diff --git a/tsconfig.json b/tsconfig.json index 3478d378..3000138d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -18,6 +18,6 @@ "strict": true, "noUnusedLocals": true, "noUnusedParameters": true, - "noFallthroughCasesInSwitch": true + "noFallthroughCasesInSwitch": true, }, }