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:
+9
-4
@@ -438,11 +438,13 @@ function CheckiFrameItems() {
|
||||
'iframe.css',
|
||||
)
|
||||
) {
|
||||
innerHTMLNode.appendChild(
|
||||
innerHTMLNode.append(
|
||||
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 (
|
||||
childNode.style
|
||||
.color != 'white'
|
||||
@@ -455,7 +457,7 @@ function CheckiFrameItems() {
|
||||
'iframe.css',
|
||||
)
|
||||
) {
|
||||
innerHTMLNode.appendChild(
|
||||
innerHTMLNode.append(
|
||||
fileref,
|
||||
);
|
||||
}
|
||||
@@ -638,11 +640,14 @@ function CheckNoticeTextColour(notice: any) {
|
||||
DarkMode = result.DarkMode;
|
||||
if (node.classList.contains('notice')) {
|
||||
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) {
|
||||
node.style.cssText = '--color: undefined;';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
result.then(open, onError)
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user