`,
- );
- var html = document.getElementsByTagName("html")[0];
- html.append(loadinghtml.firstChild);
-}
-
-function AppendLoadingSymbol(givenID, position) {
- let loadingsymbol = stringToHTML(`
-
`).firstChild;
-
- document.querySelector(position).appendChild(loadingsymbol);
-}
+let isChrome = window.chrome;
+let SettingsClicked = false;
+let MenuOptionsOpen = false;
+let UserInitalCode = "";
+let currentSelectedDate = new Date();
+let WhatsNewOpen = false;
+let LessonInterval;
+let DarkMode;
function delay(ms) {
return new Promise((resolve) => setTimeout(resolve, ms));
@@ -109,7 +32,7 @@ function ApplyCSSToHiddenMenuItems() {
if (!Object.values(result.menuitems)[i].toggle) {
stylesheetInnerText += SetDisplayNone(Object.keys(result.menuitems)[i]);
console.log(
- `[Even BetterSEQTA] Hiding ${
+ `[BetterSEQTA+] Hiding ${
Object.keys(result.menuitems)[i]
} menu item`,
);
@@ -131,7 +54,7 @@ function OpenWhatsNewPopup() {
var header = stringToHTML(``).firstChild;
let imagecont = document.createElement("div");
@@ -150,17 +73,17 @@ function OpenWhatsNewPopup() {
textcontainer.append(textheader);
let text = stringToHTML(
- `
+ String.raw`
-
3.0.0 - Even BetterSEQTA *Complete Overhaul*
+
3.0.0 - BetterSEQTA+ *Complete Overhaul*
Redesigned appearance
Upgraded to manifest V3 (longer support)
Fixed transitional glitches
Under the hood improvements
Fixed News Feed
-
2.0.7 - Added support to other domains + Minor bug fixes
Fixed Even BetterSEQTA not loading on some pagesFixed text colour of notices being unreadableFixed pages not reloading when saving changes
+
2.0.7 - Added support to other domains + Minor bug fixes
Fixed BetterSEQTA+ not loading on some pagesFixed text colour of notices being unreadableFixed pages not reloading when saving changes
2.0.2 - Minor bug fixes
Fixed indicator for current lessonFixed text colour for DM messages list in Light modeFixed user info text colour
-
Sleek New Layout
Updated with a new font and presentation, Even BetterSEQTA has never looked better.
+
Sleek New Layout
Updated with a new font and presentation, BetterSEQTA+ has never looked better.
New Updated Sidebar
Condensed appearance with new updated icons.
Independent Light Mode and Dark Mode
Dark mode and Light mode are now available to pick alongside your chosen Theme Colour. Your Theme Colour will now become an accent colour for the page.
Light/Dark mode can be toggled with the new button, found in the top-right of the menu bar.
@@ -168,7 +91,7 @@ function OpenWhatsNewPopup() {
- Create Custom Shortcuts
Found in the Even BetterSEQTA Settings menu, custom shortcuts can now be created with a name and URL of your choice.
+
Create Custom Shortcuts
Found in the BetterSEQTA+ Settings menu, custom shortcuts can now be created with a name and URL of your choice.

@@ -176,20 +99,19 @@ function OpenWhatsNewPopup() {
`,
).firstChild;
- let footer = stringToHTML(`
-
+ let footer = stringToHTML(
+ String.raw`
+
`).firstChild;
let exitbutton = document.createElement("div");
@@ -318,7 +240,8 @@ function CheckiFrameItems() {
mutation.addedNodes.forEach(function (added_node) {
if (added_node.tagName == "IFRAME") {
chrome.storage.local.get(["DarkMode"], function (result) {
- if (result.DarkMode) {
+ DarkMode = result.DarkMode;
+ if (DarkMode) {
RunColourCheck(added_node);
if (
added_node.contentDocument.documentElement.childNodes[1].style
@@ -398,7 +321,7 @@ function LoadPageElements() {
var sublink = window.location.href.split("/")[4];
switch (sublink) {
case "news":
- console.log("[Even BetterSEQTA] Started Init");
+ console.log("[BetterSEQTA+] Started Init");
chrome.storage.local.get(null, function (result) {
if (result.onoff) {
SendNewsPage();
@@ -424,7 +347,7 @@ function LoadPageElements() {
)[0];
if (typeof alertdiv == "undefined") {
console.log(
- "[Even BetterSEQTA] No notifications currently",
+ "[BetterSEQTA+] No notifications currently",
);
} else {
alertdiv.textContent =
@@ -477,7 +400,7 @@ function LoadPageElements() {
"notifications__bubble___1EkSQ",
)[0];
if (typeof alertdiv == "undefined") {
- console.log("[Even BetterSEQTA] No notifications currently");
+ console.log("[BetterSEQTA+] No notifications currently");
} else {
alertdiv.textContent =
Notifications.payload.notifications.length;
@@ -521,10 +444,11 @@ function CheckNoticeTextColour(notice) {
mutations_list.forEach(function (mutation) {
mutation.addedNodes.forEach(function (added_node) {
chrome.storage.local.get(["DarkMode"], function (result) {
+ DarkMode = result.DarkMode;
if (added_node.classList.contains("notice")) {
var hex = added_node.style.cssText.split(" ")[1];
var threshold = GetThresholdofHex(hex);
- if (result.DarkMode && threshold < 100) {
+ if (DarkMode && threshold < 100) {
added_node.style.cssText = "--color: undefined;";
}
}
@@ -757,10 +681,12 @@ function ColorLuminance(hex, lum) {
chrome.storage.onChanged.addListener(function (changes) {
if (changes.selectedColor) {
try {
- document.documentElement.style.setProperty(
- "--better-pale",
- lightenAndPaleColor(changes.selectedColor.newValue),
- );
+ if (DarkMode) {
+ document.documentElement.style.setProperty(
+ "--better-pale",
+ lightenAndPaleColor(changes.selectedColor.newValue),
+ );
+ }
} catch (err) {
console.log(err);
}
@@ -826,12 +752,13 @@ async function CheckLoadOnPeriods() {
}
function RunFunctionOnTrue(storedSetting) {
+ DarkMode = storedSetting.DarkMode;
// If the option is 'on', open BetterSEQTA
if (typeof storedSetting.onoff == "undefined") {
chrome.runtime.sendMessage({ type: "setDefaultStorage" });
}
if (storedSetting.onoff) {
- console.log("[Even BetterSEQTA] Enabled");
+ console.log("[BetterSEQTA+] Enabled");
// Injecting CSS File to the webpage to overwrite SEQTA's default CSS
var cssFile = chrome.runtime.getURL("inject/injected.css");
var fileref = document.createElement("link");
@@ -965,7 +892,7 @@ document.addEventListener(
!IsSEQTAPage
) {
IsSEQTAPage = true;
- console.log("[BetterSEQTA] Verified SEQTA Page");
+ console.log("[BetterSEQTA+] Verified SEQTA Page");
var link = document.createElement("link");
link.href = chrome.runtime.getURL("inject/documentload.css");
@@ -1338,9 +1265,11 @@ function CallExtensionSettings() {
document.head.append(fileref);
let Settings =
- stringToHTML(`