From e7c5357c64678e30d9c12f7295864314926419ab Mon Sep 17 00:00:00 2001 From: Andrew R Date: Tue, 1 Apr 2025 06:47:49 +1030 Subject: [PATCH 01/23] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 9c587272..5f6faca1 100644 --- a/README.md +++ b/README.md @@ -116,6 +116,8 @@ Just remember, in order to update changes to the extension if you are running in The folder structure is as follows: - The `src` folder contains source files that are compiled to the build directory. +- +- The `src/plugins` folder contains vital loaders required for BetterSEQTA+ functionality. - The `src/interface` folder contains source React & Svelte files that are required for the Settings page. From 0bf4ed815771d82be4d13b2da97a8c72ac798b2c Mon Sep 17 00:00:00 2001 From: SethBurkart123 Date: Thu, 3 Apr 2025 13:05:33 +1100 Subject: [PATCH 02/23] fix: handle failed sortmessagepageitems --- src/plugins/monofile.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/plugins/monofile.ts b/src/plugins/monofile.ts index d5edc083..2657a111 100644 --- a/src/plugins/monofile.ts +++ b/src/plugins/monofile.ts @@ -330,8 +330,12 @@ async function handleMessages(node: Element): Promise { const element = document.getElementById("title")!.firstChild as HTMLElement element.innerText = "Direct Messages" document.title = "Direct Messages ― SEQTA Learn" - SortMessagePageItems(node) - + try { + SortMessagePageItems(node) + } catch (error) { + console.error("Error sorting message page items:", error) + } + if (!settingsState.animations) return // Hides messages on page load From 363fbfa3c8a3bfc4ed0a9802020e350e249f5e1a Mon Sep 17 00:00:00 2001 From: SethBurkart123 Date: Thu, 3 Apr 2025 14:35:06 +1100 Subject: [PATCH 03/23] fix: dynamic seqta classes failing to load #248 --- src/css/injected.scss | 208 +++++++++--------- src/css/injected/transparency.scss | 14 +- .../built-in/assessmentsAverage/index.ts | 63 ++++-- .../built-in/notificationCollector/index.ts | 6 +- src/plugins/monofile.ts | 28 +-- src/seqta/ui/dev/hideSensitiveContent.ts | 12 +- src/seqta/utils/listeners/ClickListeners.ts | 12 +- 7 files changed, 186 insertions(+), 157 deletions(-) diff --git a/src/css/injected.scss b/src/css/injected.scss index 8b6042e3..1d1faf1f 100644 --- a/src/css/injected.scss +++ b/src/css/injected.scss @@ -147,7 +147,7 @@ html { border-radius: 17px 17px 0px 0 !important; color: var(--text-color) !important; } -.LegacyModuleBody__LegacyModule___20YE2 { +[class*="LegacyModuleBody__LegacyModule___"] { background: transparent; } #AddedSettings { @@ -192,17 +192,17 @@ html { } } -.PillBox__PillBox___3GjAk { +[class*="PillBox__PillBox___"] { border-radius: 16px; overflow: hidden; - .PillBox__active___3Qpi9 { + [class*="PillBox__active___"] { background: rgba(0, 0, 0, 0.2) !important; color: black !important; } } -.dark .PillBox__active___3Qpi9 { +.dark [class*="PillBox__active___"] { color: white; } @@ -386,8 +386,7 @@ ul.magicDelete > li.deleting { width: 28px !important; height: 28px !important; } -.notifications__items___2hCdv, -#menu ul { +[class*="notifications__items___"] { -ms-overflow-style: none !important; scrollbar-width: none !important; &::-webkit-scrollbar { @@ -471,7 +470,7 @@ html { [data-type="student"] .header { color: black !important; } -ol:has(.MessageList__avatar___2wxyb svg) { +ol:has([class*="MessageList__avatar___"] svg) { transition-duration: 150ms !important; transition-delay: 0ms !important; } @@ -497,7 +496,7 @@ ol:has(.MessageList__avatar___2wxyb svg) { background: var(--background-primary) !important; border-radius: 16px; } -.MessageList__MessageList___3DxoC .footer { +[class*="MessageList__MessageList___"] .footer { background: var(--background-secondary) !important; } .listWrapper { @@ -759,15 +758,15 @@ ol > [data-label] { margin-left: 4px; margin-bottom: 4px; } -.Message__Message___3oJaU > .uiFrameWrapper .iframeWrapper { +[class*="Message__Message___"] > .uiFrameWrapper .iframeWrapper { background: transparent; } -.Viewer__newMessage___3ToUb { +[class*="Viewer__newMessage___"] { border-radius: 8px !important; font-size: 12.8px !important; background: var(--background-primary) !important; } -.MessageList__sender___32riy :last-child { +[class*="MessageList__sender___"] :last-child { white-space: nowrap; } [data-type="student"] [style="z-index: 30;"] .header:has(h1) { @@ -866,7 +865,7 @@ div > ol:has(.uiFileHandlerWrapper) { } @media (max-width: 1200px) { - .LabelList__LabelList___2RJFf > li { + [class*="LabelList__LabelList___"] > li { border-radius: 8px !important; } } @@ -886,10 +885,10 @@ div > ol:has(.uiFileHandlerWrapper) { .welcome > .portalPageView > .powerPortalPage - > .Body__body___3pGxr - > .Container__container___33GlY - > .Document__document___1KJCG - > .Canvas__canvas___OBdCZ { + > [class*="Body__body___"] + > [class*="Container__container___"] + > [class*="Document__document___"] + > [class*="Canvas__canvas___"] { background-color: unset !important; background-image: unset !important; background-size: unset; @@ -899,7 +898,7 @@ div > ol:has(.uiFileHandlerWrapper) { height: 100vh; color: var(--text-primary) !important; } -.Module__wrapper___2sbOo { +[class*="Module__wrapper___"] { overflow: clip; background: var(--background-primary) !important; border-radius: 16px !important; @@ -911,10 +910,10 @@ div > ol:has(.uiFileHandlerWrapper) { overflow: hidden; } .composer - > .Body__body___3pGxr - > .Container__container___33GlY - > .Document__document___1KJCG - > .Canvas__canvas___OBdCZ { + > [class*="Body__body___"] + > [class*="Container__container___"] + > [class*="Document__document___"] + > [class*="Canvas__canvas___"] { background-color: transparent !important; background-image: unset !important; color: white !important; @@ -1174,7 +1173,7 @@ div > ol:has(.uiFileHandlerWrapper) { box-shadow: inset 0px 5px 20px 1px rgba(0, 0, 0, 0.3); background: var(--background-primary); } -.Empty__Empty___2F6rn { +[class*="Empty__Empty___"] { color: var(--text-primary); } .shortcut-container { @@ -1376,18 +1375,18 @@ div > ol:has(.uiFileHandlerWrapper) { margin: 20px auto 0px; cursor: pointer; } -.dark .notifications__detailsBody___2nU2k > .notifications__subtitle___1se8e { +.dark [class*="notifications__detailsBody___"] > [class*="notifications__subtitle___"] { color: #c1bcbc; } -.notifications__detailsBody___2nU2k > .notifications__subtitle___1se8e { +[class*="notifications__detailsBody___"] > [class*="notifications__subtitle___"] { font-size: 12px; } -.notifications__notifications___3mmLY.notifications__hasItems___gXxzx > button { +[class*="notifications__notifications___"] > button { background: white; z-index: 21 !important; color: var(--better-sub); } -.notifications__notifications___3mmLY > button { +[class*="notifications__notifications___"] > button { padding: 8px; } .legacy-root button > svg, @@ -1395,9 +1394,7 @@ div > ol:has(.uiFileHandlerWrapper) { height: 25px; width: 24px; } -.notifications__notifications___3mmLY - > button - > .notifications__bubble___1EkSQ { +[class*="notifications__notifications___"] > button > [class*="notifications__bubble___"] { background: var(--better-alert-highlight); width: 25px; height: 25px; @@ -1415,16 +1412,16 @@ div > ol:has(.uiFileHandlerWrapper) { .legacy-root button:not([disabled]):focus { border-color: var(--better-sub); } -.notifications__list___rp2L2 { +[class*="notifications__list___"] { border: 4px solid var(--auto-background); background: var(--background-primary); } -.notifications__item___2ErJN { +[class*="notifications__item___"] { background: var(--background-primary) !important; border-left: 4px solid var(--better-main) !important; margin-bottom: 4px !important; - > .notifications__dismiss___zveKV { + > [class*="notifications__dismiss___"] { background: rgba(0, 0, 0, 0.1) !important; color: var(--text-primary); margin: auto 0; @@ -1449,7 +1446,7 @@ div > ol:has(.uiFileHandlerWrapper) { #menu li:first-child { margin-top: 5px; } -.notifications__actions___1UX7r { +[class*="notifications__actions___"] { background: var(--auto-background); button { @@ -1457,27 +1454,27 @@ div > ol:has(.uiFileHandlerWrapper) { border: 1px solid white; } } -.notifications__items___2hCdv { +[class*="notifications__items___"] { border-bottom: none; height: 540px; display: flex; flex-direction: column; } -.notifications__details___193F4 { +[class*="notifications__details___"] { max-width: 80%; overflow: clip; } -.notifications__details___193F4 div { +[class*="notifications__details___"] div { text-overflow: ellipsis; } #main > .messages { color: var(--text-primary); } -.Overview__details___2Zlnr { +[class*="Overview__details___"] { border-radius: 16px; overflow: hidden; } -.Viewer__sidebar___1Btu4 { +[class*="Viewer__sidebar___"] { color: var(--text-primary); border-right: unset; background: unset; @@ -1486,14 +1483,14 @@ div > ol:has(.uiFileHandlerWrapper) { background: unset; } } -.MessageList__MessageList___3DxoC ::-webkit-scrollbar { +[class*="MessageList__MessageList___"] ::-webkit-scrollbar { width: 0px; background: none; } -.MessageList__primary___1zTHa > :last-child { +[class*="MessageList__primary___"] > :last-child { display: none !important; } -.MessageList__MessageList___3DxoC ol .Button__Button___3SRFo::before { +[class*="MessageList__MessageList___"] ol [class*="Button__Button___"]::before { // plus icon content: ""; font-size: 12px; @@ -1502,7 +1499,7 @@ div > ol:has(.uiFileHandlerWrapper) { pointer-events: none; } -.MessageList__MessageList___3DxoC ol .Button__Button___3SRFo { +[class*="MessageList__MessageList___"] ol [class*="Button__Button___"] { width: calc(100% - 32px); border-radius: 16px; margin: 8px 16px; @@ -1511,21 +1508,21 @@ div > ol:has(.uiFileHandlerWrapper) { text-align: center; } -.dark .MessageList__MessageList___3DxoC .Button__Button___3SRFo { +.dark [class*="MessageList__MessageList___"] [class*="Button__Button___"] { background: rgba(255, 255, 255, 0.1); color: white !important; } -.MessageList__MessageList___3DxoC .Button__Button___3SRFo { +[class*="MessageList__MessageList___"] [class*="Button__Button___"] { background: rgba(0, 0, 0, 0.1); width: 100%; min-height: 32px; text-align: center; } -.MessageList__MessageList___3DxoC { +[class*="MessageList__MessageList___"] { background: var(--background-primary); } -.Input__Input___3RSTI::before, +[class*="Input__Input___"]::before, .ais-btnSearch::before { content: ""; /* Unicode for the search icon */ @@ -1537,7 +1534,7 @@ div > ol:has(.uiFileHandlerWrapper) { font-family: "IconFamily"; pointer-events: none; } -.Input__Input___3RSTI { +[class*="Input__Input___"] { transition: background-color 0.5s, border-color 0.5s; @@ -1562,15 +1559,15 @@ div > ol:has(.uiFileHandlerWrapper) { height: 180px; background: var(--background-primary); } -.Avatar__Avatar___gE5kx.Avatar__staff___4gVLs { +[class*="Avatar__Avatar___"][class*="Avatar__staff___"] { --person-colour: var(--better-light); background: var(--person-colour, var(--navy)); } -.LabelList__LabelList___2RJFf > li.LabelList__selected___3Egk7 { +[class*="LabelList__LabelList___"] > li[class*="LabelList__selected___"] { background: var(--background-primary); color: var(--text-primary); } -.Message__Message___3oJaU { +[class*="Message__Message___"] { background: var(--background-primary); border-radius: 16px !important; } @@ -1590,31 +1587,31 @@ iframe.userHTML { background: var(--better-light); color: var(--text-color); } -.Spinner__Spinner___CStEb > svg { +[class*="Spinner__Spinner___"] > svg { margin: 16px 0; } -.Spinner__Spinner___CStEb > svg > path { +[class*="Spinner__Spinner___"] > svg > path { stroke: var(--text-primary) !important; } #main > .reports > .item > .report > .term { color: var(--text-color); background: var(--better-main); } -.Collapsible__Collapsible___3O8P3 > .Collapsible__header___-Afvq { - background: none; +[class*="Collapsible__Collapsible___"] > [class*="Collapsible__header__"] { + background: none !important; } -.Collapsible__Collapsible___3O8P3 - > .Collapsible__content___2c6of.Collapsible__enterActive___3b2ow, -.Collapsible__Collapsible___3O8P3 - > .Collapsible__content___2c6of.Collapsible__exitActive___3rFL1 { +[class*="Collapsible__Collapsible___"] + > [class*="Collapsible__content___"] + [class*="Collapsible__enterActive___"] + [class*="Collapsible__exitActive___"] { animation-timing-function: ease-out !important; } -.AssessmentList__AssessmentList___1GdCl - > .AssessmentList__searchFilter___3N70o - + .AssessmentList__items___3LcmQ { +[class*="AssessmentList__AssessmentList___"] + > [class*="AssessmentList__searchFilter___"] + + [class*="AssessmentList__items___"] { color: var(--text-primary); } -.Thermoscore__Thermoscore___2tWMi { +[class*="Thermoscore__Thermoscore___"] { background-image: unset; background: var(--auto-background); } @@ -1701,33 +1698,31 @@ ul { #userActions > .details > .code { text-transform: initial; } -.SelectedAssessment__SelectedAssessment___3Bu5D { +[class*="SelectedAssessment__SelectedAssessment___"] { color: var(--text-primary); } -.SelectedAssessment__SelectedAssessment___3Bu5D - > .SelectedAssessment__meta___1gq_y - > .SelectedAssessment__clearBtn___21D85 { +[class*="SelectedAssessment__SelectedAssessment___"] + > [class*="SelectedAssessment__meta___"] + > [class*="SelectedAssessment__clearBtn___"] { background: var(--better-main); } -.SelectedAssessment__SelectedAssessment___3Bu5D - > .SelectedAssessment__meta___1gq_y { +[class*="SelectedAssessment__SelectedAssessment___"] + > [class*="SelectedAssessment__meta___"] { border-bottom: 1px solid var(--better-main); } -.TabSet__TabSet___Vo-SZ - > ol.TabSet__tabs___1RRZk - > li.TabSet__selected___1psfF { +[class*="TabSet__TabSet___"] > ol[class*="TabSet__tabs___"] > li[class*="TabSet__selected___"] { border-bottom-color: var(--better-main); } -.TabSet__TabSet___Vo-SZ > ol.TabSet__tabs___1RRZk { +[class*="TabSet__TabSet___"] > ol[class*="TabSet__tabs___"] { border-bottom: none; } -.TabSet__TabSet___Vo-SZ > ol.TabSet__tabs___1RRZk > li:hover { +[class*="TabSet__TabSet___"] > ol[class*="TabSet__tabs___"] > li:hover { box-shadow: inset 0 -1px var(--better-main); } -.TabSet__TabSet___Vo-SZ > .TabSet__tabContainer___3iIRe { +[class*="TabSet__TabSet___"] > [class*="TabSet__tabContainer___"] { background: unset; } -.BasicPanel__BasicPanel___1GP6s { +[class*="BasicPanel__BasicPanel___"] { background: var(--background-primary); } .back > svg { @@ -1751,25 +1746,25 @@ ul { } .mediaWrapper, .mediaRecorder, -.MediaRecorder__MediaRecorder___2c2_M { +[class*="MediaRecorder__MediaRecorder___"] { border-top-left-radius: 16px; border-top-right-radius: 16px; overflow: hidden; } -.MediaRecorder__MediaRecorder___2c2_M { +[class*="MediaRecorder__MediaRecorder___"] { background: var(--background-primary); } .legacy-root .uiFileHandler { background: var(--auto-background); border-radius: 16px; } -.ResourceList__ResourceList___2z-c1 .legacy-root .uiFileHandler { +[class*="ResourceList__ResourceList___"] .legacy-root .uiFileHandler { background: var(--background-primary); } .legacy-root .uiFileHandler.dragTarget { background: var(--better-main); } -.MenuButton__MenuPanel___2q42B { +[class*="MenuButton__MenuPanel___"] { background: var(--background-primary); color: var(--text-primary); border-radius: 16px; @@ -1897,11 +1892,13 @@ div.entry.class[style*="width: 46.5%"] { .sources .uiButton { border-radius: 16px; } -.MediaRecorder__preview___1hQqY, -.MediaRecorder__actions___3Jjvp { +[class*="MediaRecorder__preview___"] { background: var(--background-primary); } -.Rubric__Rubric___2AAKS > .Rubric__line___JCC3Y { +[class*="MediaRecorder__actions___"] { + background: var(--background-primary); +} +[class*="Rubric__Rubric___"] > [class*="Rubric__line___"] { background: unset; } #main > .course > .content > .header > .coverImage.blurred { @@ -2019,8 +2016,8 @@ div.bar.flat { border-radius: 16px !important; opacity: 0; } -.document-width-micro .RootModule__root-module___2wT52, -.document-width-nano .RootModule__root-module___2wT52 { +.document-width-micro [class*="RootModule__root-module___"], +.document-width-nano [class*="RootModule__root-module___"] { padding: 16px; box-sizing: border-box; } @@ -2148,7 +2145,7 @@ body { padding: 3px; transition: opacity 0.2s ease-in-out; } -.Viewer__Viewer___32BH- { +[class*="Viewer__Viewer___"] { background: unset; } .weekend { @@ -2167,16 +2164,16 @@ body { display: none; } -li.MessageList__unread___3imtO { +[class*="MessageList__unread___"] { position: relative; background: rgb(228 225 225); } -.dark li.MessageList__unread___3imtO { +.dark [class*="MessageList__unread___"] { background: rgba(0, 0, 0, 0.1); } -.MessageList__MessageList___3DxoC > ol > li:hover { +[class*="MessageList__MessageList___"] > ol > li:hover { background: var(--theme-offset-bg-more); } @@ -2184,18 +2181,17 @@ li.MessageList__unread___3imtO { border-radius: 1600px; } -.MessageList__MessageList___3DxoC - > ol - > li.MessageList__selected___1SJNz.MessageList__unread___3imtO { +[class*="MessageList__MessageList___"] > ol > li[class*="MessageList__selected___"] + [class*="MessageList__unread___"] { box-shadow: none; } -.Message__Message___3oJaU.Message__unread___23XIq > header { +[class*="Message__Message___"] [class*="Message__unread___"] > header { box-shadow: none; } -.MessageList__MessageList___3DxoC > ol > li.MessageList__unread___3imtO::before, -.MessageList__MessageList___3DxoC > ol > li::before { +[class*="MessageList__MessageList___"] > ol > li[class*="MessageList__unread___"]::before, +[class*="MessageList__MessageList___"] > ol > li::before { content: ""; position: absolute; top: 0; @@ -2206,9 +2202,7 @@ li.MessageList__unread___3imtO { transition: width 0.1s; } -.MessageList__MessageList___3DxoC - > ol - > li.MessageList__unread___3imtO::before { +[class*="MessageList__MessageList___"] > ol > li[class*="MessageList__unread___"]::before { width: 3px; } .connectedNotificationsWrapper > div > button { @@ -2283,13 +2277,13 @@ li.MessageList__unread___3imtO { } .dark - .MessageList__MessageList___3DxoC + [class*="MessageList__MessageList___"] > ol - > li.MessageList__selected___1SJNz { + > li[class*="MessageList__selected___"] { background: var(--background-secondary); } -.MessageList__MessageList___3DxoC > ol > li.MessageList__selected___1SJNz { +[class*="MessageList__MessageList___"] > ol > li[class*="MessageList__selected___"] { background: rgb(228 225 225); color: var(--text-primary); } @@ -2426,14 +2420,14 @@ li.MessageList__unread___3imtO { animation: spin 3s linear infinite; -moz-animation: spin 3s linear infinite; } -.dark .LabelList__name___-CHgq { +.dark [class*="LabelList__name___"] { text-shadow: 0 0 5px black; } -.LabelList__name___-CHgq { +[class*="LabelList__name___"] { display: flex; align-items: center; } -[data-label="inbox"] > .LabelList__name___-CHgq::before { +[data-label="inbox"] > [class*="LabelList__name___"]::before { content: "\eb70"; /* Unicode for the search icon */ color: currentColor; @@ -2443,7 +2437,7 @@ li.MessageList__unread___3imtO { font-family: "IconFamily"; pointer-events: none; } -[data-label="outbox"] > .LabelList__name___-CHgq::before { +[data-label="outbox"] > [class*="LabelList__name___"]::before { content: "\eca6"; /* Unicode for the search icon */ color: currentColor; @@ -2453,7 +2447,7 @@ li.MessageList__unread___3imtO { font-family: "IconFamily"; pointer-events: none; } -[data-label="starred"] > .LabelList__name___-CHgq::before { +[data-label="starred"] > [class*="LabelList__name___"]::before { content: "\ece8"; color: currentColor; font-size: 16px; @@ -2462,7 +2456,7 @@ li.MessageList__unread___3imtO { font-family: "IconFamily"; pointer-events: none; } -[data-label="trash"] > .LabelList__name___-CHgq::before { +[data-label="trash"] > [class*="LabelList__name___"]::before { content: "\ed2c"; /* Unicode for the search icon */ color: currentColor; @@ -2772,7 +2766,7 @@ li.MessageList__unread___3imtO { } } -.MessageList__MessageList___3DxoC > header { +[class*="MessageList__MessageList___"] > header { display: flex; justify-content: space-between; } diff --git a/src/css/injected/transparency.scss b/src/css/injected/transparency.scss index d7423e01..0aa5f270 100644 --- a/src/css/injected/transparency.scss +++ b/src/css/injected/transparency.scss @@ -11,7 +11,7 @@ html.transparencyEffects:not(.dark) { html.transparencyEffects { /* Background Fixes */ - .notifications__item___2ErJN, + [class*="notifications__item___"], #shortcuts { backdrop-filter: unset !important; } @@ -24,21 +24,21 @@ html.transparencyEffects { /* Blurs */ .draggable, .notice, - .BasicPanel__BasicPanel___1GP6s, + [class*="BasicPanel__BasicPanel___"], .message.addMessage, .singleSelect, .uiFileHandlerPanel, - .Module__wrapper___2sbOo, - .notifications__list___rp2L2, + [class*="Module__wrapper___"], + [class*="notifications__list___"], .thread, .calendar, .navigator, #title, - .LabelList__selected___3Egk7, + [class*="LabelList__selected___"], .buttonChecklist, .pane, .legacy-root button, .legacy-root a, - .MessageList__MessageList___3DxoC { + [class*="MessageList__MessageList___"] { backdrop-filter: blur(80px); } @@ -47,7 +47,7 @@ html.transparencyEffects { } .whatsnewContainer, - .Message__Message___3oJaU { + [class*="Message__Message___"] { backdrop-filter: blur(50px); } diff --git a/src/plugins/built-in/assessmentsAverage/index.ts b/src/plugins/built-in/assessmentsAverage/index.ts index 55bfd0c7..10bba6b5 100644 --- a/src/plugins/built-in/assessmentsAverage/index.ts +++ b/src/plugins/built-in/assessmentsAverage/index.ts @@ -29,17 +29,51 @@ const assessmentsAveragePlugin: Plugin = { run: async (api) => { api.seqta.onMount(".assessmentsWrapper", async () => { + // Wait for any assessment item to load first await waitForElm( - "#main > .assessmentsWrapper .assessments .AssessmentItem__AssessmentItem___2EZ95", + "#main > .assessmentsWrapper .assessments [class*='AssessmentItem__AssessmentItem___']", true, 10, 1000 - ) + ); - const assessmentsList = document.querySelector("#main > .assessmentsWrapper .assessments .AssessmentList__items___3LcmQ"); + // Helper function to find actual class names by their base pattern + const getClassByPattern = (element: Element | Document, basePattern: string): string => { + // Find all classes on the element + const classes = Array.from(element.querySelectorAll('*')) + .flatMap(el => Array.from(el.classList)) + .filter(className => className.startsWith(basePattern)); + + return classes.length ? classes[0] : ''; + }; + + // Find actual class names from the DOM + const sampleAssessmentItem = document.querySelector("[class*='AssessmentItem__AssessmentItem___']"); + if (!sampleAssessmentItem) return; + + // Extract all necessary class patterns from a sample assessment item + const assessmentItemClass = Array.from(sampleAssessmentItem.classList) + .find(c => c.startsWith('AssessmentItem__AssessmentItem___')) || ''; + + const metaContainerClass = getClassByPattern(sampleAssessmentItem, 'AssessmentItem__metaContainer___'); + const metaClass = getClassByPattern(sampleAssessmentItem, 'AssessmentItem__meta___'); + const simpleResultClass = getClassByPattern(sampleAssessmentItem, 'AssessmentItem__simpleResult___'); + const titleClass = getClassByPattern(sampleAssessmentItem, 'AssessmentItem__title___'); + + // Get Thermoscore classes + const thermoscoreElement = document.querySelector("[class*='Thermoscore__Thermoscore___']"); + if (!thermoscoreElement) return; + + const thermoscoreClass = Array.from(thermoscoreElement.classList) + .find(c => c.startsWith('Thermoscore__Thermoscore___')) || ''; + const fillClass = getClassByPattern(thermoscoreElement, 'Thermoscore__fill___'); + const textClass = getClassByPattern(thermoscoreElement, 'Thermoscore__text___'); + + // Find assessment list + const assessmentsList = document.querySelector("#main > .assessmentsWrapper .assessments [class*='AssessmentList__items___']"); if (!assessmentsList) return; - const gradeElements = document.querySelectorAll(".Thermoscore__text___1NdvB"); + const gradeElements = document.querySelectorAll("[class*='Thermoscore__text___']"); if (!gradeElements.length) return; // Parse and average grades @@ -87,21 +121,22 @@ const assessmentsAveragePlugin: Plugin = { const display = api.settings.lettergrade ? letterAvg : `${avg.toFixed(2)}%`; // Prevent duplicate - const existing = assessmentsList.querySelector(".AssessmentItem__title___2bELn"); + const existing = assessmentsList.querySelector(`[class*='AssessmentItem__title___']`); if (existing?.textContent === "Subject Average") return; + // Use the dynamic class names in the HTML template const averageElement = stringToHTML(/* html */ ` -
-
-
-
-
Subject Average
+
+
+
+
+
Subject Average
-
-
-
${display}
+
+
+
${display}
@@ -112,4 +147,4 @@ const assessmentsAveragePlugin: Plugin = { } }; -export default assessmentsAveragePlugin; +export default assessmentsAveragePlugin; \ No newline at end of file diff --git a/src/plugins/built-in/notificationCollector/index.ts b/src/plugins/built-in/notificationCollector/index.ts index 880cb03a..078c4047 100644 --- a/src/plugins/built-in/notificationCollector/index.ts +++ b/src/plugins/built-in/notificationCollector/index.ts @@ -23,7 +23,7 @@ const notificationCollectorPlugin: Plugin<{}, NotificationCollectorStorage> = { const checkNotifications = async () => { try { - const alertDiv = document.querySelector(".notifications__bubble___1EkSQ") as HTMLElement; + const alertDiv = document.querySelector("[class*='notifications__bubble___']") as HTMLElement; if (api.storage.lastNotificationCount !== 0) { alertDiv.textContent = api.storage.lastNotificationCount.toString(); @@ -67,7 +67,7 @@ const notificationCollectorPlugin: Plugin<{}, NotificationCollectorStorage> = { if (pollInterval) { window.clearInterval(pollInterval); pollInterval = null; - const alertDiv = document.querySelector(".notifications__bubble___1EkSQ") as HTMLElement; + const alertDiv = document.querySelector("[class*='notifications__bubble___']") as HTMLElement; if (alertDiv) { if (api.storage.lastNotificationCount > 9) { alertDiv.textContent = "9+"; @@ -78,7 +78,7 @@ const notificationCollectorPlugin: Plugin<{}, NotificationCollectorStorage> = { } }; - api.seqta.onMount(".notifications__bubble___1EkSQ", (_) => { + api.seqta.onMount("[class*='notifications__bubble___']", (_) => { startPolling(); }); diff --git a/src/plugins/monofile.ts b/src/plugins/monofile.ts index 2657a111..1ca42ad6 100644 --- a/src/plugins/monofile.ts +++ b/src/plugins/monofile.ts @@ -178,15 +178,19 @@ function applyDarkModeToIframe( } function SortMessagePageItems(messagesParentElement: any) { - let filterbutton = document.createElement("div") - filterbutton.classList.add("messages-filterbutton") - filterbutton.innerText = "Filter" - - let header = document.getElementsByClassName( - "MessageList__MessageList___3DxoC", - )[0].firstChild as HTMLElement - header.append(filterbutton) - messagesParentElement + try { + let filterbutton = document.createElement("div") + filterbutton.classList.add("messages-filterbutton") + filterbutton.innerText = "Filter" + + let header = document.querySelector( + "[class*='MessageList__MessageList___']", + ) as HTMLElement + header.append(filterbutton) + messagesParentElement + } catch (error) { + console.error("Error sorting message page items:", error) + } } async function LoadPageElements(): Promise { @@ -330,11 +334,7 @@ async function handleMessages(node: Element): Promise { const element = document.getElementById("title")!.firstChild as HTMLElement element.innerText = "Direct Messages" document.title = "Direct Messages ― SEQTA Learn" - try { - SortMessagePageItems(node) - } catch (error) { - console.error("Error sorting message page items:", error) - } + SortMessagePageItems(node) if (!settingsState.animations) return diff --git a/src/seqta/ui/dev/hideSensitiveContent.ts b/src/seqta/ui/dev/hideSensitiveContent.ts index f86c859a..5400aa9c 100644 --- a/src/seqta/ui/dev/hideSensitiveContent.ts +++ b/src/seqta/ui/dev/hideSensitiveContent.ts @@ -77,26 +77,26 @@ const contentConfig: ContentConfig = { }, messageSubject: { - selector: '.MessageList__subject___1NV5O', + selector: '[class*="MessageList__subject___"]', action: (element) => { element.textContent = getRandomElement(mockData.messages.subjects); } }, messageSender: { - selector: '.MessageList__value___1sN24', + selector: '[class*="MessageList__value___"]', action: (element) => { element.textContent = getRandomElement(mockData.messages.sender); } }, messageRecipients: { - selector: '.MessageList__recipients___3hqpE .MessageList__value___1sN24', + selector: '[class*="MessageList__recipients___"] [class*="MessageList__value___"]', action: (element) => { element.textContent = 'Recipient(s) Redacted'; } }, messageDate: { - selector: '.MessageList__date___7muMb', + selector: '[class*="MessageList__date___"]', action: (element) => { element.textContent = getRandomDate().toLocaleDateString('en-US', { weekday: 'long', day: 'numeric', month: 'long' }); } }, avatarImage: { - selector: '.Avatar__Avatar___gE5kx', + selector: '[class*="Avatar__Avatar___"]', action: (element) => { if (element instanceof HTMLElement) { element.style.removeProperty('background-image'); @@ -105,7 +105,7 @@ const contentConfig: ContentConfig = { } }, notificationCount: { - selector: '.notifications__bubble___1EkSQ', + selector: '[class*="notifications__bubble___"]', action: (element) => { element.textContent = Math.floor(Math.random() * 100).toString(); } }, schoolName: { diff --git a/src/seqta/utils/listeners/ClickListeners.ts b/src/seqta/utils/listeners/ClickListeners.ts index b3972d0c..ea7baaa0 100644 --- a/src/seqta/utils/listeners/ClickListeners.ts +++ b/src/seqta/utils/listeners/ClickListeners.ts @@ -2,13 +2,13 @@ import { waitForElm } from "@/seqta/utils/waitForElm" import ReactFiber from "../ReactFiber"; const handleNotificationClick = async (target: HTMLElement) => { - const notificationItem = target.closest('.notifications__item___2ErJN') as HTMLElement | null; + const notificationItem = target.closest('[class*="notifications__item___"]') as HTMLElement | null; if (!notificationItem) return; const buttonType = notificationItem.getAttribute('data-type'); if (buttonType !== 'message') return; - const notificationList = await ReactFiber.find('.notifications__list___rp2L2').getState(); + const notificationList = await ReactFiber.find('[class*="notifications__list___"]').getState(); const buttonId = notificationItem.getAttribute('data-id'); if (!buttonId) return; @@ -16,19 +16,19 @@ const handleNotificationClick = async (target: HTMLElement) => { (item: any) => item.notificationID === parseInt(buttonId) ); - await waitForElm('.Viewer__Viewer___32BH-', true, 20); + await waitForElm('[class*="Viewer__Viewer___"] > div', true, 20); // Select the specific direct message - ReactFiber.find('.Viewer__Viewer___32BH-').setState({ selected: new Set([matchingNotification.message.messageID]) }); + ReactFiber.find('[class*="Viewer__Viewer___"] > div').setState({ selected: new Set([matchingNotification.message.messageID]) }); // Close the notifications panel - const notificationButton = document.querySelector('.notifications__notifications___3mmLY > button') as HTMLButtonElement | null; + const notificationButton = document.querySelector('[class*="notifications__notifications___"] > button') as HTMLButtonElement | null; notificationButton?.click(); }; const clickListeners = [ { - selector: '.notifications__item___2ErJN', + selector: '[class*="notifications__item___"]', handler: handleNotificationClick, }, ]; From 048ccb248e5839f6ff3c43580c4fab0be8f11822 Mon Sep 17 00:00:00 2001 From: SethBurkart123 Date: Thu, 3 Apr 2025 14:43:07 +1100 Subject: [PATCH 04/23] fix: builds running incorrectly --- src/seqta/utils/Whatsnew.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/seqta/utils/Whatsnew.ts b/src/seqta/utils/Whatsnew.ts index d509c907..5d77581f 100644 --- a/src/seqta/utils/Whatsnew.ts +++ b/src/seqta/utils/Whatsnew.ts @@ -61,6 +61,7 @@ export function OpenWhatsNewPopup() { let text = stringToHTML(/* html */ `

3.4.6 - Massive internal reworks!

+
  • Fix SEQTA classes not being applied correctly causing a totally broken experience
  • Reworked internals to function as a plugin system (more on this soon)
  • Rebuilt theme system that is significantly less buggy
  • Performance improvements
  • @@ -259,7 +260,7 @@ export function OpenWhatsNewPopup() {
    From 45a16de40518c04432c17ddcabf95d799b36f41e Mon Sep 17 00:00:00 2001 From: SethBurkart123 Date: Thu, 3 Apr 2025 22:24:25 +1100 Subject: [PATCH 05/23] fix: storage always resetting to default --- src/SEQTA.ts | 3 +++ src/seqta/main.ts | 3 --- src/seqta/utils/listeners/SettingsState.ts | 4 +++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/SEQTA.ts b/src/SEQTA.ts index 567ddb99..c0640c08 100644 --- a/src/SEQTA.ts +++ b/src/SEQTA.ts @@ -1,4 +1,5 @@ import { + initializeSettingsState, settingsState, } from "@/seqta/utils/listeners/SettingsState" import documentLoadCSS from "@/css/documentload.scss?inline" @@ -38,6 +39,8 @@ async function init() { icon.href = icon48 // Change the icon try { + await initializeSettingsState() + if (typeof settingsState.onoff === "undefined") { browser.runtime.sendMessage({ type: "setDefaultStorage" }) } diff --git a/src/seqta/main.ts b/src/seqta/main.ts index 647172bd..af82f324 100644 --- a/src/seqta/main.ts +++ b/src/seqta/main.ts @@ -3,7 +3,6 @@ import browser from "webextension-polyfill" // Internal utilities and functions import { - initializeSettingsState, settingsState, } from "@/seqta/utils/listeners/SettingsState" @@ -16,8 +15,6 @@ import injectedCSS from "@/css/injected.scss?inline" export async function main() { return new Promise(async (resolve, reject) => { try { - await initializeSettingsState() - if (settingsState.onoff) { injectPageState() diff --git a/src/seqta/utils/listeners/SettingsState.ts b/src/seqta/utils/listeners/SettingsState.ts index a2f6968f..04b42a7f 100644 --- a/src/seqta/utils/listeners/SettingsState.ts +++ b/src/seqta/utils/listeners/SettingsState.ts @@ -70,7 +70,9 @@ class StorageManager { private async loadFromStorage(): Promise { const result = await browser.storage.local.get(); - this.data = { ...this.data, ...result }; + Object.entries(result).forEach(([key, value]) => { + Reflect.set(this.data, key, value); + }); } private async saveToStorage(): Promise { From eb2c665843393931b1a0dff1f2e006d30de65bf8 Mon Sep 17 00:00:00 2001 From: SethBurkart123 Date: Thu, 3 Apr 2025 22:28:50 +1100 Subject: [PATCH 06/23] bump(version): 3.4.6.1 + changelog --- package.json | 2 +- src/seqta/utils/Whatsnew.ts | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 3cd068bf..ea888134 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "betterseqtaplus", - "version": "3.4.6", + "version": "3.4.6.1", "type": "module", "description": "Enhance SEQTA Learn's usability and aesthetics! A fork of BetterSEQTA to continue development add add heaps more features!", "browserslist": "> 0.5%, last 2 versions, not dead", diff --git a/src/seqta/utils/Whatsnew.ts b/src/seqta/utils/Whatsnew.ts index 5d77581f..e659dcb3 100644 --- a/src/seqta/utils/Whatsnew.ts +++ b/src/seqta/utils/Whatsnew.ts @@ -60,6 +60,9 @@ export function OpenWhatsNewPopup() { let text = stringToHTML(/* html */ `
    +

    3.4.6.1 - Hot patch!

    +
  • Fixed storage not updating and sometimes being replaced with default values
  • +

    3.4.6 - Massive internal reworks!

  • Fix SEQTA classes not being applied correctly causing a totally broken experience
  • Reworked internals to function as a plugin system (more on this soon)
  • From fbf066cea8a1cf3017e8d6ed16edc98f7e0e581f Mon Sep 17 00:00:00 2001 From: SethBurkart123 Date: Sun, 6 Apr 2025 14:03:51 +1000 Subject: [PATCH 07/23] fix: sidebar layout not being applied on pageload #249 --- src/plugins/monofile.ts | 27 +- src/seqta/utils/Openers/OpenMenuOptions.ts | 457 ++++++++++--------- src/seqta/utils/Whatsnew.ts | 2 +- src/seqta/utils/listeners/MessageListener.ts | 1 - 4 files changed, 252 insertions(+), 235 deletions(-) diff --git a/src/plugins/monofile.ts b/src/plugins/monofile.ts index 1ca42ad6..da121511 100644 --- a/src/plugins/monofile.ts +++ b/src/plugins/monofile.ts @@ -465,8 +465,6 @@ export function tryLoad() { ) } - - function ReplaceMenuSVG(element: HTMLElement, svg: string) { let item = element.firstChild as HTMLElement item!.firstChild!.remove() @@ -477,10 +475,11 @@ function ReplaceMenuSVG(element: HTMLElement, svg: string) { item.insertBefore(newsvg as Node, item.firstChild) } +const processedSymbol = Symbol('processed') + export async function ObserveMenuItemPosition() { await waitForElm("#menu > ul > li") - await delay(100) - + eventManager.register( "menuList", { @@ -488,6 +487,19 @@ export async function ObserveMenuItemPosition() { }, (element: Element) => { const node = element as HTMLElement + + // Only process top-level menu items and skip everything else + if (!node.classList.contains('item') || + node.nodeName !== 'LI' || + node.parentElement?.parentElement?.id !== 'menu') { + return + } + + // Early exit if already processed + if ((element as any)[processedSymbol]) { + return + } + if (!node?.dataset?.checked && !MenuOptionsOpen) { const key = MenuitemSVGKey[node?.dataset?.key! as keyof typeof MenuitemSVGKey] @@ -511,7 +523,9 @@ export async function ObserveMenuItemPosition() { label.replaceChild(span, textNode) } } - ChangeMenuItemPositions(settingsState.menuorder) + ChangeMenuItemPositions(settingsState.menuorder); + + (element as any)[processedSymbol] = true } }, ) @@ -584,9 +598,10 @@ export function init() { if (settingsState.onoff) { console.info("[BetterSEQTA+] Enabled") - if (settingsState.DarkMode) document.documentElement.classList.add("dark") + if (settingsState.DarkMode) document.documentElement.classList.add("dark"); document.querySelector(".legacy-root")?.classList.add("hidden") + ObserveMenuItemPosition(); new StorageChangeHandler() new MessageHandler() diff --git a/src/seqta/utils/Openers/OpenMenuOptions.ts b/src/seqta/utils/Openers/OpenMenuOptions.ts index 40dd20f4..bcef5bc8 100644 --- a/src/seqta/utils/Openers/OpenMenuOptions.ts +++ b/src/seqta/utils/Openers/OpenMenuOptions.ts @@ -1,4 +1,5 @@ +import type { SettingsState } from "@/types/storage" import { settingsState } from "../listeners/SettingsState" import stringToHTML from "../stringToHTML" import Sortable from "sortablejs" @@ -7,250 +8,252 @@ export let MenuOptionsOpen = false export function OpenMenuOptions() { - var container = document.getElementById("container") - var menu = document.getElementById("menu") - - if (settingsState.defaultmenuorder.length == 0) { - let childnodes = menu!.firstChild!.childNodes - let newdefaultmenuorder = [] - for (let i = 0; i < childnodes.length; i++) { - const element = childnodes[i] + var container = document.getElementById("container") + var menu = document.getElementById("menu") + + if (settingsState.defaultmenuorder.length == 0) { + let childnodes = menu!.firstChild!.childNodes + let newdefaultmenuorder = [] + for (let i = 0; i < childnodes.length; i++) { + const element = childnodes[i] + newdefaultmenuorder.push((element as HTMLElement).dataset.key) + settingsState.defaultmenuorder = newdefaultmenuorder + } + } + let childnodes = menu!.firstChild!.childNodes + if (settingsState.defaultmenuorder.length != childnodes.length) { + for (let i = 0; i < childnodes.length; i++) { + const element = childnodes[i] + if ( + !settingsState.defaultmenuorder.indexOf( + (element as HTMLElement).dataset.key, + ) + ) { + let newdefaultmenuorder = settingsState.defaultmenuorder newdefaultmenuorder.push((element as HTMLElement).dataset.key) settingsState.defaultmenuorder = newdefaultmenuorder } } - let childnodes = menu!.firstChild!.childNodes - if (settingsState.defaultmenuorder.length != childnodes.length) { - for (let i = 0; i < childnodes.length; i++) { - const element = childnodes[i] - if ( - !settingsState.defaultmenuorder.indexOf( - (element as HTMLElement).dataset.key, - ) - ) { - let newdefaultmenuorder = settingsState.defaultmenuorder - newdefaultmenuorder.push((element as HTMLElement).dataset.key) - settingsState.defaultmenuorder = newdefaultmenuorder - } - } + } + + MenuOptionsOpen = true + + var cover = document.createElement("div") + cover.classList.add("notMenuCover") + menu!.style.zIndex = "20" + menu!.style.setProperty("--menuHidden", "flex") + container!.append(cover) + + var menusettings = document.createElement("div") + menusettings.classList.add("editmenuoption-container") + + var defaultbutton = document.createElement("div") + defaultbutton.classList.add("editmenuoption") + defaultbutton.innerText = "Restore Default" + defaultbutton.id = "restoredefaultoption" + + var savebutton = document.createElement("div") + savebutton.classList.add("editmenuoption") + savebutton.innerText = "Save" + savebutton.id = "restoredefaultoption" + + menusettings.appendChild(defaultbutton) + menusettings.appendChild(savebutton) + + menu!.appendChild(menusettings) + + var ListItems = menu!.firstChild!.childNodes + for (let i = 0; i < ListItems.length; i++) { + const element1 = ListItems[i] + const element = element1 as HTMLElement + + ;(element as HTMLElement).classList.add("draggable") + if ((element as HTMLElement).classList.contains("hasChildren")) { + (element as HTMLElement).classList.remove("active") + ;(element.firstChild as HTMLElement).classList.remove("noscroll") } - - MenuOptionsOpen = true - - var cover = document.createElement("div") - cover.classList.add("notMenuCover") - menu!.style.zIndex = "20" - menu!.style.setProperty("--menuHidden", "flex") - container!.append(cover) - - var menusettings = document.createElement("div") - menusettings.classList.add("editmenuoption-container") - - var defaultbutton = document.createElement("div") - defaultbutton.classList.add("editmenuoption") - defaultbutton.innerText = "Restore Default" - defaultbutton.id = "restoredefaultoption" - - var savebutton = document.createElement("div") - savebutton.classList.add("editmenuoption") - savebutton.innerText = "Save" - savebutton.id = "restoredefaultoption" - - menusettings.appendChild(defaultbutton) - menusettings.appendChild(savebutton) - - menu!.appendChild(menusettings) - - var ListItems = menu!.firstChild!.childNodes + + let MenuItemToggle = stringToHTML( + `
    `, + ).firstChild + ;(element as HTMLElement).append(MenuItemToggle!) + + if (!element.dataset.betterseqta) { + const a = document.createElement("section") + a.innerHTML = element.innerHTML + cloneAttributes(a, element) + menu!.firstChild!.insertBefore(a, element) + element.remove() + } + } + + if (Object.keys(settingsState.menuitems).length == 0) { + menubuttons = menu!.firstChild!.childNodes + let menuItems = {} as any + for (var i = 0; i < menubuttons.length; i++) { + var id = (menubuttons[i] as HTMLElement).dataset.key + const element: any = {} + element.toggle = true + ;(menuItems[id as keyof typeof menuItems] as any) = element + } + settingsState.menuitems = menuItems + } + + var menubuttons: any = document.getElementsByClassName("menuitem") + + let menuItems = settingsState.menuitems as any + let buttons = document.getElementsByClassName("menuitem") + for (let i = 0; i < buttons.length; i++) { + let id = buttons[i].id as string | undefined + if (menuItems[id as keyof typeof menuItems]) { + (buttons[i] as HTMLInputElement).checked = + menuItems[id as keyof typeof menuItems].toggle + } else { + (buttons[i] as HTMLInputElement).checked = true + } + (buttons[i] as HTMLInputElement).checked = true + } + + try { + var el = document.querySelector("#menu > ul") + var sortable = Sortable.create(el as HTMLElement, { + draggable: ".draggable", + dataIdAttr: "data-key", + animation: 150, + easing: "cubic-bezier(.5,0,.5,1)", + onEnd: function () { + saveNewOrder(sortable) + }, + }) + } catch (err) { + console.error(err) + } + + function changeDisplayProperty(element: any) { + if (!element.checked) { + element.parentNode.parentNode.style.display = "var(--menuHidden)" + } + if (element.checked) { + element.parentNode.parentNode.style.setProperty( + "display", + "flex", + "important", + ) + } + } + + function StoreMenuSettings() { + let menu = document.getElementById("menu") + const menuItems: any = {} + let menubuttons = menu!.firstChild!.childNodes + const button = document.getElementsByClassName("menuitem") + for (let i = 0; i < menubuttons.length; i++) { + const id = (menubuttons[i] as HTMLElement).dataset.key + const element: any = {} + element.toggle = (button[i] as HTMLInputElement).checked + + menuItems[id as keyof typeof menuItems] = element + } + settingsState.menuitems = menuItems + } + + for (let i = 0; i < menubuttons.length; i++) { + const element = menubuttons[i] + element.addEventListener("change", () => { + element.parentElement.parentElement.getAttribute("data-key") + StoreMenuSettings() + changeDisplayProperty(element) + }) + } + + function closeAll() { + menusettings?.remove() + cover?.remove() + MenuOptionsOpen = false + menu!.style.setProperty("--menuHidden", "none") + for (let i = 0; i < ListItems.length; i++) { const element1 = ListItems[i] const element = element1 as HTMLElement - - ;(element as HTMLElement).classList.add("draggable") - if ((element as HTMLElement).classList.contains("hasChildren")) { - (element as HTMLElement).classList.remove("active") - ;(element.firstChild as HTMLElement).classList.remove("noscroll") - } - - let MenuItemToggle = stringToHTML( - `
    `, - ).firstChild - ;(element as HTMLElement).append(MenuItemToggle!) - + element.classList.remove("draggable") + element.setAttribute("draggable", "false") + if (!element.dataset.betterseqta) { - const a = document.createElement("section") + const a = document.createElement("li") a.innerHTML = element.innerHTML cloneAttributes(a, element) menu!.firstChild!.insertBefore(a, element) element.remove() } } - - if (Object.keys(settingsState.menuitems).length == 0) { - menubuttons = menu!.firstChild!.childNodes - let menuItems = {} as any - for (var i = 0; i < menubuttons.length; i++) { - var id = (menubuttons[i] as HTMLElement).dataset.key - const element: any = {} - element.toggle = true - ;(menuItems[id as keyof typeof menuItems] as any) = element - } - settingsState.menuitems = menuItems + + let switches = menu!.querySelectorAll(".onoffswitch") + for (let i = 0; i < switches.length; i++) { + switches[i].remove() } - - var menubuttons: any = document.getElementsByClassName("menuitem") - - let menuItems = settingsState.menuitems as any - let buttons = document.getElementsByClassName("menuitem") - for (let i = 0; i < buttons.length; i++) { - let id = buttons[i].id as string | undefined - if (menuItems[id as keyof typeof menuItems]) { - (buttons[i] as HTMLInputElement).checked = - menuItems[id as keyof typeof menuItems].toggle - } else { - (buttons[i] as HTMLInputElement).checked = true - } - (buttons[i] as HTMLInputElement).checked = true - } - - try { - var el = document.querySelector("#menu > ul") - var sortable = Sortable.create(el as HTMLElement, { - draggable: ".draggable", - dataIdAttr: "data-key", - animation: 150, - easing: "cubic-bezier(.5,0,.5,1)", - onEnd: function () { - saveNewOrder(sortable) - }, - }) - } catch (err) { - console.error(err) - } - - function changeDisplayProperty(element: any) { - if (!element.checked) { - element.parentNode.parentNode.style.display = "var(--menuHidden)" - } - if (element.checked) { - element.parentNode.parentNode.style.setProperty( - "display", - "flex", - "important", - ) - } - } - - function StoreMenuSettings() { - let menu = document.getElementById("menu") - const menuItems: any = {} - let menubuttons = menu!.firstChild!.childNodes - const button = document.getElementsByClassName("menuitem") - for (let i = 0; i < menubuttons.length; i++) { - const id = (menubuttons[i] as HTMLElement).dataset.key - const element: any = {} - element.toggle = (button[i] as HTMLInputElement).checked - - menuItems[id as keyof typeof menuItems] = element - } - settingsState.menuitems = menuItems - } - - for (let i = 0; i < menubuttons.length; i++) { - const element = menubuttons[i] - element.addEventListener("change", () => { - element.parentElement.parentElement.getAttribute("data-key") - StoreMenuSettings() - changeDisplayProperty(element) - }) - } - - function closeAll() { - menusettings?.remove() - cover?.remove() - MenuOptionsOpen = false - menu!.style.setProperty("--menuHidden", "none") - - for (let i = 0; i < ListItems.length; i++) { - const element1 = ListItems[i] - const element = element1 as HTMLElement - element.classList.remove("draggable") - element.setAttribute("draggable", "false") - - if (!element.dataset.betterseqta) { - const a = document.createElement("li") - a.innerHTML = element.innerHTML - cloneAttributes(a, element) - menu!.firstChild!.insertBefore(a, element) - element.remove() - } - } - - let switches = menu!.querySelectorAll(".onoffswitch") - for (let i = 0; i < switches.length; i++) { - switches[i].remove() - } - } - - cover?.addEventListener("click", closeAll) - savebutton?.addEventListener("click", closeAll) - - defaultbutton?.addEventListener("click", function () { - const options = settingsState.defaultmenuorder - settingsState.menuorder = options - - ChangeMenuItemPositions(options) - - for (let i = 0; i < menubuttons.length; i++) { - const element = menubuttons[i] - element.checked = true - element.parentNode.parentNode.style.setProperty( - "display", - "flex", - "important", - ) - } - saveNewOrder(sortable) - }) - } - - function saveNewOrder(sortable: any) { - var order = sortable.toArray() - settingsState.menuorder = order - } - - function cloneAttributes(target: any, source: any) { - [...source.attributes].forEach((attr) => { - target.setAttribute(attr.nodeName, attr.nodeValue) - }) } - export function ChangeMenuItemPositions(storage: any) { - let menuorder = storage - - var menuList = document.querySelector("#menu")!.firstChild!.childNodes - - let listorder = [] - for (let i = 0; i < menuList.length; i++) { - const menu = menuList[i] as HTMLElement - - let a = menuorder.indexOf(menu.dataset.key) - - listorder.push(a) + cover?.addEventListener("click", closeAll) + savebutton?.addEventListener("click", closeAll) + + defaultbutton?.addEventListener("click", function () { + const options = settingsState.defaultmenuorder + settingsState.menuorder = options + + ChangeMenuItemPositions(options) + + for (let i = 0; i < menubuttons.length; i++) { + const element = menubuttons[i] + element.checked = true + element.parentNode.parentNode.style.setProperty( + "display", + "flex", + "important", + ) } - - var newArr = [] - for (var i = 0; i < listorder.length; i++) { - newArr[listorder[i]] = menuList[i] + saveNewOrder(sortable) + }) +} + + + +function saveNewOrder(sortable: any) { + var order = sortable.toArray() + settingsState.menuorder = order +} + +function cloneAttributes(target: any, source: any) { + [...source.attributes].forEach((attr) => { + target.setAttribute(attr.nodeName, attr.nodeValue) + }) +} + + + +export function ChangeMenuItemPositions(menuorder: SettingsState["menuorder"]) { + var menuList = document.querySelector("#menu")!.firstChild!.childNodes + + let listorder = [] + for (let i = 0; i < menuList.length; i++) { + const menu = menuList[i] as HTMLElement + + let a = menuorder.indexOf(menu.dataset.key) + + listorder.push(a) + } + + var newArr = [] + for (var i = 0; i < listorder.length; i++) { + newArr[listorder[i]] = menuList[i] + } + + let listItemsDOM = document.getElementById("menu")!.firstChild + for (let i = 0; i < newArr.length; i++) { + const element = newArr[i] + if (element) { + const elem = element as HTMLElement + elem.setAttribute("data-checked", "true") + listItemsDOM!.appendChild(element) } - - let listItemsDOM = document.getElementById("menu")!.firstChild - for (let i = 0; i < newArr.length; i++) { - const element = newArr[i] - if (element) { - const elem = element as HTMLElement - elem.setAttribute("data-checked", "true") - listItemsDOM!.appendChild(element) - } - } - } \ No newline at end of file + } +} \ No newline at end of file diff --git a/src/seqta/utils/Whatsnew.ts b/src/seqta/utils/Whatsnew.ts index e659dcb3..86a16f59 100644 --- a/src/seqta/utils/Whatsnew.ts +++ b/src/seqta/utils/Whatsnew.ts @@ -2,7 +2,7 @@ import { settingsState } from "./listeners/SettingsState" import { animate, stagger } from "motion" import stringToHTML from "./stringToHTML" import browser from "webextension-polyfill" -import kofi from "@/resources/kofi.png" +import kofi from "@/resources/kofi.png?base64" export async function DeleteWhatsNew() { const bkelement = document.getElementById("whatsnewbk") diff --git a/src/seqta/utils/listeners/MessageListener.ts b/src/seqta/utils/listeners/MessageListener.ts index 673ca435..ac791882 100644 --- a/src/seqta/utils/listeners/MessageListener.ts +++ b/src/seqta/utils/listeners/MessageListener.ts @@ -108,7 +108,6 @@ export class MessageHandler { editSidebar() { if (!MenuOptionsOpen) { OpenMenuOptions(); - closeExtensionPopup(); } } } \ No newline at end of file From dd47deb954a795e31a095c49bd953be3fa2df99d Mon Sep 17 00:00:00 2001 From: SethBurkart123 Date: Wed, 9 Apr 2025 14:46:57 +1000 Subject: [PATCH 08/23] fix: news not loading --- package.json | 1 + src/background/news.ts | 27 ++++++++++++++++----------- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index ea888134..9d9f39a5 100644 --- a/package.json +++ b/package.json @@ -80,6 +80,7 @@ "dompurify": "^3.2.4", "embla-carousel-autoplay": "^8.5.2", "embla-carousel-svelte": "^8.5.2", + "events": "^3.3.0", "fuse.js": "^7.1.0", "idb": "^8.0.2", "localforage": "^1.10.0", diff --git a/src/background/news.ts b/src/background/news.ts index 3bb52f9e..72c647a2 100644 --- a/src/background/news.ts +++ b/src/background/news.ts @@ -19,20 +19,25 @@ const rssFeedsByCountry: Record = { "https://www.npr.org/rss/rss.php", ], taiwan: [ - "https://focustaiwan.tw/rss", - "https://www.taipeitimes.com/rss/all.xml", + "https://news.ltn.com.tw/rss/all.xml", + "https://www.taipeitimes.com/xml/index.rss", "https://international.thenewslens.com/rss", ], hong_kong: [ - "https://news.rthk.hk/rthk/en/rss.htm", + "https://rthk9.rthk.hk/rthk/news/rss/e_expressnews_elocal.xml", "https://www.scmp.com/rss/91/feed", ], panama: [ - "http://www.panama-guide.com/backend.php", + "https://critica.com.pa/rss.xml", + "https://www.panamaamerica.com.pa/rss.xml", + "https://noticiassin.com/feed/", + "https://elcapitalfinanciero.com/feed/" ], canada: [ "https://www.cbc.ca/cmlink/rss-topstories", - "https://www.theglobeandmail.com/?service=rss", + "https://calgaryherald.com/feed", + "https://ottawacitizen.com/feed", + "https://www.montrealgazette.com/feed" ], singapore: [ "https://www.straitstimes.com/news/singapore/rss.xml", @@ -43,20 +48,16 @@ const rssFeedsByCountry: Record = { "https://www.theguardian.com/uk/rss", ], japan: [ - "https://www.japantimes.co.jp/feed/topstories.xml", "https://www3.nhk.or.jp/nhkworld/en/news/feeds/", + "https://news.livedoor.com/topics/rss/int.xml" ], netherlands: [ "https://www.dutchnews.nl/feed/", - "http://feeds.nos.nl/nosnieuwsalgemeen", + "https://www.nrc.nl/rss/" ], }; export async function fetchNews(source: string, sendResponse: any) { - const parser = new Parser(); - let feeds: string[]; - console.log('fetchNews', source) - if (source === "australia") { const date = new Date(); @@ -73,6 +74,10 @@ export async function fetchNews(source: string, sendResponse: any) { return; } + const parser = new Parser(); + let feeds: string[]; + console.log('fetchNews', source) + if (rssFeedsByCountry[source.toLowerCase()]) { // If the source is a country, fetch from predefined feeds feeds = rssFeedsByCountry[source.toLowerCase()]; From 7fd85a5529692c8896c43b01659bb9fd0ed98c4e Mon Sep 17 00:00:00 2001 From: StroepWafel <109832156+NIDNHU@users.noreply.github.com> Date: Sat, 12 Apr 2025 23:42:25 +0930 Subject: [PATCH 09/23] Update and retyped bug_report.md to bug_report.yml --- .github/ISSUE_TEMPLATE/bug_report.md | 23 ----------- .github/ISSUE_TEMPLATE/bug_report.yml | 55 +++++++++++++++++++++++++++ 2 files changed, 55 insertions(+), 23 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/bug_report.yml diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index 0b8053ed..00000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -name: Report A bug. -about: Create a report of a present bug. -title: "[BUG]" -labels: bug -assignees: '' - ---- - -**Bug Description** -Please provide a clear and concise description of the bug. - -**Steps to Reproduce** -Please list the actions that caused the issue. - -**Expected Behavior** -Please describe how you think the program should have behaved, making sure to be as clear and concise as possible. - -**Screenshots** -If applicable, please provide screenshots. This will help us to reproduce the issue and better understand what we are looking for. - -**Additional Context** -Feel free to provide any additional, applicable context or information that is relevant to the problem. diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 00000000..3c33f33d --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,55 @@ +name: Bug report +description: Report an issue with the modpack in its unmodified state. For other issues, use Discord. +labels: bug +body: +- type: markdown + attributes: + value: | + Before reporting an issue, [please search](https://github.com/BetterSEQTA/BetterSEQTA-Plus/issues) to make sure it has not already been reported (make sure to search closed issues as well!). + +- type: textarea + attributes: + label: Describe the bug + description: Describe your issue. For general issues and questions you'll get a faster answer [from our Discord.](https://discord.gg/YzmbnCDkat) + validations: + required: true + +- type: input + attributes: + label: Extension version + description: What version of the extension are you using? + placeholder: Find it by opening the config menu and clicking the about icon in the top right. + validations: + required: true + +- type: dropdown + attributes: + label: Browser + description: Which Browser are you using? + options: + - Chrome + - Firefox + - Brave + - Safari + - DuckDuckGO + - Microsoft Edge + - Other Chromium-Based Browser + - Other Non-Chromium-Based Browser + validations: + required: true + +- type: checkboxes + attributes: + label: Confirm + options: + - label: This bug report is about an issue with the extension itself, I have not modified the extension nor added any unsupported plugins. If this is not the case, I know that I should post the issue to the extension's [Discord support channel](https://discord.gg/YzmbnCDkat) instead. + required: true + +- type: textarea + attributes: + label: Additional context + description: Screenshots, video or any other information. Include photos of the [console](https://www.jivrus.com/resources/articles/technical/how-to-open-browser-console-log) if possible + placeholder: | + Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in. + validations: + required: false From d8829d571602aa431538f138a878bdba671bd9bd Mon Sep 17 00:00:00 2001 From: StroepWafel <109832156+NIDNHU@users.noreply.github.com> Date: Sat, 12 Apr 2025 23:43:21 +0930 Subject: [PATCH 10/23] Update bug_report.yml --- .github/ISSUE_TEMPLATE/bug_report.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 3c33f33d..88dc4a29 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -42,7 +42,7 @@ body: attributes: label: Confirm options: - - label: This bug report is about an issue with the extension itself, I have not modified the extension nor added any unsupported plugins. If this is not the case, I know that I should post the issue to the extension's [Discord support channel](https://discord.gg/YzmbnCDkat) instead. + - label: This bug report is about an issue with the extension itself, I have not modified the extension nor added any unsupported plugins. If this is not the case, I know that I should post the issue to the extension's Discord support channel instead. required: true - type: textarea From 6377a0c90936abc59c7928ad2c81dc5b39b1146f Mon Sep 17 00:00:00 2001 From: StroepWafel <109832156+NIDNHU@users.noreply.github.com> Date: Sat, 12 Apr 2025 23:44:57 +0930 Subject: [PATCH 11/23] Update bug_report.yml --- .github/ISSUE_TEMPLATE/bug_report.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 88dc4a29..4ee8de3b 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -42,7 +42,8 @@ body: attributes: label: Confirm options: - - label: This bug report is about an issue with the extension itself, I have not modified the extension nor added any unsupported plugins. If this is not the case, I know that I should post the issue to the extension's Discord support channel instead. + - label: This bug report is about an issue with the extension itself. + description: By ticking this box you agree to the following: I have not modified the extension nor added any unsupported plugins. If this is not the case, I know that I should post the issue to the extension's Discord support channel instead. required: true - type: textarea From bd812ffdae376d8ea29aa028df196c04281e06a8 Mon Sep 17 00:00:00 2001 From: StroepWafel <109832156+NIDNHU@users.noreply.github.com> Date: Sat, 12 Apr 2025 23:45:28 +0930 Subject: [PATCH 12/23] Update bug_report.yml --- .github/ISSUE_TEMPLATE/bug_report.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 4ee8de3b..926d81bc 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -49,7 +49,7 @@ body: - type: textarea attributes: label: Additional context - description: Screenshots, video or any other information. Include photos of the [console](https://www.jivrus.com/resources/articles/technical/how-to-open-browser-console-log) if possible + description: Screenshots, video or any other information. Include photos of the console if possible placeholder: | Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in. validations: From 442ea04a2fc31be3aed859d171b30a41e81d7be7 Mon Sep 17 00:00:00 2001 From: StroepWafel <109832156+NIDNHU@users.noreply.github.com> Date: Sat, 12 Apr 2025 23:45:57 +0930 Subject: [PATCH 13/23] Update bug_report.yml --- .github/ISSUE_TEMPLATE/bug_report.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 926d81bc..8e41a9e8 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -42,8 +42,7 @@ body: attributes: label: Confirm options: - - label: This bug report is about an issue with the extension itself. - description: By ticking this box you agree to the following: I have not modified the extension nor added any unsupported plugins. If this is not the case, I know that I should post the issue to the extension's Discord support channel instead. + - label: This bug report is about an issue with the extension itself. By ticking this box you agree to the following: I have not modified the extension nor added any unsupported plugins. If this is not the case, I know that I should post the issue to the extension's Discord support channel instead. required: true - type: textarea From 8c2539f1308ee2fe5fbbe78e128d7d990b33fd77 Mon Sep 17 00:00:00 2001 From: StroepWafel <109832156+NIDNHU@users.noreply.github.com> Date: Sat, 12 Apr 2025 23:46:44 +0930 Subject: [PATCH 14/23] Update bug_report.yml --- .github/ISSUE_TEMPLATE/bug_report.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 8e41a9e8..71100c44 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -42,7 +42,8 @@ body: attributes: label: Confirm options: - - label: This bug report is about an issue with the extension itself. By ticking this box you agree to the following: I have not modified the extension nor added any unsupported plugins. If this is not the case, I know that I should post the issue to the extension's Discord support channel instead. + - label: This bug report is about an issue with the extension itself. + description: I have not modified the extension nor added any unsupported plugins. If this is not the case, I know that I should post the issue to the extension's [Discord support channel](https://discord.gg/YzmbnCDkat) instead. required: true - type: textarea From b3c395cca137e05c9e13bccf964f0e805edb358e Mon Sep 17 00:00:00 2001 From: StroepWafel <109832156+NIDNHU@users.noreply.github.com> Date: Sat, 12 Apr 2025 23:47:13 +0930 Subject: [PATCH 15/23] Update bug_report.yml --- .github/ISSUE_TEMPLATE/bug_report.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 71100c44..ffa7bd5e 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -42,8 +42,7 @@ body: attributes: label: Confirm options: - - label: This bug report is about an issue with the extension itself. - description: I have not modified the extension nor added any unsupported plugins. If this is not the case, I know that I should post the issue to the extension's [Discord support channel](https://discord.gg/YzmbnCDkat) instead. + - label: This bug report is about an issue with the extension itself. I have not modified the extension nor added any unsupported plugins. If this is not the case, I know that I should post the issue to the extension's Discord support channel instead. required: true - type: textarea From ef6176b6a489375b1195646b9aabee2e3710cde0 Mon Sep 17 00:00:00 2001 From: StroepWafel <109832156+NIDNHU@users.noreply.github.com> Date: Sat, 12 Apr 2025 23:50:32 +0930 Subject: [PATCH 16/23] Update bug_report.yml --- .github/ISSUE_TEMPLATE/bug_report.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index ffa7bd5e..e9a1c346 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -1,6 +1,7 @@ name: Bug report description: Report an issue with the modpack in its unmodified state. For other issues, use Discord. labels: bug +title: [BUG] body: - type: markdown attributes: From 0a3ee5c6669be71b4b8cd875d2b6773914de039e Mon Sep 17 00:00:00 2001 From: StroepWafel <109832156+NIDNHU@users.noreply.github.com> Date: Sat, 12 Apr 2025 23:50:50 +0930 Subject: [PATCH 17/23] Update bug_report.yml --- .github/ISSUE_TEMPLATE/bug_report.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index e9a1c346..27bc218d 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -1,7 +1,7 @@ name: Bug report description: Report an issue with the modpack in its unmodified state. For other issues, use Discord. labels: bug -title: [BUG] +title: "[BUG]" body: - type: markdown attributes: From 72a529ee1d143764d69370397558b1653f9eee23 Mon Sep 17 00:00:00 2001 From: StroepWafel <109832156+NIDNHU@users.noreply.github.com> Date: Sun, 13 Apr 2025 00:00:31 +0930 Subject: [PATCH 18/23] Update and retype feature_request.md to feature_request.yml --- .github/ISSUE_TEMPLATE/feature_request.md | 14 ------ .github/ISSUE_TEMPLATE/feature_request.yml | 54 ++++++++++++++++++++++ 2 files changed, 54 insertions(+), 14 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/feature_request.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.yml diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 6c42d4fa..00000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project -title: "[FR] " -labels: enhancement -assignees: '' - ---- - -**Is your feature request related to a problem? if so, Please describe the issue or link to a pre-existing bug report** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - -**Describe the solution you'd like** -A clear and concise description of what you want to happen. Provide reference art/pictures if poccible diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 00000000..b5e6c059 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,54 @@ +name: Feature request +description: Suggest a new Feature to be added or replaced in BetterSeqtaPLUS +labels: enhancement +title: "[FR]" +body: + +-type: checkboxes + attributes: + label: Confirm + options: + - label: "Is this feature request related to a Bug report?" + required: false + +- type: input + attributes: + label: Bug report link + description: If this feature request is related to a bug report, please insert the link to the bug report here: + placeholder: "https://github.com/BetterSEQTA/BetterSEQTA-Plus/issues/..." + validations: + required: false + +- type: markdown + attributes: + value: | + ## Feature details + Before you request a feature, [please search](https://github.com/BetterSEQTA/BetterSEQTA-Plus/issues) if it has already been requested. (Make sure to check closed issues as well!) + + +- type: dropdown + attributes: + label: Feature type + multiple: false + options: + - Graphical + - Functional + - Not Sure + validations: + required: true + + +- type: input + attributes: + label: Feature Details + description: Please write, with as much detail as possible, what you would like to see from this mod. + placeholder: I would like to see... + validations: + required: false + +- type: textarea + attributes: + label: Additional details + description: Anything else you want to add? + validations: + required: false From 694d4ea0a19581dddfb5bcf768891b773ba664ec Mon Sep 17 00:00:00 2001 From: StroepWafel <109832156+NIDNHU@users.noreply.github.com> Date: Sun, 13 Apr 2025 00:01:35 +0930 Subject: [PATCH 19/23] fix feature_request.yml --- .github/ISSUE_TEMPLATE/feature_request.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml index b5e6c059..e28782a8 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yml +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -4,12 +4,12 @@ labels: enhancement title: "[FR]" body: --type: checkboxes +- type: checkboxes attributes: - label: Confirm - options: - - label: "Is this feature request related to a Bug report?" - required: false + label: Confirm + options: + - label: "Is this feature request related to a Bug report?" + required: false - type: input attributes: From ca20ba4e07ed64262fffe1e4270d98a5feef85c6 Mon Sep 17 00:00:00 2001 From: StroepWafel <109832156+NIDNHU@users.noreply.github.com> Date: Sun, 13 Apr 2025 00:02:15 +0930 Subject: [PATCH 20/23] fix feature_request.yml --- .github/ISSUE_TEMPLATE/feature_request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml index e28782a8..b783bcf3 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yml +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -14,7 +14,7 @@ body: - type: input attributes: label: Bug report link - description: If this feature request is related to a bug report, please insert the link to the bug report here: + description: "If this feature request is related to a bug report, please insert the link to the bug report here" placeholder: "https://github.com/BetterSEQTA/BetterSEQTA-Plus/issues/..." validations: required: false From 92344400e1208683398139be9cf198567f1f1063 Mon Sep 17 00:00:00 2001 From: StroepWafel <109832156+NIDNHU@users.noreply.github.com> Date: Sun, 13 Apr 2025 00:04:34 +0930 Subject: [PATCH 21/23] fix validations indentation --- .github/ISSUE_TEMPLATE/feature_request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml index b783bcf3..83b10d53 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yml +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -16,7 +16,7 @@ body: label: Bug report link description: "If this feature request is related to a bug report, please insert the link to the bug report here" placeholder: "https://github.com/BetterSEQTA/BetterSEQTA-Plus/issues/..." - validations: + validations: required: false - type: markdown From ecbdffbbde0435205b3f7e1833bca2260580476b Mon Sep 17 00:00:00 2001 From: StroepWafel <109832156+NIDNHU@users.noreply.github.com> Date: Sun, 13 Apr 2025 00:05:07 +0930 Subject: [PATCH 22/23] Update feature_request.yml --- .github/ISSUE_TEMPLATE/feature_request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml index 83b10d53..3bd3c8c8 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yml +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -16,7 +16,7 @@ body: label: Bug report link description: "If this feature request is related to a bug report, please insert the link to the bug report here" placeholder: "https://github.com/BetterSEQTA/BetterSEQTA-Plus/issues/..." - validations: + validations: required: false - type: markdown From 907f970018e0688f4da905b679aba38e839de901 Mon Sep 17 00:00:00 2001 From: Alphons Joseph <93847055+Crazypersonalph@users.noreply.github.com> Date: Mon, 28 Apr 2025 21:32:08 +0800 Subject: [PATCH 23/23] feat: old scrolling sidebar system --- src/css/injected.scss | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/css/injected.scss b/src/css/injected.scss index 1d1faf1f..73bffd76 100644 --- a/src/css/injected.scss +++ b/src/css/injected.scss @@ -1669,7 +1669,7 @@ body, div, ol, ul { - scrollbar-width: thin !important; + scrollbar-width: thin; scrollbar-color: #babac0 #fff !important; } @@ -1678,7 +1678,7 @@ ul { div, ol, ul { - scrollbar-width: thin !important; + scrollbar-width: thin; scrollbar-color: #333 #111 !important; } } @@ -3350,3 +3350,8 @@ body { } } } + +.noscroll * { + -ms-overflow-style: none; + scrollbar-width: none !important; +}