I would like to be able to remove a div with an id that changes every time you refresh the page.
The div looks like this:
<div id="8474adblockinfo">
</div>
So there is a regular id called 'adblockinfo' and it always has a set of 4 numbers in the id before 'adblockinfo' (e.g. 1234adblockinfo, 1235adblockinfo). Any idea how I can remove this with a Tampermonkey script?
I've tried code:
$("div[id$='adblockinfo']").remove
$("div[id$='adblockinfo']").css('display', 'none');
Neither seems to work.
I also think that the webpage is inserting the div via AJAX after pageload or something, so that could be an issue? I've tried running the script at:
// @run-at document-idle
but that didn't do it.
Any tips on this?
$("div[id$='adblockinfo']").remove
it should be$("div[id$='adblockinfo']").remove()