friendsterTalk - Friendster Forum

friendsterTalk - Friendster Forum

Welcome guest! Please Login or Register.

  • Multiply
  •  » Hiding Your Multiply Ads - JS

#1  2008-01-25 05:09:54

tribalost
» FriendsterNewbie
tribalost's display avatar
| m|ss you s0oo...
Class X
Location: [Iligan City]
Registered: 2007-01-05
Posts: 14
Last visit: 2008-11-22
Reputation: 1
Friendster

Hiding Your Multiply Ads - JS

Heres a way for you to hide your multiply ads w/o having to hide all your iframes with CSS.
Place this chunk on your JS file.

Code:

function hideAds(){
var adssrc = document.getElementsByTagName('iframe');
var pattern = new RegExp("(^|\\s)http://images.multiply.com/ads/rmxads1.html(\\s|$)");
    for (i = 0, j = 0; i < adssrc.length; i++) {
        if ( pattern.test(adssrc[i].src) ) {
            adssrc[i].setAttribute('src','');
        }
    }
}

for (i = 0; i < 10; i++) { setTimeout("hideAds()",10000); }

Note:
The script loops up to 10 times to check if the ads still exist so this might cause a lil lag.
[I made it that way coz there are times when the script loads before the ads appear.]
You may change the loop set to reduce the lag.

Last edited by tribalost (2008-01-25 05:11:41)

#2  2008-01-25 08:10:38

blurrycloud
» Moderator
blurrycloud's display avatar
[ - AchilleS - ]
Class-S
Location: Aikhee's Heaven
Registered: 2007-09-07
Posts: 2568
Reputation: 98

Re: Hiding Your Multiply Ads - JS

nice.. thanks for sharing bro... ur from MCT right...  :eh:  :thumbsup:


Back to my default status: School mode

#3  2008-01-26 00:58:21

tribalost
» FriendsterNewbie
tribalost's display avatar
| m|ss you s0oo...
Class X
Location: [Iligan City]
Registered: 2007-01-05
Posts: 14
Last visit: 2008-11-22
Reputation: 1
Friendster

Re: Hiding Your Multiply Ads - JS

Yup^^
Figured the mp sction of this site 's kindda lively so tried if I can mingle :P

#4  2008-01-26 01:15:50

xavierkym
» Retired Moderator
The Sinister
Class-S
Location: London, England
Registered: 2007-06-10
Posts: 5370
Reputation: 129
Friendster

Re: Hiding Your Multiply Ads - JS

^
Waw.
Enx for sharing bro.. =)
That's really good. :D

PS: Useful if you have some iframes. ;)


#5  2008-01-26 02:51:09

tribalost
» FriendsterNewbie
tribalost's display avatar
| m|ss you s0oo...
Class X
Location: [Iligan City]
Registered: 2007-01-05
Posts: 14
Last visit: 2008-11-22
Reputation: 1
Friendster

Re: Hiding Your Multiply Ads - JS

Like anti-poser cBox and any other iframes on the rails ^^

#6  2008-01-27 03:53:40

Ephemeral
» Moderator
Ephemeral's display avatar
L'Interdit
Class-S
Location: Perdido Paraíso
Registered: 2006-10-20
Posts: 10253
Reputation: 281
Friendster

Re: Hiding Your Multiply Ads - JS

wow nice code bro. :eh:


#7  2008-02-05 03:34:08

lusanto_bluzone
» FriendsterNewbie
lusanto_bluzone's display avatar
HENSHIN!!!!
Location: Makati
Registered: 2008-02-04
Posts: 61
Last visit: 2008-11-17
Reputation: ~
Friendster

Re: Hiding Your Multiply Ads - JS

I thought it was a part of the CSS code... Joke! But I'm serious on this, nobody's allowed to include codes in the CSS that blocks ads, according to MCT rules... :O

  • Multiply
  •  » Hiding Your Multiply Ads - JS

Search Friendstertalk

Moderated by Ephemeral, blurrycloud, dale

Board footer

FriendsterTalk is not affiliated with Friendster.com
Copyright © 2002–2008 PunBB

[ 15 queries - 1.186 second ]

Pay Per Click Ads by pay per click advertising by Kontera

FriendsterTalk.com x

Welcome to FriendsterTalk! You'll need to login in order to fully use all the features and view all the sections of this site.

Please register if you're not yet a member. =)