1
0
Fork 0
mirror of https://github.com/futurepress/epub.js.git synced 2025-10-03 14:59:18 +02:00

Fix width to pixel amount, add direction to html if present on body

This commit is contained in:
Fred Chasen 2017-10-31 16:06:38 -07:00
parent 20183379b3
commit a55f8a5741
2 changed files with 11 additions and 8 deletions

View file

@ -70,8 +70,14 @@
if (active) {
active.classList.add("active");
}
let urlParam = params && params.get("url");
let url = '';
if (urlParam) {
url = "url=" + urlParam + "&";
}
// Add CFI fragment to the history
history.pushState({}, '', "?loc=" + encodeURIComponent(section.href));
history.pushState({}, '', "?" + url + "loc=" + encodeURIComponent(section.href));
// window.location.hash = "#/"+section.href
});