Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
douban-api-proxy
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
captainwong
douban-api-proxy
Commits
26c29330
Commit
26c29330
authored
Jul 19, 2016
by
wuqi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mouse wheel
parent
b846cc11
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
3 deletions
+17
-3
read.html
cps/templates/read.html
+17
-3
No files found.
cps/templates/read.html
View file @
26c29330
...
@@ -19,9 +19,8 @@
...
@@ -19,9 +19,8 @@
document
.
onreadystatechange
=
function
()
{
document
.
onreadystatechange
=
function
()
{
if
(
document
.
readyState
==
"complete"
)
{
if
(
document
.
readyState
==
"complete"
)
{
EPUBJS
.
filePath
=
"{{ url_for('static', filename='js/libs/') }}"
;
//"js/libs/";
EPUBJS
.
filePath
=
"{{ url_for('static', filename='js/libs/') }}"
;
EPUBJS
.
cssPath
=
"{{ url_for('static', filename='css/') }}"
;
//window.location.href.replace(window.location.hash, '').replace('read.html', '') + "css/";
EPUBJS
.
cssPath
=
"{{ url_for('static', filename='css/') }}"
;
// fileStorage.filePath = EPUBJS.filePath;
window
.
reader
=
ePubReader
(
"{{ url_for('static', filename=bookid) }}/"
);
window
.
reader
=
ePubReader
(
"{{ url_for('static', filename=bookid) }}/"
);
//keybind
//keybind
...
@@ -33,6 +32,21 @@
...
@@ -33,6 +32,21 @@
window
.
reader
.
book
.
nextPage
();
window
.
reader
.
book
.
nextPage
();
}
}
});
});
//bind mouse
$
(
window
).
bind
(
'DOMMouseScroll mousewheel'
,
function
(
event
)
{
var
delta
=
0
;
if
(
event
.
originalEvent
.
wheelDelta
)
{
delta
=
event
.
originalEvent
.
wheelDelta
;
}
else
if
(
event
.
originalEvent
.
detail
)
{
delta
=
event
.
originalEvent
.
detail
*-
1
;
}
if
(
delta
>=
0
)
{
window
.
reader
.
book
.
prevPage
();
}
else
{
window
.
reader
.
book
.
nextPage
();
}
});
}
}
};
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment