Fixed a regression in the random page function that was affecting #37

Former-commit-id: 42296ff5660f1641fe192acc228a20d73e9e569c [formerly e549900ce3a9f523facbb3d69f8116136de06552]
Former-commit-id: e0c4280e754da652543ba645dd7783e64906a089
This commit is contained in:
Jaifroid 2018-01-05 18:02:35 +00:00
parent dedc79c2a8
commit 8b18be9ce8

View File

@ -1756,7 +1756,7 @@ define(['jquery', 'zimArchiveLoader', 'util', 'uiUtil', 'cookies', 'abstractFile
});
//Clean up remaining geo: links
htmlArticle = htmlArticle.replace(/href\s*=\s*"\s*geo:([\d.]+),([\d.]+)/ig, 'href="bingmaps:?collection=point.$1_$2');
htmlArticle = htmlArticle.replace(/href\s*=\s*"\s*geo:([\d.-]+),([\d.-]+)/ig, 'href="bingmaps:?collection=point.$1_$2');
//Setup footnote backlinks if the ZIM doesn't have any
htmlArticle = htmlArticle.replace(/<li\s+id\s*=\s*"cite_note-([^"]+)"\s*>(?![^/]+↑)/ig, function (match, p1) {
@ -2343,7 +2343,7 @@ define(['jquery', 'zimArchiveLoader', 'util', 'uiUtil', 'cookies', 'abstractFile
else {
if (dirEntry.namespace === 'A') {
$("#articleName").html(dirEntry.title);
pushBrowserHistoryState(dirEntry.url);
pushBrowserHistoryState(dirEntry.namespace + "/" + dirEntry.url);
$("#readingArticle").show();
$('#articleContent').contents().find('body').html("");
readArticle(dirEntry);