Greenguy's Board


Go Back   Greenguy's Board > Newbie Questions
Register FAQ Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 2012-09-13, 05:19 PM   #1
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
cd34 wrote up this handy bit of code to open all external links in a new window/tab

Code:
<script type="text/javascript">
<!--
var localdomain='link-o-rama.com';
var hrefs = document.getElementsByTagName("a");
for (var i=0, max=hrefs.length; i<max; i++) {
  if (hrefs[i].href.indexOf(localdomain) == -1) {
    hrefs[i].target='_blank';
  }
};
// -->
</script>
Just change link-o-rama.com to your domain & put this above the </body> tag
__________________

Promote POV Porn Cash By Building & Submitting Galleries to the Porn Luv Network
Greenguy is offline   Reply With Quote
Old 2012-09-13, 05:25 PM   #2
Jeremy82
You can now put whatever you want in this space :)
 
Jeremy82's Avatar
 
Join Date: Oct 2010
Posts: 988
Excellent, thanks. I'll use it in meta tag like:
Quote:
<script type="text/javascript" src="file_path/external.js"></script>
Quote:
Originally Posted by Greenie View Post
cd34 wrote up this handy bit of code
Isn't it owner of colo-cation?
__________________
A nice list of perfect pool hotels (hotels with pool)
Jeremy82 is offline   Reply With Quote
Old 2012-09-13, 05:47 PM   #3
Cleo
Subversive filth of the hedonistic decadent West
 
Cleo's Avatar
 
Join Date: Mar 2003
Location: Southeast Florida
Posts: 27,936
Quote:
Originally Posted by Jeremy82 View Post
Isn't it owner of colo-cation?
CD isn't an it but he is the owner of colo-cation.
__________________
Free Rides on Uber and Lyft
Uber Car: uberTzTerri
Lyft Car: TZ896289
Cleo is offline   Reply With Quote
Old 2012-09-13, 06:26 PM   #4
Jeremy82
You can now put whatever you want in this space :)
 
Jeremy82's Avatar
 
Join Date: Oct 2010
Posts: 988
Quote:
Originally Posted by Cleo View Post
CD isn't an it but he is the owner of colo-cation.
Sorry, this construction comes from my native language. I'm seriously considering moving my stuff out there (the most tempting thing for me is unlimited amount of IP's).
__________________
A nice list of perfect pool hotels (hotels with pool)
Jeremy82 is offline   Reply With Quote
Old 2012-09-15, 01:46 PM   #5
Maj. Stress
Progress rarely comes in buckets, it normally comes in teaspoons
 
Maj. Stress's Avatar
 
Join Date: Jun 2005
Location: Dark Side Of Naboo
Posts: 1,289
Quote:
Originally Posted by Greenie View Post
cd34 wrote up this handy bit of code to open all external links in a new window/tab

Code:
<script type="text/javascript">
<!--
var localdomain='link-o-rama.com';
var hrefs = document.getElementsByTagName("a");
for (var i=0, max=hrefs.length; i<max; i++) {
  if (hrefs[i].href.indexOf(localdomain) == -1) {
    hrefs[i].target='_blank';
  }
};
// -->
</script>
Just change link-o-rama.com to your domain & put this above the </body> tag
Thanks for that bit of code. I have a good use for it.
Maj. Stress is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:33 AM.


Mark Read
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc