mirror of
https://github.com/BetterSEQTA/BetterSEQTA-Plus.git
synced 2026-06-06 03:34:40 +00:00
fix notice colour issue
This commit is contained in:
+23
-53
@@ -1,14 +1,12 @@
|
|||||||
{
|
{
|
||||||
"manifest_version": 3,
|
"manifest_version": 2,
|
||||||
"name": "BetterSEQTA+",
|
"name": "BetterSEQTA+",
|
||||||
"version": "3.2.2",
|
"version": "3.2.2",
|
||||||
"description": "Make SEQTA usable and beautiful! A fork of BetterSEQTA to continue development and add WAY more features!!!",
|
"description": "Make SEQTA usable and beautiful! A fork of BetterSEQTA to continue development and add WAY more features!!!",
|
||||||
"icons": {
|
"icons": {
|
||||||
"32": "icons/icon-32.png",
|
"48": "icons/icon-48.png"
|
||||||
"48": "icons/icon-48.png",
|
|
||||||
"64": "icons/icon-64.png"
|
|
||||||
},
|
},
|
||||||
"action": {
|
"browser_action": {
|
||||||
"browser_style": true,
|
"browser_style": true,
|
||||||
"default_popup": "interface/index.html#settings",
|
"default_popup": "interface/index.html#settings",
|
||||||
"default_icon": {
|
"default_icon": {
|
||||||
@@ -17,11 +15,16 @@
|
|||||||
"64": "icons/icon-64.png"
|
"64": "icons/icon-64.png"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"permissions": ["tabs", "notifications", "storage"],
|
"permissions": ["tabs", "notifications", "storage", "https://newsapi.org/"],
|
||||||
"host_permissions": ["https://newsapi.org/", "*://*/*"],
|
|
||||||
"background": {
|
"background": {
|
||||||
"service_worker": "background.js"
|
"scripts": [
|
||||||
},
|
"browser-polyfill.js",
|
||||||
|
"background.js"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"optional_permissions": [
|
||||||
|
"*://*/*"
|
||||||
|
],
|
||||||
"content_scripts": [
|
"content_scripts": [
|
||||||
{
|
{
|
||||||
"matches": ["*://*/*"],
|
"matches": ["*://*/*"],
|
||||||
@@ -30,49 +33,16 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"web_accessible_resources": [
|
"web_accessible_resources": [
|
||||||
{
|
"icons/*",
|
||||||
"resources": ["icons/*"],
|
"fonts/*",
|
||||||
"matches": ["*://*/*"]
|
"images/*",
|
||||||
},
|
"css/*",
|
||||||
{
|
"popup/*",
|
||||||
"resources": ["fonts/*"],
|
"client.js",
|
||||||
"matches": ["*://*/*"]
|
"index.css",
|
||||||
},
|
"interface/*",
|
||||||
{
|
"client/*",
|
||||||
"resources": ["images/*"],
|
"resources/*",
|
||||||
"matches": ["*://*/*"]
|
"backgrounds/*"
|
||||||
},
|
|
||||||
{
|
|
||||||
"resources": ["css/*"],
|
|
||||||
"matches": ["*://*/*"]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"resources": ["popup/*"],
|
|
||||||
"matches": ["*://*/*"]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"resources": ["client.js"],
|
|
||||||
"matches": ["*://*/*"]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"resources": ["index.css"],
|
|
||||||
"matches": ["*://*/*"]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"resources": ["interface/*"],
|
|
||||||
"matches": ["*://*/*"]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"resources": ["client/*"],
|
|
||||||
"matches": ["*://*/*"]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"resources": ["resources/*"],
|
|
||||||
"matches": ["*://*/*"]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"resources": ["backgrounds/*"],
|
|
||||||
"matches": ["*://*/*"]
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
+9
-4
@@ -438,11 +438,13 @@ function CheckiFrameItems() {
|
|||||||
'iframe.css',
|
'iframe.css',
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
innerHTMLNode.appendChild(
|
innerHTMLNode.append(
|
||||||
fileref,
|
fileref,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
added_node.addEventListener('load', function () {
|
node.addEventListener('load', function () {
|
||||||
|
const childNode = node.contentDocument!.documentElement.childNodes[1] as HTMLElement
|
||||||
|
const innerHTMLNode = node.contentDocument!.documentElement.firstChild! as HTMLElement
|
||||||
if (
|
if (
|
||||||
childNode.style
|
childNode.style
|
||||||
.color != 'white'
|
.color != 'white'
|
||||||
@@ -455,7 +457,7 @@ function CheckiFrameItems() {
|
|||||||
'iframe.css',
|
'iframe.css',
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
innerHTMLNode.appendChild(
|
innerHTMLNode.append(
|
||||||
fileref,
|
fileref,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -638,12 +640,15 @@ function CheckNoticeTextColour(notice: any) {
|
|||||||
DarkMode = result.DarkMode;
|
DarkMode = result.DarkMode;
|
||||||
if (node.classList.contains('notice')) {
|
if (node.classList.contains('notice')) {
|
||||||
var hex = node.style.cssText.split(' ')[1];
|
var hex = node.style.cssText.split(' ')[1];
|
||||||
var threshold = GetThresholdOfColor(hex);
|
if (hex) {
|
||||||
|
const hex1 = hex.slice(0,-1)
|
||||||
|
var threshold = GetThresholdOfColor(hex1);
|
||||||
if (DarkMode && threshold < 100) {
|
if (DarkMode && threshold < 100) {
|
||||||
node.style.cssText = '--color: undefined;';
|
node.style.cssText = '--color: undefined;';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
result.then(open, onError)
|
result.then(open, onError)
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user