I've got a site which has annoying features - f.e it detects adblock and puts on big rectangle on the video window saying that I should disable adblock. The code for this looks like this:
<div class="tvpoverlay_element" id="tvpoverlay_abdinfo" style="cursor: pointer;">
<div style="top: 20%; left: 0px; width: 100%; height: auto; position: absolute; display: block; pointer-events: auto;">
So if I insert display: none
in the second line, the rectangle would disappear, and I would be very happy. I wanted to make simple script to automate this process. I tried command:
document.getElementById('tvpoverlay_abdinfo').style.display = 'none'
but .getElementById()
returrns null. How can I get to this div and change the display, if the solution above doesn't work?