Fix regex to determine location of new tab icon

Former-commit-id: b1f74dacd14e24fb8c47a59201d246f591f1cd52 [formerly ba3a8d00272d9e1f81be1bd78597e954d21e4266]
Former-commit-id: 4ee7bc7094264da98df8f9cd8f5986086012af43
This commit is contained in:
Jaifroid 2019-04-01 17:53:00 +01:00
parent 13fa34645d
commit f0267ab182

View File

@ -337,7 +337,7 @@ define(['util'], function(util) {
var desc = "Open article in new tab or window";
var iframe = document.getElementById('articleContent').contentDocument;
// Remove the file and any query string from href
var prefix = window.location.href.replace(/^((?!.*\?).*\/|(?=.*\/).*\/(?=[^\/]+\?)).*$/, '$1');
var prefix = window.location.href.replace(/^((?!.*\?).*\/|(?=.*\/).*\/(?=[^\/]*\?)).*$/, '$1');
var div = document.createElement('div');
div.style.cssText = 'left: 95%; top: 10px; position: absolute; z-index: 2;';
div.id = "openInTab";