Submitted by Benjamin Melançon on February 4, 2013 - 12:04pm
It's bad Web practice to open any links in a separate window, but it does help when going for an HTML mobile app and it's becoming accepted expected behavior for anything with a stream.
// Open external links in a new window or tab.
var domain = window.location.hostname;
domain = domain.substring(domain.indexOf('.') + 1);
var not = '[href*="' + domain + '"]';
From the commit log:
Get current domain, open non-current in new But ignore subdomains. This keeps people on Activore while browsing Activore but open non-Activore links in a new window. Note: As written it will also open "http://FAKEactivore.net" in the same window. This was considered preferable to opening "http://activore.net" in a new window, and i deemed further checking needlessly complicated. Fixes #1736 ... better, this time, as this works on test sites, which we really need.