Extraneous global flag removed

Former-commit-id: 0587e86749c0cf13f0c132235c920555903f0c94 [formerly 26ad9edded176637506f7032d92980f715d75946]
Former-commit-id: bb8e91d752a19f33e8b4c02da019d1c4106eaf25
This commit is contained in:
Jaifroid 2017-12-14 10:26:41 +00:00
parent 81a86d75e6
commit 66be8ed3d3

View File

@ -1787,7 +1787,7 @@ define(['jquery', 'zimArchiveLoader', 'util', 'uiUtil', 'cookies', 'abstractFile
url = url.replace(/^[.\/]*([\S\s]+)$/, "$1");
//Some Stackexchange links (e.g. "duplicate" and "related" questions) are missing the "question" path, so add it back
//Regex matches a pattern that looks like: 1234/what-is-mathematics.html and changes to: question/1234/what-is-mathematics.html
url = url.replace(/^(\d+\/[\s\S]+\.html?)$/ig, "question/$1");
url = url.replace(/^(\d+\/[\s\S]+\.html?)$/i, "question/$1");
$(this).on('click', function (e) {
var decodedURL = decodeURIComponent(url);