mirror of
https://github.com/BetterSEQTA/BetterSEQTA-Plus.git
synced 2026-06-06 11:44:40 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3c613f4938 | |||
| 04843a90fe |
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "betterseqtaplus",
|
||||
"version": "3.5.2",
|
||||
"version": "3.5.3",
|
||||
"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",
|
||||
|
||||
@@ -32,6 +32,9 @@ export function OpenWhatsNewPopup() {
|
||||
const text = stringToHTML(/* html */ `
|
||||
<div class="whatsnewTextContainer" style="height: 50%;overflow-y: auto;">
|
||||
|
||||
<h1>3.5.3 - Adaptive theme updates</h1>
|
||||
<li>Fixed adaptive theming on current-year course and assessment pages.</li>
|
||||
|
||||
<h1>3.5.2 - PDF & store compliance</h1>
|
||||
<li>Put PDF.js with the extension so assessment weighting stays compatible with Chrome Web Store rules</li>
|
||||
|
||||
|
||||
@@ -2,12 +2,17 @@ import { getUserInfo } from "@/seqta/ui/AddBetterSEQTAElements";
|
||||
|
||||
/**
|
||||
* Parses the current page from window.location.hash.
|
||||
* Returns { programme, metaclass } for /courses/SEMESTER/X:Y or /assessments/SEMESTER/X:Y, or null.
|
||||
* e.g. #?page=/courses/2023S/4804:11066 or #?page=/assessments/2023S/4621:10772
|
||||
* Supports both old and current URL formats, e.g.
|
||||
* /courses/SEMESTER/X:Y and /courses/X:Y
|
||||
* /assessments/SEMESTER/X:Y and /assessments/X:Y
|
||||
* e.g. #?page=/courses/2023S/4804:11066,
|
||||
* #?page=/courses/4804:11066,
|
||||
* #?page=/assessments/2023S/4621:10772,
|
||||
* #?page=/assessments/4621:10772
|
||||
*/
|
||||
function parsePageContext(): { programme: number; metaclass: number } | null {
|
||||
const hash = window.location.hash || "";
|
||||
const match = hash.match(/[?&]page=\/(courses|assessments)\/[^/]+\/(\d+):(\d+)/);
|
||||
const match = hash.match(/[?&]page=\/(courses|assessments)\/(?:[^/]+\/)?(\d+):(\d+)/);
|
||||
if (!match) return null;
|
||||
const programme = parseInt(match[2], 10);
|
||||
const metaclass = parseInt(match[3], 10);
|
||||
|
||||
Reference in New Issue
Block a user