Various tweaks

Former-commit-id: 2e103488705ec80ff08366f6f5b83676de4c9da1 [formerly 31d923e3d2e126b5c8876c6b6629cb39a02b016a]
Former-commit-id: bc1f68ea8e7bf85122e7fc38e6d99f916834d43b
This commit is contained in:
Jaifroid 2018-02-21 22:59:51 +00:00
parent 20bd22e025
commit d8bfba1c22

View File

@ -233,6 +233,7 @@ define(['jquery', 'zimArchiveLoader', 'util', 'uiUtil', 'cookies', 'q', 'module'
document.getElementById('top').style.position = "relative";
document.getElementById('scrollbox').style.position = "fixed";
document.getElementById('scrollbox').style.height = window.innerHeight + "px";
document.getElementById('articleContent').style.display = "none";
goToRandomArticle();
});
@ -1557,7 +1558,7 @@ define(['jquery', 'zimArchiveLoader', 'util', 'uiUtil', 'cookies', 'q', 'module'
//Void 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
var htmlContent = 0;
@ -1892,7 +1893,6 @@ define(['jquery', 'zimArchiveLoader', 'util', 'uiUtil', 'cookies', 'q', 'module'
uiUtil.clear(); //Void progress messages
setHomeTab();
var iframe = document.getElementById("articleContent");
var articleContent = iframe.contentDocument || iframe.contentWindow.document;
articleContent.open();
articleContent.write(htmlArticle);
@ -2481,7 +2481,8 @@ define(['jquery', 'zimArchiveLoader', 'util', 'uiUtil', 'cookies', 'q', 'module'
}
else {
$("#articleName").html(title);
$('#articleContent').contents().find('body').html("");
//$('#articleContent').contents().find('body').html("");
document.getElementById('articleContent').style.display = "none";
readArticle(dirEntry);
}
}).fail(function() { console.error("Error reading article with title " + title); });