mirror of
https://github.com/kiwix/kiwix-js-pwa.git
synced 2025-09-12 13:58:28 -04:00
Various tweaks
Former-commit-id: 2e103488705ec80ff08366f6f5b83676de4c9da1 [formerly 31d923e3d2e126b5c8876c6b6629cb39a02b016a] Former-commit-id: bc1f68ea8e7bf85122e7fc38e6d99f916834d43b
This commit is contained in:
parent
20bd22e025
commit
d8bfba1c22
@ -233,6 +233,7 @@ define(['jquery', 'zimArchiveLoader', 'util', 'uiUtil', 'cookies', 'q', 'module'
|
|||||||
document.getElementById('top').style.position = "relative";
|
document.getElementById('top').style.position = "relative";
|
||||||
document.getElementById('scrollbox').style.position = "fixed";
|
document.getElementById('scrollbox').style.position = "fixed";
|
||||||
document.getElementById('scrollbox').style.height = window.innerHeight + "px";
|
document.getElementById('scrollbox').style.height = window.innerHeight + "px";
|
||||||
|
document.getElementById('articleContent').style.display = "none";
|
||||||
goToRandomArticle();
|
goToRandomArticle();
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -1557,7 +1558,7 @@ define(['jquery', 'zimArchiveLoader', 'util', 'uiUtil', 'cookies', 'q', 'module'
|
|||||||
|
|
||||||
//Void the iframe
|
//Void the iframe
|
||||||
//console.log("# Clearing the iframe...");
|
//console.log("# Clearing the iframe...");
|
||||||
//document.getElementById("articleContent").src = "about:blank";
|
//document.getElementById("articleContent").src = "dummyArticle.html";
|
||||||
|
|
||||||
//Load cached start page if it exists
|
//Load cached start page if it exists
|
||||||
var htmlContent = 0;
|
var htmlContent = 0;
|
||||||
@ -1892,7 +1893,6 @@ define(['jquery', 'zimArchiveLoader', 'util', 'uiUtil', 'cookies', 'q', 'module'
|
|||||||
uiUtil.clear(); //Void progress messages
|
uiUtil.clear(); //Void progress messages
|
||||||
setHomeTab();
|
setHomeTab();
|
||||||
var iframe = document.getElementById("articleContent");
|
var iframe = document.getElementById("articleContent");
|
||||||
|
|
||||||
var articleContent = iframe.contentDocument || iframe.contentWindow.document;
|
var articleContent = iframe.contentDocument || iframe.contentWindow.document;
|
||||||
articleContent.open();
|
articleContent.open();
|
||||||
articleContent.write(htmlArticle);
|
articleContent.write(htmlArticle);
|
||||||
@ -2481,7 +2481,8 @@ define(['jquery', 'zimArchiveLoader', 'util', 'uiUtil', 'cookies', 'q', 'module'
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$("#articleName").html(title);
|
$("#articleName").html(title);
|
||||||
$('#articleContent').contents().find('body').html("");
|
//$('#articleContent').contents().find('body').html("");
|
||||||
|
document.getElementById('articleContent').style.display = "none";
|
||||||
readArticle(dirEntry);
|
readArticle(dirEntry);
|
||||||
}
|
}
|
||||||
}).fail(function() { console.error("Error reading article with title " + title); });
|
}).fail(function() { console.error("Error reading article with title " + title); });
|
||||||
|
Loading…
x
Reference in New Issue
Block a user