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
03ab03f0
Commit
03ab03f0
authored
Nov 22, 2017
by
OzzieIsaacs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Code cosmetics
parent
0943d508
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
kthoom.js
cps/static/js/kthoom.js
+8
-8
web.py
cps/web.py
+1
-1
No files found.
cps/static/js/kthoom.js
View file @
03ab03f0
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
*/
*/
/* global screenfull */
/* global screenfull */
var
start
=
0
;
//
var start = 0;
if
(
window
.
opera
)
{
if
(
window
.
opera
)
{
window
.
console
.
log
=
function
(
str
)
{
window
.
console
.
log
=
function
(
str
)
{
...
@@ -271,7 +271,7 @@ kthoom.setProgressMeter = function(pct, optLabel) {
...
@@ -271,7 +271,7 @@ kthoom.setProgressMeter = function(pct, optLabel) {
//getElem('nav').className = '';
//getElem('nav').className = '';
getElem
(
"progress"
).
className
=
""
;
getElem
(
"progress"
).
className
=
""
;
}
}
}
}
;
function
loadFromArrayBuffer
(
ab
)
{
function
loadFromArrayBuffer
(
ab
)
{
var
f
=
[];
var
f
=
[];
...
@@ -301,7 +301,7 @@ function loadFromArrayBuffer(ab) {
...
@@ -301,7 +301,7 @@ function loadFromArrayBuffer(ab) {
if
(
imageFiles
.
length
===
currentImage
+
1
)
{
if
(
imageFiles
.
length
===
currentImage
+
1
)
{
updatePage
();
updatePage
();
}
}
}
;
}
function
updatePage
()
{
function
updatePage
()
{
...
@@ -449,7 +449,7 @@ function updateScale(clear) {
...
@@ -449,7 +449,7 @@ function updateScale(clear) {
var
maxheight
=
innerHeight
-
50
;
var
maxheight
=
innerHeight
-
50
;
if
(
!
clear
)
{
if
(
!
clear
)
{
switch
(
settings
.
fitMode
)
{
switch
(
settings
.
fitMode
)
{
case
kthoom
.
Key
.
B
:
case
kthoom
.
Key
.
B
:
mainImageStyle
.
maxWidth
=
"100%"
;
mainImageStyle
.
maxWidth
=
"100%"
;
mainImageStyle
.
maxHeight
=
maxheight
+
"px"
;
mainImageStyle
.
maxHeight
=
maxheight
+
"px"
;
...
@@ -556,7 +556,7 @@ function ImageLoadCallback() {
...
@@ -556,7 +556,7 @@ function ImageLoadCallback() {
}
}
}
}
function
init
(
fileid
)
{
function
init
(
fileid
)
{
start
=
(
new
Date
).
getTime
();
//
start = (new Date).getTime();
var
request
=
new
XMLHttpRequest
();
var
request
=
new
XMLHttpRequest
();
request
.
open
(
"GET"
,
fileid
);
request
.
open
(
"GET"
,
fileid
);
request
.
responseType
=
"json"
;
request
.
responseType
=
"json"
;
...
@@ -611,7 +611,7 @@ function init(fileid) {
...
@@ -611,7 +611,7 @@ function init(fileid) {
// Fullscreen mode
// Fullscreen mode
if
(
typeof
screenfull
!==
"undefined"
)
{
if
(
typeof
screenfull
!==
"undefined"
)
{
$
(
"#fullscreen"
).
click
(
function
(
evt
)
{
$
(
"#fullscreen"
).
click
(
function
()
{
screenfull
.
toggle
(
$
(
"#container"
)[
0
]);
screenfull
.
toggle
(
$
(
"#container"
)[
0
]);
});
});
...
@@ -634,8 +634,8 @@ function init(fileid) {
...
@@ -634,8 +634,8 @@ function init(fileid) {
var
comicHeight
=
evt
.
target
.
clientHeight
;
var
comicHeight
=
evt
.
target
.
clientHeight
;
var
offsetX
=
(
mainContentWidth
-
comicWidth
)
/
2
;
var
offsetX
=
(
mainContentWidth
-
comicWidth
)
/
2
;
var
offsetY
=
(
mainContentHeight
-
comicHeight
)
/
2
;
var
offsetY
=
(
mainContentHeight
-
comicHeight
)
/
2
;
var
clickX
=
!!
evt
.
offsetX
?
evt
.
offsetX
:
(
evt
.
clientX
-
offsetX
);
var
clickX
=
evt
.
offsetX
?
evt
.
offsetX
:
(
evt
.
clientX
-
offsetX
);
var
clickY
=
!!
evt
.
offsetY
?
evt
.
offsetY
:
(
evt
.
clientY
-
offsetY
);
var
clickY
=
evt
.
offsetY
?
evt
.
offsetY
:
(
evt
.
clientY
-
offsetY
);
// Determine if the user clicked/tapped the left side or the
// Determine if the user clicked/tapped the left side or the
// right side of the page.
// right side of the page.
...
...
cps/web.py
View file @
03ab03f0
...
@@ -838,7 +838,7 @@ def feed_series(book_id):
...
@@ -838,7 +838,7 @@ def feed_series(book_id):
off
=
request
.
args
.
get
(
"offset"
)
off
=
request
.
args
.
get
(
"offset"
)
if
not
off
:
if
not
off
:
off
=
0
off
=
0
entries
,
random
,
pagination
=
fill_indexpage
((
int
(
off
)
/
(
int
(
config
.
config_books_per_page
))
+
1
),
entries
,
__
,
pagination
=
fill_indexpage
((
int
(
off
)
/
(
int
(
config
.
config_books_per_page
))
+
1
),
db
.
Books
,
db
.
Books
.
series
.
any
(
db
.
Series
.
id
==
book_id
),
db
.
Books
.
series_index
)
db
.
Books
,
db
.
Books
.
series
.
any
(
db
.
Series
.
id
==
book_id
),
db
.
Books
.
series_index
)
xml
=
render_title_template
(
'feed.xml'
,
entries
=
entries
,
pagination
=
pagination
)
xml
=
render_title_template
(
'feed.xml'
,
entries
=
entries
,
pagination
=
pagination
)
response
=
make_response
(
xml
)
response
=
make_response
(
xml
)
...
...
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