Selaa lähdekoodia

fixed styling issue in the log panel

Gildas 7 vuotta sitten
vanhempi
sitoutus
c54c024c3b
1 muutettua tiedostoa jossa 3 lisäystä ja 1 poistoa
  1. 3 1
      extension/ui/content/content-ui.js

+ 3 - 1
extension/ui/content/content-ui.js

@@ -31,6 +31,8 @@ this.singlefile.ui = this.singlefile.ui || (() => {
 	let selectedAreaElement;
 
 	let logsWindowElement = createLogsWindowElement();
+	const allProperties = new Set();
+	Array.from(getComputedStyle(document.body)).forEach(property => allProperties.add(property));
 
 	return {
 		getSelectedArea,
@@ -325,7 +327,7 @@ this.singlefile.ui = this.singlefile.ui || (() => {
 	}
 
 	function initStyle(element) {
-		Array.from(getComputedStyle(element)).forEach(property => element.style.setProperty(property, "initial", "important"));
+		allProperties.forEach(property => element.style.setProperty(property, "initial", "important"));
 	}
 
 })();