Fix eslint Issues

This commit is contained in:
anapnoe
2024-09-20 15:05:54 +03:00
parent 6a6e5333b6
commit eff3d7d112
2 changed files with 15 additions and 15 deletions

View File

@@ -1477,18 +1477,18 @@ function setupOnLoadResources() {
content_div.appendChild(script);
setupAdditionalStylesForExtensions();
const iibframe = document.querySelector("#infinite_image_browsing_container_wrapper > iframe");
if(iibframe){
var css = document.querySelector('[rel="stylesheet"][href*="user"]');
var rootRules = Array.from(css.sheet.cssRules).filter(function(cssRule) {
return (cssRule instanceof CSSStyleRule && cssRule.selectorText === ":root");
});
var rootCssText = rootRules[0].cssText;
const iibframe = document.querySelector("#infinite_image_browsing_container_wrapper > iframe");
if (iibframe) {
var css = document.querySelector('[rel="stylesheet"][href*="user"]');
var rootRules = Array.from(css.sheet.cssRules).filter(function(cssRule) {
return (cssRule instanceof CSSStyleRule && cssRule.selectorText === ":root");
});
var rootCssText = rootRules[0].cssText;
iibframe.addEventListener("load", ev => {
const new_style_element = document.createElement("style");
//getComputedStyle(document.documentElement).getPropertyValue('--my-variable-name');
new_style_element.textContent =
iibframe.addEventListener("load", ev => {
const new_style_element = document.createElement("style");
//getComputedStyle(document.documentElement).getPropertyValue('--my-variable-name');
new_style_element.textContent =
`
${rootCssText}
:root body {
@@ -1655,9 +1655,9 @@ function setupOnLoadResources() {
`;
ev.target.contentDocument.head.appendChild(new_style_element);
});
}
ev.target.contentDocument.head.appendChild(new_style_element);
});
}
}

View File

@@ -42,4 +42,4 @@ function imageMaskResize() {
onAfterUiUpdate(imageMaskResize);
window.addEventListener('resize', imageMaskResize);
*/
*/