add current page to url

This commit is contained in:
j 2013-02-12 17:02:46 +05:30
parent 2cd532950e
commit 43b93cbdb0

View file

@ -2718,7 +2718,10 @@ document.addEventListener('DOMContentLoaded', function webViewerLoad(evt) {
var file = params.file || DEFAULT_URL; var file = params.file || DEFAULT_URL;
//hide unused elements
document.getElementById('openFile').setAttribute('hidden', 'true'); document.getElementById('openFile').setAttribute('hidden', 'true');
document.getElementById('viewBookmark').setAttribute('hidden', 'true');
if (!window.File || !window.FileReader || !window.FileList || !window.Blob) { if (!window.File || !window.FileReader || !window.FileList || !window.Blob) {
document.getElementById('openFile').setAttribute('hidden', 'true'); document.getElementById('openFile').setAttribute('hidden', 'true');
} else { } else {
@ -2954,6 +2957,7 @@ function updateViewarea() {
}); });
var href = PDFView.getAnchorUrl(pdfOpenParams); var href = PDFView.getAnchorUrl(pdfOpenParams);
document.getElementById('viewBookmark').href = href; document.getElementById('viewBookmark').href = href;
document.location.hash = '#page=' + pageNumber;
} }
window.addEventListener('resize', function webViewerResize(evt) { window.addEventListener('resize', function webViewerResize(evt) {