add initial bugfixes

This commit is contained in:
Alphons
2023-12-02 17:44:48 +08:00
parent 5d8b3bf04d
commit 4fe759b5bb
6 changed files with 4795 additions and 27 deletions
+3 -3
View File
@@ -1,5 +1,5 @@
/* global chrome */
import { GetThresholdOfColor, GetiFrameCSSElement } from '../../../SEQTA.js';
import { GetThresholdOfColor, GetCSSElement } from '../../../SEQTA.js';
import { lightenAndPaleColor } from './lightenAndPaleColor.js';
import ColorLuminance from './ColorLuminance.js';
@@ -66,7 +66,7 @@ export function updateAllColors(storedSetting, newColor = null) {
}
let alliframes = document.getElementsByTagName('iframe');
let fileref = GetiFrameCSSElement();
let fileref = GetCSSElement('css/iframe.css');
for (let i = 0; i < alliframes.length; i++) {
const element = alliframes[i];
@@ -79,7 +79,7 @@ export function updateAllColors(storedSetting, newColor = null) {
console.log(element.contentDocument.documentElement);
element.contentDocument.documentElement.childNodes[1].style.color =
DarkMode ? 'black' : 'white';
DarkMode ? 'white' : 'black';
element.contentDocument.documentElement.firstChild.appendChild(
fileref,
);