10000 forum users celebration - special event

:slight_smile:

how can I get my mofh ad code to update faster?

i literally wrote my own scripts that do the same things as admins

Make the ad code create a script element which is hosted elsewhere, then that script src will have the latest code.

The thing is, I am waiting for the ad code itself to update

what is wrong with my JS

<!--Hiding things we don't want to see -->
<script>
window.addEventListener("load", function() {
document.getElementById("item_attracta_seotips").style.display = "none";
document.getElementById("icon-attracta_seotips").style.display = "none";
});
</script>
<button onclick="greentheme">Green Theme</button>
<script>
function greentheme() {
document.getElementById("cpanel_body").style.backgroundColor('green')
}
</script>

@anon19508339 the js queen… help me pls

2 Likes

That’s what I don’t get, you mean the copyright or what?

it isn’t hiding the things that it should

this isn’t working

Have you got the element Ids correct?

yes

It is because the panel starts to load (with a bit of delay) after the page is loaded ( window.addEventListener("load".()=>{}) fired before panel loads)
Try this instead:

<script>
function remove(){
    if (document.getElementById("item_attracta_seotips")!=null){
       document.getElementById("item_attracta_seotips").style.display = "none";
       document.getElementById("icon-attracta_seotips").style.display = "none";
    }else{
       setTimeout(remove,100);
    } 
}
setTimeout(remove,100);
</script>
5 Likes

thanks

SEO tools is still there…
image

You put a . instead of a ,

3 Likes

You could instead use a mutation observer, which is much more efficient and guarantees for it to work with computers that are slower (100 milliseconds isn’t a lot)

I wish there was an Adblocker where I can allow the “normal” on screen ads here, but block the popup ones. They get soooo annoying and I know it was said before that Admin cannot decide is ads are shown as popups or not.

4 Likes

This:
<button onclick="greentheme">Green Theme</button>

i think should be:

<button onclick="greentheme()">Green Theme</button>

4 Likes

Ah, I totally forgot about the requirement of ()

3 Likes