View Single Post
Old 2012-05-30, 02:16 PM   #20
Greenguy
The Original Greenguy (Est'd 1996) & AVN HOF Member - I Crop Pics For Thumbs In My Sleep
 
Greenguy's Avatar
 
Join Date: Feb 2003
Location: Blasdell, NY (shithole suburb south of Buffalo)
Posts: 41,929
Send a message via ICQ to Greenguy
I've given this much thought (once I realized that I forgot about this thread) and this morning I asked the extremely knowledgeable cd34 if he had a way to easily open all external links in a new window without having to add target="_blank" to all the links. A short time later, he came up with this:

http://devel.mia.colo-cation.com/greenie/

The code that you have to add inside the <body> is this:
Code:
<script type="text/javascript">
<!--
var localdomain='yourdomain.com'.toLowerCase();
var hrefs = document.getElementsByTagName("a");
for (var i=0, max=hrefs.length; i<max; i++) {
  if (hrefs[i].href.toLowerCase().indexOf(localdomain) == -1) {
    hrefs[i].target='_blank';
  }
};
// -->
</script>
Just swap out yourdomain.com for, what else, your domain

I'm gonna try it out on Sunshine Lesbians for a couple days & see how it goes before I implement it on LOR and the rest of the sites.

So I thought I'd post it in case anyone else wanted to try it on their sites.

...and a big THANK YOU!!! to cd34 for writing this code for me (probably from memory lol)
__________________

Promote POV Porn Cash By Building & Submitting Galleries to the Porn Luv Network
Greenguy is offline   Reply With Quote