fix error in console
parent
7544be2f0f
commit
c10342e835
|
@ -895,7 +895,9 @@
|
|||
const detectionDiv = document.querySelector('#detection');
|
||||
const isAutoDark = getComputedStyle(detectionDiv).backgroundColor != 'rgb(255, 255, 255)';
|
||||
if (!isAutoDark) {
|
||||
const element = document.getElementsByClassName('comment-section')[0];
|
||||
let element = document.getElementsByClassName('comment-section')
|
||||
if (element) {
|
||||
element = element[0];
|
||||
let color = getComputedStyle(element).getPropertyValue('background-color');
|
||||
color = 'rgba' + color.slice(3,-1) + ', 0.1)'
|
||||
|
||||
|
@ -908,6 +910,7 @@
|
|||
style.innerHTML = `.actual-post:not(.deleted):not(.banned),.comment-section>.comment{background-image:url("data:image/svg+xml;base64,${base64Mark}")}`;
|
||||
document.getElementsByTagName('head')[0].appendChild(style);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
{% endif %}
|
||||
|
||||
|
|
Loading…
Reference in New Issue