diff --git a/static/skin/viewer.js b/static/skin/viewer.js index c683158c..0b0ee719 100644 --- a/static/skin/viewer.js +++ b/static/skin/viewer.js @@ -271,10 +271,12 @@ function translateErrorPageIfNeeded() { let iframeLocationHref = null; function handle_content_url_change() { - if ( iframeLocationHref == contentIframe.contentWindow.location.href ) + const iframeLocation = contentIframe.contentWindow.location; + + if ( iframeLocationHref == iframeLocation.href || + !iframeLocation.pathname.startsWith(root + '/content/') ) return; - const iframeLocation = contentIframe.contentWindow.location; iframeLocationHref = iframeLocation.href; console.log('handle_content_url_change: ' + iframeLocation.href); document.title = contentIframe.contentDocument.title; diff --git a/test/server.cpp b/test/server.cpp index a9c766c5..61e90a98 100644 --- a/test/server.cpp +++ b/test/server.cpp @@ -77,7 +77,7 @@ const ResourceCollection resources200Compressible{ { DYNAMIC_CONTENT, "/ROOT%23%3F/skin/taskbar.css" }, { STATIC_CONTENT, "/ROOT%23%3F/skin/taskbar.css?cacheid=42e90cb9" }, { DYNAMIC_CONTENT, "/ROOT%23%3F/skin/viewer.js" }, - { STATIC_CONTENT, "/ROOT%23%3F/skin/viewer.js?cacheid=3208c3ed" }, + { STATIC_CONTENT, "/ROOT%23%3F/skin/viewer.js?cacheid=914d363c" }, { DYNAMIC_CONTENT, "/ROOT%23%3F/skin/fonts/Poppins.ttf" }, { STATIC_CONTENT, "/ROOT%23%3F/skin/fonts/Poppins.ttf?cacheid=af705837" }, { DYNAMIC_CONTENT, "/ROOT%23%3F/skin/fonts/Roboto.ttf" }, @@ -338,7 +338,7 @@ R"EXPECTEDRESULT( - + const blankPageUrl = root + "/skin/blank.html?cacheid=6b1fa032";