I would like to remove some hosting imposed google ads on my phpbb board.
Currently I accomplish this by deleting via javascript all the banners divs when the page is loaded.
But unfortunately in that way advertisements are quickly displayed before disappearing.
Now I am thinking about a different (neater) approach to my problem:
maybe I might write some javascript code which interferes with the one injected by google thus generating the inability to show those annoying divs…
Any idea?
I can’t edit html and css, I am just allowed to insert any html/javascript/css code in a separate “widget”. This is for testing purposes and I have the admin permission to try …
My current code follows
<script type=”text/javascript”>
window.onload = function(){
document.getElementById(‘ad’).getElementsByTagName(‘div’)[0].outerHTML=”;
document.getElementById(‘ad2’).outerHTML=”;
document.getElementById(‘footer’).outerHTML=”;
document.getElementById(‘ad3’).getElementsByTagName(‘a’)[1].outerHTML=”;
};
</script>