diff --git a/share/hide_pages.js b/share/hide_pages.js new file mode 100644 index 0000000..bc513fe --- /dev/null +++ b/share/hide_pages.js @@ -0,0 +1,12 @@ +/* hide all pages */ +(function(){ + var s = '.p{display:none;}'; + var n = document.createElement("style"); + n.type = "text/css"; + if (n.styleSheet) { + n.styleSheet.cssText = s; + } else { + n.appendChild(document.createTextNode(s)); + } + document.getElementsByTagName("head")[0].appendChild(n); +})(); diff --git a/share/manifest b/share/manifest index 1ff5e1e..a657bc1 100644 --- a/share/manifest +++ b/share/manifest @@ -24,6 +24,7 @@ @base.css $css @jquery.js +@hide_pages.js """ diff --git a/share/scroll.js b/share/scroll.js index c07a7e1..c9692f4 100644 --- a/share/scroll.js +++ b/share/scroll.js @@ -4,8 +4,6 @@ $(function() { $main = $("#pdf-main"), l = $pages.length; - $pages.hide(); - function isPageVisible(i, H) { var $pw = $($pageWrappers[i]), t = $pw.offset().top,