Skip to content
Snippets Groups Projects
Commit 3a05b22a authored by Lachlan Ennis's avatar Lachlan Ennis
Browse files
parent 69a4b054
No related branches found
No related tags found
No related merge requests found
......@@ -3,6 +3,10 @@
Drupal.extlink = Drupal.extlink || {};
Drupal.extlink.attach = function (context, settings) {
if (!settings.hasOwnProperty('extlink')) {
return;
}
// Strip the host name down, removing ports, subdomains, or www.
var pattern = /^(([^\/:]+?\.)*)([^\.:]{4,})((\.[a-z]{1,4})*)(:[0-9]{1,5})?$/;
var host = window.location.host.replace(pattern, '$3$4');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment