Opening external links in new window

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
BenD
Regular
Posts: 27
Joined: Mon Mar 24, 2008 11:52 am

Opening external links in new window

Post by BenD »

Is there any possibility to open links that do not point to my own website in a new window? So the script should add target="_blank" to any external link it finds.
Is there a solution, yet? I am too lazy to add this by hand to any external link :).
Don Chambers
Regular
Posts: 3657
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Post by Don Chambers »

=Don=
BenD
Regular
Posts: 27
Joined: Mon Mar 24, 2008 11:52 am

Post by BenD »

Mh, but this requires adding rel="external" by hand to each external link... My dream of a solution would be a javascript/plugin that crawls the content for external links, adding target="blank" to each one that doesn't have it already.
Sounds like a nice idea for a plugin...
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

Didn't we once do something like this to add little icons on the ends of links? I seem to recall making the oddest regexps to support it. Don, was that you I was working with?
Judebert
---
Website | Wishlist | PayPal
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: Opening external links in new window

Post by yellowled »

BenD wrote:Is there any possibility to open links that do not point to my own website in a new window?
I still can't fathom why people would want to do that. Especially given that fact that you can always override these, at least with a good browser. I can understand why people would want to mark external links, but why ... seriously, I have no idea. Oh, never mind.

YL
Don Chambers
Regular
Posts: 3657
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Post by Don Chambers »

judebert wrote:Didn't we once do something like this to add little icons on the ends of links? I seem to recall making the oddest regexps to support it. Don, was that you I was working with?
Wasn't me.
=Don=
ameo
Regular
Posts: 143
Joined: Fri Sep 26, 2008 4:13 am

Re: Opening external links in new window

Post by ameo »

yellowled wrote:
BenD wrote:Is there any possibility to open links that do not point to my own website in a new window?
I still can't fathom why people would want to do that. Especially given that fact that you can always override these, at least with a good browser. I can understand why people would want to mark external links, but why ... seriously, I have no idea. Oh, never mind.

YL
"THIS IS MY TAB, DON'T USE THE DAMN TAB FOR ANOTHER WEBSITE .. LEAVE THE FU*KING TAB OPENED!!!!!!! " Sorry about that :D , but that is the only logic reason for opening links in new tab.
Don Chambers wrote:
judebert wrote:Didn't we once do something like this to add little icons on the ends of links? I seem to recall making the oddest regexps to support it. Don, was that you I was working with?
Wasn't me.
i still want to know if such feature exists in s9y or not [ out of curiosity ]
Don Chambers
Regular
Posts: 3657
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: Opening external links in new window

Post by Don Chambers »

ameo wrote:"THIS IS MY TAB, DON'T USE THE DAMN TAB FOR ANOTHER WEBSITE .. LEAVE THE FU*KING TAB OPENED!!!!!!! "
:lol: :lol: :lol: :lol: :lol:
=Don=
Post Reply