Forum Moderators: open
[edited by: engine at 11:45 am (utc) on Aug 8, 2012]
[edit reason] see TOS [/edit]
function externalLinks(){if(!document.getElementsByTagName){return;}var anchors=document.getElementsByTagName("a");for(var i=0;i<anchors.length;i++){var anchor=anchors[i];if(anchor.getAttribute("href")&&(anchor.getAttribute("rel")=="external"||anchor.getAttribute("rel")=="external nofollow"||anchor.getAttribute("rel")=="nofollow external")){anchor.target="_blank";}}}
externalLinks(); <a href="blah" rel="external"> <a href="blah" rel="nofollow external"> <a href="blah" rel="external nofollow"> since W3C has 'dropped' the target='_blank' attribute
A valid browsing context name or keyword is any string that is either a valid browsing context name or that is an ASCII case-insensitive match for one of: _blank, _self, _parent, or _top.
User agent implementors are encouraged to provide a way for users to configure the user agent to always reuse the current browsing context.
since W3C has 'dropped' the target='_blank' attribute
Says who where? I thought that whole issue was settled years ago.