mirror of
https://github.com/BetterSEQTA/BetterSEQTA-Plus.git
synced 2026-06-06 03:34:40 +00:00
refac: improve multi browser support
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
import { createManifest } from '../../lib/createManifest'
|
||||
import baseManifest from './manifest.json'
|
||||
|
||||
export const brave = createManifest(baseManifest, 'brave')
|
||||
@@ -0,0 +1,4 @@
|
||||
import { createManifest } from '../../lib/createManifest'
|
||||
import baseManifest from './manifest.json'
|
||||
|
||||
export const chrome = createManifest(baseManifest, 'chrome')
|
||||
@@ -0,0 +1,4 @@
|
||||
import { createManifest } from '../../lib/createManifest'
|
||||
import baseManifest from './manifest.json'
|
||||
|
||||
export const edge = createManifest(baseManifest, 'edge')
|
||||
@@ -0,0 +1,20 @@
|
||||
import { createManifest } from '../../lib/createManifest'
|
||||
import baseManifest from './manifest.json'
|
||||
import pkg from '../../package.json'
|
||||
|
||||
const updatedFirefoxManifest = {
|
||||
...baseManifest,
|
||||
background: {
|
||||
scripts: [baseManifest.background.service_worker],
|
||||
},
|
||||
action: {
|
||||
"default_popup": "interface/index.html#settings",
|
||||
},
|
||||
browser_specific_settings: {
|
||||
gecko: {
|
||||
id: pkg.author.email,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
export const firefox = createManifest(updatedFirefoxManifest, 'firefox')
|
||||
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"manifest_version": 3,
|
||||
"name": "BetterSEQTA+",
|
||||
"version": "3.3.1",
|
||||
"description": "Enhance SEQTA Learn's usability and aesthetics! A fork of BetterSEQTA to continue development add add heaps more features!",
|
||||
"icons": {
|
||||
"32": "resources/icons/icon-32.png",
|
||||
"48": "resources/icons/icon-48.png",
|
||||
"64": "resources/icons/icon-64.png"
|
||||
},
|
||||
"action": {
|
||||
"browser_style": true,
|
||||
"default_popup": "interface/index.html#settings",
|
||||
"default_icon": {
|
||||
"32": "resources/icons/icon-32.png",
|
||||
"48": "resources/icons/icon-48.png",
|
||||
"64": "resources/icons/icon-64.png"
|
||||
}
|
||||
},
|
||||
"permissions": ["tabs", "notifications", "storage"],
|
||||
"host_permissions": ["https://newsapi.org/", "*://*/*"],
|
||||
"background": {
|
||||
"service_worker": "background.ts"
|
||||
},
|
||||
"content_scripts": [
|
||||
{
|
||||
"matches": ["*://*/*"],
|
||||
"js": ["SEQTA.ts"],
|
||||
"run_at": "document_start"
|
||||
}
|
||||
],
|
||||
"web_accessible_resources": [
|
||||
{
|
||||
"resources": ["interface/index.html"],
|
||||
"matches": ["*://*/*"]
|
||||
},
|
||||
{
|
||||
"resources": ["seqta/ui/background/background.html"],
|
||||
"matches": ["*://*/*"]
|
||||
},
|
||||
{
|
||||
"resources": ["*://*/*"],
|
||||
"matches": ["*://*/*"]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
import { createManifest } from '../../lib/createManifest'
|
||||
import baseManifest from './manifest.json'
|
||||
|
||||
export const opera = createManifest(baseManifest, 'opera')
|
||||
@@ -0,0 +1,16 @@
|
||||
import { createManifest } from '../../lib/createManifest'
|
||||
import baseManifest from './manifest.json'
|
||||
|
||||
const updatedSafariManifest = {
|
||||
...baseManifest,
|
||||
browser_specific_settings: {
|
||||
safari: {
|
||||
strict_min_version: '15.4',
|
||||
strict_max_version: '*',
|
||||
},
|
||||
// ^^^ https://developer.apple.com/documentation/safariservices/safari_web_extensions/optimizing_your_web_extension_for_safari#3743239
|
||||
// https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/browser_specific_settings#safari_properties
|
||||
},
|
||||
}
|
||||
|
||||
export const safari = createManifest(updatedSafariManifest, 'safari')
|
||||
Reference in New Issue
Block a user