mirror of https://github.com/kiwix/libkiwix.git
fixup! Fixed external links in the viewer iframe
This commit is contained in:
parent
a05d3fa65a
commit
bea9f736df
|
@ -224,13 +224,13 @@ function handle_location_hash_change() {
|
||||||
function handle_content_url_change() {
|
function handle_content_url_change() {
|
||||||
const iframeLocation = contentIframe.contentWindow.location;
|
const iframeLocation = contentIframe.contentWindow.location;
|
||||||
console.log('handle_content_url_change: ' + iframeLocation.href);
|
console.log('handle_content_url_change: ' + iframeLocation.href);
|
||||||
document.title = contentIframe.contentDocument.title;
|
|
||||||
const iframeContentUrl = iframeLocation.pathname;
|
const iframeContentUrl = iframeLocation.pathname;
|
||||||
const iframeContentQuery = iframeLocation.search;
|
const iframeContentQuery = iframeLocation.search;
|
||||||
const newHash = iframeUrl2UserUrl(iframeContentUrl, iframeContentQuery);
|
const newHash = iframeUrl2UserUrl(iframeContentUrl, iframeContentQuery);
|
||||||
if ( newHash.startsWith('catch/external?') ) {
|
if ( newHash.startsWith('catch/external?') ) {
|
||||||
handleInterceptedExternalLink(newHash);
|
handleInterceptedExternalLink(newHash);
|
||||||
} else {
|
} else {
|
||||||
|
document.title = contentIframe.contentDocument.title;
|
||||||
history.replaceState(viewerState, null, makeURL(location.search, newHash));
|
history.replaceState(viewerState, null, makeURL(location.search, newHash));
|
||||||
updateCurrentBookIfNeeded(newHash);
|
updateCurrentBookIfNeeded(newHash);
|
||||||
}
|
}
|
||||||
|
|
|
@ -73,7 +73,7 @@ const ResourceCollection resources200Compressible{
|
||||||
{ DYNAMIC_CONTENT, "/ROOT%23%3F/skin/taskbar.css" },
|
{ DYNAMIC_CONTENT, "/ROOT%23%3F/skin/taskbar.css" },
|
||||||
{ STATIC_CONTENT, "/ROOT%23%3F/skin/taskbar.css?cacheid=bbdaf425" },
|
{ STATIC_CONTENT, "/ROOT%23%3F/skin/taskbar.css?cacheid=bbdaf425" },
|
||||||
{ DYNAMIC_CONTENT, "/ROOT%23%3F/skin/viewer.js" },
|
{ DYNAMIC_CONTENT, "/ROOT%23%3F/skin/viewer.js" },
|
||||||
{ STATIC_CONTENT, "/ROOT%23%3F/skin/viewer.js?cacheid=aa7200e4" },
|
{ STATIC_CONTENT, "/ROOT%23%3F/skin/viewer.js?cacheid=f872666c" },
|
||||||
{ DYNAMIC_CONTENT, "/ROOT%23%3F/skin/fonts/Poppins.ttf" },
|
{ DYNAMIC_CONTENT, "/ROOT%23%3F/skin/fonts/Poppins.ttf" },
|
||||||
{ STATIC_CONTENT, "/ROOT%23%3F/skin/fonts/Poppins.ttf?cacheid=af705837" },
|
{ STATIC_CONTENT, "/ROOT%23%3F/skin/fonts/Poppins.ttf?cacheid=af705837" },
|
||||||
{ DYNAMIC_CONTENT, "/ROOT%23%3F/skin/fonts/Roboto.ttf" },
|
{ DYNAMIC_CONTENT, "/ROOT%23%3F/skin/fonts/Roboto.ttf" },
|
||||||
|
@ -312,7 +312,7 @@ R"EXPECTEDRESULT( <link type="text/css" href="./skin/taskbar.css?cacheid=bbda
|
||||||
<link type="text/css" href="./skin/css/autoComplete.css?cacheid=08951e06" rel="Stylesheet" />
|
<link type="text/css" href="./skin/css/autoComplete.css?cacheid=08951e06" rel="Stylesheet" />
|
||||||
<script type="module" src="./skin/i18n.js?cacheid=2cf0f8c5" defer></script>
|
<script type="module" src="./skin/i18n.js?cacheid=2cf0f8c5" defer></script>
|
||||||
<script type="text/javascript" src="./skin/languages.js?cacheid=b00b12db" defer></script>
|
<script type="text/javascript" src="./skin/languages.js?cacheid=b00b12db" defer></script>
|
||||||
<script type="text/javascript" src="./skin/viewer.js?cacheid=aa7200e4" defer></script>
|
<script type="text/javascript" src="./skin/viewer.js?cacheid=f872666c" defer></script>
|
||||||
<script type="text/javascript" src="./skin/autoComplete.min.js?cacheid=1191aaaf"></script>
|
<script type="text/javascript" src="./skin/autoComplete.min.js?cacheid=1191aaaf"></script>
|
||||||
const blankPageUrl = root + "/skin/blank.html?cacheid=6b1fa032";
|
const blankPageUrl = root + "/skin/blank.html?cacheid=6b1fa032";
|
||||||
<img src="./skin/langSelector.svg?cacheid=00b59961">
|
<img src="./skin/langSelector.svg?cacheid=00b59961">
|
||||||
|
|
Loading…
Reference in New Issue