Download & Extend

A javascript UPDATE for Social Network-Bookmarking link type

Project:External New Tab
Version:6.x-1.9
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Issue tags:social bookmarking link, social networking link

Issue Summary

Hi to all,

I found mouth ago this littel bug: the module works fine for all external link type BUT whit an exception.

If the external link contain the URL of the site (example: the classic link to post content on Social-Bookmarking Network) the .js dosen't works as well.

So if I'm on http://www.mysite.com all links like http://www.othersite.net are correctly opened in new tab;

BUT if links are like http://twitter.com/home?status=Link%20Interessante%20http%3A%2F%2Fwww.mysite/myprofile the .js is not able to open this URL in a NEW TAB.

SOLUTION: a simple, little mod to .js file (in attachment) to correct line number 5 from:

if(this.href.toLowerCase().indexOf(location.hostname) == -1) {
to:
if(this.href.toLowerCase().indexOf(location.hostname) == -1 || this.href.toLowerCase().indexOf(location.hostname) > 13) {

Thanks,
Bye!

AttachmentSize
external.js_.txt (Please rename it as 'external.js')809 bytes
nobody click here