Facebook MobWars Helper

By Piotr P. Karwasz Last update Dec 23, 2008 — Installed 91,001 times.

Ad Blocker

in
Subscribe to Ad Blocker 8 posts, 5 voices



Fiord User

Someone made a post about adding a bit of code to remove the top and side ads from the game. I've looked thru all the threads and cont seem to find it, does anyone remember or have the code handy?

 
Pea Cracker Scriptwright

var sad = Utils.getElementsByXPath('//div[@class="UICompatibilityFrame_SidebarAds"]/div')[0];
sad.parentNode.removeChild(sad);

 
Fiord User

where does this goe in the script?

 
Pea Cracker Scriptwright

anywhere as long as it's not contained in another subroutine (or function), if you're not sure, put it at the very end.

 
Keleas User

Does this not load the ad or just load it but make it invisible?

 
Pea Cracker Scriptwright

The latter. Your browser already received all the incoming data by the time GM runs. You would need to seek another add-on for Firefox that blocks loading data from given sites or URLs, then the page would only load (HTML), which references to the pictures or flash files of the ads, but not load the actual ads themselves. I find MW load much faster in FF when I turn off loading of all images... but I can't find a built-in feature for turning off the flash files.

 
FlyfisherMike User

Try a FF add-0n called ad-block plus then add the mob wars urls for the pages you want it to work on. Works great for speeding up the hitlist page. It gets ride of flash and anything annoying on the page.
^^ike

 
VoiceX User

I disabled some of the code that was not Ads


/* beg -- Pea Cracker's Utilities - 2008.11.22 */
/* Mob Wars ad-remover */
/* beg */
var ad = document.getElementById('app8743457343_container').childNodes[1];
ad.parentNode.removeChild(ad);
/* end */

/* FB sidebar ad-remover */
/* beg */
var sbad = document.getElementById('sidebar_ads').parentNode;
sbad.parentNode.removeChild(sbad);
/* end */

/* FB page footer-remover */
/* beg */
/* var pf = document.getElementById('pagefooter');
pf.parentNode.removeChild(pf); */
/* end */

/* FB page presence-remover */
/* beg */
/* var p = document.getElementById('presence');
p.parentNode.removeChild(p); */
/* end */
/* end -- Pea Cracker's Utilities */

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel