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?base64"; export async function DeleteWhatsNew() { const bkelement = document.getElementById("whatsnewbk"); const popup = document.getElementsByClassName("whatsnewContainer")[0]; if (!settingsState.animations) { bkelement?.remove(); return; } animate( [popup, bkelement!], { opacity: [1, 0], scale: [1, 0] }, { ease: [0.22, 0.03, 0.26, 1] }, ).then(() => { bkelement?.remove(); }); } export function OpenWhatsNewPopup() { const background = document.createElement("div"); background.id = "whatsnewbk"; background.classList.add("whatsnewBackground"); const container = document.createElement("div"); container.classList.add("whatsnewContainer"); var header: any = stringToHTML( /* html */ `

What's New

BetterSEQTA+ V${browser.runtime.getManifest().version}

`, ).firstChild; let imagecont = document.createElement("div"); imagecont.classList.add("whatsnewImgContainer"); let video = document.createElement("video"); let source = document.createElement("source"); source.setAttribute( "src", "https://raw.githubusercontent.com/BetterSEQTA/BetterSEQTA-Plus/main/src/resources/update-video.mp4", ); video.autoplay = true; video.muted = true; video.loop = true; video.appendChild(source); video.classList.add("whatsnewImg"); imagecont.appendChild(video); let textcontainer = document.createElement("div"); textcontainer.classList.add("whatsnewTextContainer"); 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)
  • Rebuilt theme system that is significantly less buggy
  • Performance improvements
  • Other minor bug fixes
  • 3.4.5 - News, Bug Fixes, and improvements!

  • Added alternative news sources
  • Notifications now open direct messages
  • Added Toggle for Letter/Percent Grades
  • Added fullscreen to the theme creator CSS editor
  • Added warning if BetterSEQTA is installed
  • Removed max width from theme creator
  • Fixed discord icon colour in light mode
  • Fixed subject averages not showing up with letter grades
  • Tweaked compose UI
  • 3.4.4 - Bug Fixes and Improvements

  • Added vertical zoom to the timetable
  • Fixed theme importing failing when images were included
  • Removed broken gradients on the backgrounds of certain buttons
  • Fixed timetable quickbar arrow receiving the wrong colour
  • Auto-applied selected theme after saving in theme creator
  • Fixed a bug where timetable was clipped at certain times
  • Fixed custom sidebar layouts not applying on page load
  • Improved spacing of the message editor buttons
  • Added HEX colour input to the theme creator
  • Fixed theme application in the creator
  • Performance improvements
  • Other minor bug fixes
  • 3.4.3 - Minor Bug Fixes

  • Fixed a bug where timetable colours couldn't be changed
  • Other minor bug fixes
  • 3.4.2 - Minor Bug Fixes

  • Fixed a bug where Assessment Average wasn't enabled by default
  • Fixed floating menus would sometimes be placed behind other elements
  • 3.4.1 - Bug Fixes and Performance Improvements

  • Added a new "Subject Average" section to the assessments page
  • Fixed a bug where animations wouldn't play correctly
  • Added loading animations to the home page
  • Under the hood performance improvements
  • Improved animation performance
  • Better Animations!
  • Minor style tweaks
  • 3.4.0 - Major Performance Update

  • Completely rebuilt the extension popup using Svelte for dramatically improved performance
  • Added a brand new background store with search functionality and downloadable backgrounds
  • Significant code cleanup and optimization across the extension
  • Improved overall responsiveness and load times
  • Smoother animations and improved scrolling
  • Fixed Firefox compatibility issues
  • Other minor bug fixes and under the hood improvements
  • 3.3.1 - Hot Fix

  • Fixed assessments not loading when no notices are available
  • 3.3.0 - Overhauled Theming System

  • Added a theme store!
  • Added the new theme creator!
  • Fixed Notices not working on home page
  • Fixed dark/light button labels inverted
  • Switched to GitHub for hosting the update video
  • Fixed an issue where the settings menu wouldn't change theme
  • Fixed custom shortcuts not allowing ports to be used
  • Fixed occasional flashing when using animations
  • Fixed loading of the tab icon
  • Made animations toggle apply to settings
  • Small styling improvements
  • Other minor bug fixes
  • 3.2.7 - Minor Improvements

  • Improved performance!
  • Fixed a bug where the icon wasn't showing up
  • 3.2.6 - Bug fixes and performance improvements

  • Improved contrast for notifications
  • Added 12-hour time format toggle
  • Using external update video to ensure smaller package size
  • Refactored underlying code to improve performance
  • Removed old theme system *revamp coming soon*
  • Improved notices contrast
  • Remove Telemetry completely - as we weren't using it too much
  • Added Error handling to settings interface
  • Fixed HTML message editor cursor becoming misaligned
  • Enabled spellcheck inside of direct messages
  • Fixed timetable dates being misaligned
  • Other minor bug fixes and under the hood improvements
  • 3.2.5 - More Bug Fixes

  • New direct message scroll animations
  • Added error message for brave browser shields breaking backgrounds
  • Fixed homepage assessment tooltips being cut off
  • Improved direct message styling
  • Made settings panel auto size to height of screen
  • Fixed timetable dates not visible
  • Other minor bug fixes
  • 3.2.4 - Bug Fixes

  • Added an open changelog button to settings
  • Fixed a memory overflow bug with Education Perfect
  • Fixed a bug where the background wouldn't change instantly
  • Fixed news feed not loading
  • Fixed home items duplicating
  • Fixed Upcoming assessments not showing
  • 3.2.2 - Minor Improvements

  • Added Settings open-close animation
  • Minor Bug Fixes
  • 3.2.0 - Custom Themes

  • Added transparency (blur) effects
  • Added custom themes
  • Added colour picker history
  • Heaps of bug fixes
  • 3.1.3 - Custom Backgrounds

  • Added custom backgrounds with support for images and videos
  • Overhauled topbar
  • New animated hamburger icon
  • Minor bug fixes
  • 3.1.2 - New settings menu!

  • Overhauled the settings menu
  • Added custom gradients
  • Added HEAPS of animations
  • Fixed a bug where shortcuts don't show up
  • Other minor bugs fixed
  • 3.1.1 - Minor Bug fixes

  • Fixed assessments overlapping
  • Fixed houses not displaying if they aren't a specific color
  • Fixed Chrome Webstore Link
  • 3.1.0 - Design Improvements

  • Minor UI improvements
  • Added Animation Speed Slider
  • Animation now enables and disables without reloading SEQTA
  • Changed logo
  • 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 BetterSEQTA+ not loading on some pages
  • Fixed text colour of notices being unreadable
  • Fixed pages not reloading when saving changes
  • 2.0.2 - Minor bug fixes

  • Fixed indicator for current lesson
  • Fixed text colour for DM messages list in Light mode
  • Fixed user info text colour
  • 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.
  • Create Custom Shortcuts

  • Found in the BetterSEQTA+ Settings menu, custom shortcuts can now be created with a name and URL of your choice.
  • `).firstChild; let footer = stringToHTML(/* html */ `
    Report bugs and feedback:
    Buy Me a Coffee at ko-fi.com
    `).firstChild; let exitbutton = document.createElement("div"); exitbutton.id = "whatsnewclosebutton"; container.append(header); container.append(imagecont); container.append(textcontainer); container.append(text as ChildNode); container.append(footer as ChildNode); container.append(exitbutton); background.append(container); document.getElementById("container")!.append(background); let bkelement = document.getElementById("whatsnewbk"); let popup = document.getElementsByClassName("whatsnewContainer")[0]; if (settingsState.animations) { animate( [popup, bkelement as HTMLElement], { scale: [0, 1] }, { type: "spring", stiffness: 220, damping: 18, }, ); animate( ".whatsnewTextContainer *", { opacity: [0, 1], y: [10, 0] }, { delay: stagger(0.05, { startDelay: 0.1 }), duration: 0.5, ease: [0.22, 0.03, 0.26, 1], }, ); } delete settingsState.justupdated; bkelement!.addEventListener("click", function (event) { // Check if the click event originated from the element itself and not any of its children if (event.target === bkelement) { DeleteWhatsNew(); } }); var closeelement = document.getElementById("whatsnewclosebutton"); closeelement!.addEventListener("click", function () { DeleteWhatsNew(); }); }