mirror of
https://github.com/BetterSEQTA/BetterSEQTA-Plus.git
synced 2026-06-06 03:34:40 +00:00
Merge pull request #173 from BetterSEQTA/main
Bring svelte up to date with main
This commit is contained in:
@@ -0,0 +1,27 @@
|
|||||||
|
---
|
||||||
|
name: Report A bug.
|
||||||
|
about: Create a report of a present bug.
|
||||||
|
title: "[BUG]"
|
||||||
|
labels: bug
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Describe the bug**
|
||||||
|
A clear and concise description of what the bug is.
|
||||||
|
|
||||||
|
**To Reproduce**
|
||||||
|
Please indicate how did you make this happen.
|
||||||
|
|
||||||
|
**Expected behaviuor**
|
||||||
|
Please add a clear and concise description of what you expected to happen.
|
||||||
|
|
||||||
|
**Screenshots**
|
||||||
|
If applicable, add screenshots to help explain your problem.
|
||||||
|
|
||||||
|
**Desktop (please complete the following information):**
|
||||||
|
- OS: [e.g. iOS]
|
||||||
|
- If using Windows, the build number. Find this by using ```winver``` and copying down the build id.
|
||||||
|
|
||||||
|
**Additional context**
|
||||||
|
Add any other context about the problem here.
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
---
|
||||||
|
name: Feature request
|
||||||
|
about: Suggest an idea for this project
|
||||||
|
title: "[FR] "
|
||||||
|
labels: enhancement
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Is your feature request related to a problem? Please describe.**
|
||||||
|
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.
|
||||||
|
|
||||||
|
**Describe alternatives you've considered**
|
||||||
|
A clear and concise description of any alternative solutions or features you've considered.
|
||||||
|
|
||||||
|
**Additional context**
|
||||||
|
Add any other context or screenshots about the feature request here.
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
---
|
||||||
|
name: Vulnerability
|
||||||
|
about: Report a vulnerability in this extension.
|
||||||
|
title: "[VUL] "
|
||||||
|
labels: ''
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**What is the vulnerability?**
|
||||||
|
Describe the vulnerability in concise language.
|
||||||
|
|
||||||
|
**Where is the vulnerability found?**
|
||||||
|
Describe where the vulnerability is found.
|
||||||
|
|
||||||
|
**What does this affect?**
|
||||||
|
Explain what it affects. E.G: It opens up my school email to the world. etc.
|
||||||
@@ -110,7 +110,7 @@ npm run build
|
|||||||
3. Package it up (optional)
|
3. Package it up (optional)
|
||||||
|
|
||||||
```
|
```
|
||||||
npm run package # This requires 7-Zip to be installed in order to work
|
npm run zip # This requires 7-Zip to be installed in order to work
|
||||||
```
|
```
|
||||||
|
|
||||||
## Folder Structure
|
## Folder Structure
|
||||||
|
|||||||
+15
@@ -0,0 +1,15 @@
|
|||||||
|
# Security Policy
|
||||||
|
|
||||||
|
## Supported Versions
|
||||||
|
|
||||||
|
Below here is the supported versions of BetterSEQTA+. Anything older than this is not supported and contains bugs.
|
||||||
|
|
||||||
|
| Version | Supported |
|
||||||
|
| ------- | ------------------ |
|
||||||
|
| 3.3.x | :white_check_mark: |
|
||||||
|
| 3.0.x | :x: |
|
||||||
|
| < 3.0 | :x: |
|
||||||
|
|
||||||
|
## Reporting a Vulnerability
|
||||||
|
|
||||||
|
If you find vulnerabilities, REPORT IT IMMEDIATELY. Make an issue and use the template provided for vulnerabilities.
|
||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
"name": "betterseqtaplus",
|
"name": "betterseqtaplus",
|
||||||
"version": "3.3.1",
|
"version": "3.3.1",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"description": "Enhance SEQTA Learn's usability and aesthetics! A fork of BetterSEQTA to continue development, and incorporate a plethora of new features!",
|
"description": "Enhance SEQTA Learn's usability and aesthetics! A fork of BetterSEQTA to continue development, while incorporating a plethora of new and improved features!",
|
||||||
"browserslist": "> 0.5%, last 2 versions, not dead",
|
"browserslist": "> 0.5%, last 2 versions, not dead",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "cross-env MODE=chrome vite dev",
|
"dev": "cross-env MODE=chrome vite dev",
|
||||||
|
|||||||
+13
-12
@@ -56,7 +56,8 @@ async function init() {
|
|||||||
|
|
||||||
if (hasSEQTAText && hasSEQTATitle && !IsSEQTAPage) {
|
if (hasSEQTAText && hasSEQTATitle && !IsSEQTAPage) {
|
||||||
IsSEQTAPage = true
|
IsSEQTAPage = true
|
||||||
console.log('[BetterSEQTA+] Verified SEQTA Page')
|
console.info('[BetterSEQTA+] Verified SEQTA Page')
|
||||||
|
|
||||||
const documentLoadStyle = document.createElement('style')
|
const documentLoadStyle = document.createElement('style')
|
||||||
documentLoadStyle.textContent = documentLoadCSS
|
documentLoadStyle.textContent = documentLoadCSS
|
||||||
document.head.appendChild(documentLoadStyle)
|
document.head.appendChild(documentLoadStyle)
|
||||||
@@ -80,7 +81,7 @@ async function init() {
|
|||||||
document.head.appendChild(injectedStyle)
|
document.head.appendChild(injectedStyle)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
console.info('[BetterSEQTA+] Successfully initalised BetterSEQTA+, starting to load assets.')
|
||||||
main()
|
main()
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
console.error(error)
|
console.error(error)
|
||||||
@@ -107,7 +108,7 @@ async function HideMenuItems(): Promise<void> {
|
|||||||
for (const [menuItem, { toggle }] of Object.entries(settingsState.menuitems)) {
|
for (const [menuItem, { toggle }] of Object.entries(settingsState.menuitems)) {
|
||||||
if (!toggle) {
|
if (!toggle) {
|
||||||
stylesheetInnerText += SetDisplayNone(menuItem)
|
stylesheetInnerText += SetDisplayNone(menuItem)
|
||||||
console.log(`[BetterSEQTA+] Hiding ${menuItem} menu item`)
|
console.info(`[BetterSEQTA+] Hiding ${menuItem} menu item`)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -115,7 +116,7 @@ async function HideMenuItems(): Promise<void> {
|
|||||||
menuItemStyle.innerText = stylesheetInnerText
|
menuItemStyle.innerText = stylesheetInnerText
|
||||||
document.head.appendChild(menuItemStyle)
|
document.head.appendChild(menuItemStyle)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("An error occurred:", error)
|
console.error("[BetterSEQTA+] An error occurred:", error)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -746,7 +747,7 @@ async function handleSublink(sublink: string | undefined): Promise<void> {
|
|||||||
break;
|
break;
|
||||||
case 'home':
|
case 'home':
|
||||||
window.location.replace(`${location.origin}/#?page=/home`);
|
window.location.replace(`${location.origin}/#?page=/home`);
|
||||||
console.log('[BetterSEQTA+] Started Init')
|
console.info('[BetterSEQTA+] Started Init')
|
||||||
if (settingsState.onoff) loadHomePage()
|
if (settingsState.onoff) loadHomePage()
|
||||||
finishLoad();
|
finishLoad();
|
||||||
break;
|
break;
|
||||||
@@ -790,7 +791,7 @@ async function handleTimetable(): Promise<void> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function handleNewsPage(): Promise<void> {
|
async function handleNewsPage(): Promise<void> {
|
||||||
console.log('[BetterSEQTA+] Started Init');
|
console.info('[BetterSEQTA+] Started Init');
|
||||||
if (settingsState.onoff) {
|
if (settingsState.onoff) {
|
||||||
SendNewsPage();
|
SendNewsPage();
|
||||||
if (settingsState.notificationcollector) {
|
if (settingsState.notificationcollector) {
|
||||||
@@ -1009,7 +1010,7 @@ function main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (settingsState.onoff) {
|
if (settingsState.onoff) {
|
||||||
console.log('[BetterSEQTA+] Enabled')
|
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')
|
document.querySelector('.legacy-root')?.classList.add('hidden')
|
||||||
@@ -1029,7 +1030,7 @@ function main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function InjectCustomIcons() {
|
function InjectCustomIcons() {
|
||||||
console.log('[BetterSEQTA+] Injecting Icons')
|
console.info('[BetterSEQTA+] Injecting Icons')
|
||||||
|
|
||||||
const style = document.createElement('style')
|
const style = document.createElement('style')
|
||||||
style.setAttribute('type', 'text/css')
|
style.setAttribute('type', 'text/css')
|
||||||
@@ -1044,7 +1045,7 @@ function InjectCustomIcons() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function AppendElementsToDisabledPage() {
|
export function AppendElementsToDisabledPage() {
|
||||||
console.log("[BetterSEQTA+] Appending elements to disabled page")
|
console.info("[BetterSEQTA+] Appending elements to disabled page")
|
||||||
AddBetterSEQTAElements()
|
AddBetterSEQTAElements()
|
||||||
|
|
||||||
let settingsStyle = document.createElement('style')
|
let settingsStyle = document.createElement('style')
|
||||||
@@ -2162,7 +2163,7 @@ async function AddCustomShortcutsToPage() {
|
|||||||
|
|
||||||
export async function loadHomePage() {
|
export async function loadHomePage() {
|
||||||
// Sends the html data for the home page
|
// Sends the html data for the home page
|
||||||
console.log('[BetterSEQTA+] Started Loading Home Page')
|
console.info('[BetterSEQTA+] Started Loading Home Page')
|
||||||
|
|
||||||
document.title = 'Home ― SEQTA Learn'
|
document.title = 'Home ― SEQTA Learn'
|
||||||
const element = document.querySelector('[data-key=home]')
|
const element = document.querySelector('[data-key=home]')
|
||||||
@@ -2508,7 +2509,7 @@ export function enableNotificationCollector() {
|
|||||||
'notifications__bubble___1EkSQ'
|
'notifications__bubble___1EkSQ'
|
||||||
)[0]
|
)[0]
|
||||||
if (typeof alertdiv == 'undefined') {
|
if (typeof alertdiv == 'undefined') {
|
||||||
console.log('[BetterSEQTA+] No notifications currently')
|
console.info('[BetterSEQTA+] No notifications currently')
|
||||||
} else {
|
} else {
|
||||||
alertdiv.textContent = Notifications.payload.notifications.length
|
alertdiv.textContent = Notifications.payload.notifications.length
|
||||||
}
|
}
|
||||||
@@ -2558,7 +2559,7 @@ function createNewShortcut(link: any, icon: any, viewBox: any, title: any) {
|
|||||||
export function SendNewsPage() {
|
export function SendNewsPage() {
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
// Sends the html data for the home page
|
// Sends the html data for the home page
|
||||||
console.log('[BetterSEQTA+] Started Loading News Page')
|
console.info('[BetterSEQTA+] Started Loading News Page')
|
||||||
document.title = 'News ― SEQTA Learn'
|
document.title = 'News ― SEQTA Learn'
|
||||||
var element = document.querySelector('[data-key=news]')
|
var element = document.querySelector('[data-key=news]')
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user