mirror of
https://github.com/pdf2htmlEX/pdf2htmlEX.git
synced 2024-10-05 19:41:40 +00:00
fix js: hide page in the beginning
This commit is contained in:
parent
edda8f17ba
commit
3bc62dfe9d
12
share/hide_pages.js
Normal file
12
share/hide_pages.js
Normal file
@ -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);
|
||||||
|
})();
|
@ -24,6 +24,7 @@
|
|||||||
@base.css
|
@base.css
|
||||||
$css
|
$css
|
||||||
@jquery.js
|
@jquery.js
|
||||||
|
@hide_pages.js
|
||||||
|
|
||||||
"""
|
"""
|
||||||
<title></title>
|
<title></title>
|
||||||
|
@ -4,8 +4,6 @@ $(function() {
|
|||||||
$main = $("#pdf-main"),
|
$main = $("#pdf-main"),
|
||||||
l = $pages.length;
|
l = $pages.length;
|
||||||
|
|
||||||
$pages.hide();
|
|
||||||
|
|
||||||
function isPageVisible(i, H) {
|
function isPageVisible(i, H) {
|
||||||
var $pw = $($pageWrappers[i]),
|
var $pw = $($pageWrappers[i]),
|
||||||
t = $pw.offset().top,
|
t = $pw.offset().top,
|
||||||
|
Loading…
Reference in New Issue
Block a user