mirror of
https://github.com/BetterSEQTA/BetterSEQTA-Plus.git
synced 2026-06-05 19:24:39 +00:00
merge changes from main to svelte
This commit is contained in:
@@ -53,12 +53,13 @@ Please don't use this in a production environment - it is quite buggy and is not
|
||||
- Brave Supported
|
||||
- Opera Supported
|
||||
- Vivaldi Supported
|
||||
- Firefox (Experimental - available [here](https://addons.mozilla.org/en-US/firefox/addon/betterseqta-plus/))
|
||||
- Chromium-based browsers are supported
|
||||
- Firefox (Experimental - available [here](https://addons.mozilla.org/en-US/firefox/addon/betterseqta-plus/)
|
||||
- Safari (Experimental - only available via compilation)
|
||||
|
||||
## Creating Custom Themes
|
||||
|
||||
If you are looking to create custom themes, I would recommend you start at the official documentation [here](https://betterseqta.gitbook.io/betterseqta-docs). You can see some premade examples along with a compilation script that can be used to allow for CSS frameworks and libraries such as SCSS to be used [here](https://github.com/SethBurkart123/BetterSEQTA-theme-generator).
|
||||
If you are looking to create custom themes, I would recommend you start at the official documentation [here](https://betterseqta.gitbook.io/betterseqta-docs). You can see some premade examples along with a compilation script that can be used to allow for CSS frameworks and libraries such as SCSS to be used [here](https://github.com/BetterSEQTA/BetterSEQTA-Theme-Generator).
|
||||
|
||||
Don't worry- if you get stuck feel free to ask around in the discord. We're open and happy to help out! Happy creating :)
|
||||
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
TEMPORARY FIX FOR CHROME 130+ builds
|
||||
*/
|
||||
|
||||
import path from 'node:path';
|
||||
import fs from 'fs';
|
||||
import { PluginOption } from 'vite';
|
||||
import { ManifestV3Export } from '@crxjs/vite-plugin';
|
||||
|
||||
const manifestPath = path.resolve('dist/chrome/manifest.json');
|
||||
|
||||
export function updateManifestPlugin(): PluginOption {
|
||||
return {
|
||||
name: 'update-manifest-plugin',
|
||||
enforce: 'post',
|
||||
closeBundle() {
|
||||
forceDisableUseDynamicUrl();
|
||||
},
|
||||
|
||||
configureServer(server) {
|
||||
server.httpServer?.once('listening', () => {
|
||||
const updated = forceDisableUseDynamicUrl();
|
||||
if (updated) {
|
||||
server.ws.send({ type: 'full-reload' });
|
||||
console.log('** updated **');
|
||||
}
|
||||
|
||||
fs.watchFile(manifestPath, () => {
|
||||
console.log('** watchFile ** ');
|
||||
const manifestContents = JSON.parse(fs.readFileSync(manifestPath, 'utf8'));
|
||||
if (manifestContents.web_accessible_resources.some((resource: any) => resource.use_dynamic_url)) {
|
||||
const updated = forceDisableUseDynamicUrl();
|
||||
if (updated) {
|
||||
server.ws.send({ type: 'full-reload' });
|
||||
console.log('** updated **');
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
writeBundle() {
|
||||
console.log('### writeBundle ##');
|
||||
forceDisableUseDynamicUrl();
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
function forceDisableUseDynamicUrl() {
|
||||
if (!fs.existsSync(manifestPath)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const manifestContents = JSON.parse(fs.readFileSync(manifestPath, 'utf8')) as Awaited<ManifestV3Export>;
|
||||
|
||||
if (typeof manifestContents === 'function' || !manifestContents.web_accessible_resources) return false;
|
||||
if (manifestContents.web_accessible_resources.every((resource) => !resource.use_dynamic_url)) return false;
|
||||
|
||||
manifestContents.web_accessible_resources.forEach((resource) => {
|
||||
if (resource.use_dynamic_url) resource.use_dynamic_url = false;
|
||||
});
|
||||
|
||||
fs.writeFileSync(manifestPath, JSON.stringify(manifestContents, null, 2));
|
||||
return true;
|
||||
}
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "betterseqtaplus",
|
||||
"version": "3.3.1",
|
||||
"version": "3.3.2",
|
||||
"type": "module",
|
||||
"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",
|
||||
|
||||
@@ -118,6 +118,10 @@ html {
|
||||
z-index: 10000;
|
||||
}
|
||||
|
||||
.modaliser-container {
|
||||
backdrop-filter: none !important;
|
||||
}
|
||||
|
||||
.connectedNotificationsWrapper > div > button > svg > g {
|
||||
fill: var(--theme-primary) !important;
|
||||
}
|
||||
|
||||
@@ -22,6 +22,9 @@
|
||||
"background": {
|
||||
"service_worker": "background.ts"
|
||||
},
|
||||
"content_security_policy": {
|
||||
"extension_pages": "script-src 'self' 'wasm-unsafe-eval'; object-src 'self'"
|
||||
},
|
||||
"content_scripts": [
|
||||
{
|
||||
"matches": ["*://*/*"],
|
||||
|
||||
+3
-1
@@ -1,6 +1,7 @@
|
||||
import { defineConfig } from 'vite';
|
||||
import { join, resolve } from 'path';
|
||||
|
||||
import { updateManifestPlugin } from './lib/patchPackage';
|
||||
import { base64Loader } from './lib/base64loader';
|
||||
import type { BuildTarget } from './lib/types';
|
||||
|
||||
@@ -36,7 +37,8 @@ export default defineConfig({
|
||||
crx({
|
||||
manifest: targets.find(t => t.browser === mode.toLowerCase())?.manifest ?? chrome.manifest,
|
||||
browser: mode.toLowerCase() === "firefox" ? "firefox" : "chrome"
|
||||
})
|
||||
}),
|
||||
updateManifestPlugin()
|
||||
],
|
||||
root: resolve(__dirname, './src'),
|
||||
resolve: {
|
||||
|
||||
Reference in New Issue
Block a user