LinkStripper TEST, v1.2

I don't want to have to keep entering and maintaining special mouseover window status urls or messages, so I made this srcipt to just dig out the base domain of affiliate links if the link has an acceptable domain and let it go, stripping the affiliate code, subdomains, cgi and paths.  It can also select from a list of messages so you don't have to keep retyping it in the link tag

To test, just mouse over (don't click) to check window status; useage is as follows:

  • (this) shows base domain if link is a typical url or a Javascript call for a popup with a url. If a domain exists somewhere in the link, it will suck it out. This is the main intended use.
  • ('desireddomain.com') shows a desired false url with specified domain, overrides real or current domain.
  • (this) shows url with domain of CURRENT site page if link is JavaScript call with no domain in link.
  • (this) shows specified default url 'IP message' if any type of link includes only an IP address with no domain to detect.
  • (1) shows the specified message from an unlimited list for any link type, intentded for Javascript calls, works for all.
  • ('Message to surfer') shows desired Message for any type of link.
  • () shows blank message for any type of link.


Normal affiliate URLs with subdomain:

Blank message, call ()
href="http://WHATEVERsubDOMAIN.in.>cybererotica.com/cgi-bin/fmp.cgi/1204/2124074/D" onMouseOver="return ws()" onMouseOut="return ws()"

Domian url, call (this)
href="http://WHATEVERsubDOMAIN.in.cybererotica.com/cgi-bin/fmp.cgi/1204/2124074/D" onMouseOver="return ws(this)" onMouseOut="return ws()"

Domian url, sub and root domains similar to TLD's, call (this)
href="http://www.compost.networks.orgies.at.comeonin.com/cgi-bin/orgy.cgi/1204/2124074/D" onMouseOver="return ws(this)" onMouseOut="return ws()"

False domain url, call ('falsedomain.com')
http://WHATEVERsubDOMAIN.in.cybererotica.com/cgi-bin/fmp.cgi/1204/2124074/D" onMouseOver="return ws('falsedomain.com')" onMouseOut="return ws()"

Message, call ('Message to surfer !! ')
href="http://WHATEVERsubDOMAIN.in.cybererotica.com/cgi-bin/fmp.cgi/1204/2124074/D" onMouseOver="return ws('Message to surfer!')" onMouseOut="return ws()"

Message, call ('Message with a domain.com in it !! ')
href="http://WHATEVERsubDOMAIN.in.cybererotica.com/cgi-bin/fmp.cgi/1204/2124074/D" onMouseOver="return ws('Spend money at Domain.com !')" onMouseOut="return ws()"


Normal affiliate URLs:

Blank message, call ()
href="http://www.cybererotica.com/cgi-bin/fmp.cgi/1204/2124074/D" onMouseOver="return ws()" onMouseOut="return ws()"

Domian url, call (this)
href="http://www.cybererotica.net/cgi-bin/fmp.cgi/1204/2124074/D" onMouseOver="return ws(this)" onMouseOut="return ws()"

Domian url, when your domain is ID in tracking cgi, call (this)
href="http://www.cybererotica.net/cgi-bin/fmp.cgi/track?affiliate=http://mydomain.org&a=yes" onMouseOver="return ws(this)" onMouseOut="return ws()"

False domain url, call ('falsedomain.com')
href="http://www.cybererotica.com/cgi-bin/fmp.cgi/1204/2124074/D" onMouseOver="return ws('highconvertingaffiliate.com')" onMouseOut="return ws()"

Message from a list, call (1) , or any num from list of messages. Can also work for ANY link type.
href="http://www.cybererotica.com/cgi-bin/fmp.cgi/1204/2124074/D" onMouseOver="return ws(1)" onMouseOut="return ws()"

Message, call ('Message to surfer !! ')
href="http://www.cybererotica.com/cgi-bin/fmp.cgi/1204/2124074/D" onMouseOver="return ws('Click Here NOW punk!')" onMouseOut="return ws()"


Normal domain URLs:

Blank message, call ()
href="http://www.cybererotica.com/" onMouseOver="return ws()" onMouseOut="return ws()"

Domian url, call (this)
href="http://www.cybererotica.com/" onMouseOver="return ws(this)" onMouseOut="return ws()"

Domian url, numbers and dash in domain, call (this)
href="http://www.sexy100pics-for-u.com/" onMouseOver="return ws(this)" onMouseOut="return ws()"

False domain url, call ('falsedomain.com')
href="http://www.cybererotica.com" onMouseOver="return ws('falsedomain.com')" onMouseOut="return ws()"

Message, call ('Message to surfer !! ')
href="http://www.cybererotica.com" onMouseOver="return ws('Important Message !!!!!!')" onMouseOut="return ws()"


Javascript calls, no URL or domain, as in DHTM calls that go nowhere:

Blank message, call ()
href="javascript:doNothing('whatever')" onMouseOver="return ws()" onMouseOut="return ws()"

Current page domain, call (this)
href="javascript:doNothing('whatever')" onMouseOver="return ws(this)" onMouseOut="return ws()"

Message from a list, call (1) , or any num from list of messages. Can also work for ANY link type.
href="javascript:doNothing('whatever')" onMouseOver="return ws(1)" onMouseOut="return ws()"

href="javascript:doNothing('whatever')" onMouseOver="return ws(2)" onMouseOut="return ws()"

Message, call ('Message to surfer !! ')
href="javascript:doNothing('whatever')" onMouseOver="return ws('go ahead and click around')" onMouseOut="return ws()"


Javascript calls, popUp or goTo a URL with domain:

Blank message, call ()
href="javascript:goto('http://www.newsite.com/long/path/to/html.html')" onMouseOver="return ws()" onMouseOut="return ws()"

Domian url, call (this)
href="javascript:goto('http://www.newsite.com/long/path/to/html.html')" onMouseOver="return ws(this)" onMouseOut="return ws()"

Default IP message, when url is IP address, call (this), default variable set in code is: 'My default IP message'.
href="javascript:goto('http://123.45.67.891/long/path/to/html.html')" onMouseOver="return ws(this)" onMouseOut="return ws()"

Mesage with an IP url, call ('Message')
href="javascript:goto('http://123.45.67.891/long/path/to/html.html')" onMouseOver="return ws('a cover for an IP address')" onMouseOut="return ws()"

False domain url, call ('falsedomain.com')
href="javascript:goto('http://www.newsite.net/long/path/to/html.html')" onMouseOver="return ws('falsedomain.com')" onMouseOut="return ws()"

Message, call ('Message to surfer !! ')
href="javascript:goto('http://www.newsite.com/long/path/to/html.html')" onMouseOver="return ws('Important Message')" onMouseOut="return ws()"


Javascript calls, popUp or goTo IP address URL, no domain:

Blank message, call ()
href="javascript:goto('http://123.456.78.910/long/path/to/html.html')" onMouseOver="return ws()" onMouseOut="return ws()"

Default IP message, call (this) , default variable set in code is: 'Default IP message'.
href="javascript:goto('http://123.456.78.910/long/path/to/html.html')" onMouseOver="return ws(this)" onMouseOut="return ws()"l

False domain, call ('falsedomain.com')
href="javascript:goto('http://www.newsite.com/long/path/to/html.html')" onMouseOver="return ws('specaildomain.com')" onMouseOut="return ws()"

Message, call ('Message to surfer !! ')
href="javascript:goto('http://www.newsite.com/long/path/to/html.html')" onMouseOver="return ws('My Message')" onMouseOut="return ws()"


IP address URLs, no domain:

Blank message, call ()
href="http://123.456.789.101/cheapAssFreeHost/index" onMouseOver="return ws()" onMouseOut="return ws()"

Default IP message, call (this), default variable set in code is: 'My default IP message'.
href="http://123.456.789.101/cheapAssFreeHost/index" onMouseOver="return ws(this)" onMouseOut="return ws()"

Any domain url, call ('anydomain.com')
href="http://123.456.789.101/cheapAssFreeHost/index" onMouseOver="return ws('importantURL.com')" onMouseOut="return ws()"

Message, call ('Message to surfer !! ')
href="http://123.456.789.101/cheapAssFreeHost/index" onMouseOver="return ws('Message to surfer')" onMouseOut="return ws()"


Works like a charm as far as I can tell, probably easiest use is to just call(this) to let all urls just play out their base domains, or a blank message if IP or Javascript, and not worrying about special messages or specific fasle domains. Specific false domains are usefull when all affiliate urls are to lousy or sneeky affiliates, or to an affiliate-member-only domain that redirects. Picking text from a list of messages is nice for repetitve upsell messages across whole sites, easily updated from the one script location.

Let me know if it works, or fails. Provide your BROWSER info, version, and OS your using, especially if it fails! Feedback is needed..........and appreciated.

Thanks,

PornMaster (E-MAIL)

PornMaster.com


The script:

This is html formatted, view-sorce to see Javascript. 

msgAr=new Array(
    "",// add at will
    "Message ONE from list",
    "Message TWO from list"//< no comma!
  );

var ip="My Default IP message";//default IP.url message.

function ws()// LinkStripper v1.2; copyright 2002 PornMaster.com
{   var n=ws.arguments,L=n.length,x='';if(L){var a=n[0].toString(),
    p=/http:\/\//i,t=/\w(\.(com|net|org))\b/i,d=/\W?[\w|\-]+$/i;
    if(!isNaN(a))x=msgAr[a];else if(tx=t.exec(a)){var ht="http://www.";
    if(typeof n[0]=='string'&&L==1)x=((tx)?(a.match(/\s/g))?'':ht:'')+a;
    else x=ht+a.substring(0,tx.index+1).substring(d.exec(a.substring(0,tx.index+1)).index+1)+tx[1];
    }else if(p.test(a))x=ip;else if(a.match(/\Bipt:/gi))x=ws(document.location.href,'');
    else x=a;if(L>1)return x;}window.status=x;return true;
}   // Q's? to linkstripper@choicenames.com



 

0002239