No longer changing inner html
This commit is contained in:
parent
c313a4328b
commit
b04e192e49
1 changed files with 6 additions and 11 deletions
17
content.js
17
content.js
|
@ -47,18 +47,13 @@ let app_css = `
|
||||||
}
|
}
|
||||||
#app_menu.empty { background-color: transparent }`;
|
#app_menu.empty { background-color: transparent }`;
|
||||||
|
|
||||||
let style = document.getElementsByTagName("style");
|
let style = document.createElement("style");
|
||||||
if (style.length == 0) {
|
let main_page = document.getElementsByClassName("motiv-titulka");
|
||||||
document.head.innerHTML += "<style>" + app_css + other_css + "</style>";
|
if (main_page.length == 0) {
|
||||||
|
style.innerText = app_css + other_css;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
let main_page = document.getElementsByClassName("motiv-titulka");
|
style.innerText = main_menu_css + other_css;
|
||||||
if (main_page.length == 0) {
|
|
||||||
style[0].innerHTML += app_css + other_css;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
style[0].innerHTML += main_menu_css + other_css;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
document.head.appendChild(style)
|
Loading…
Reference in a new issue