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
7da40d1c
Commit
7da40d1c
authored
Apr 25, 2021
by
GarcaMan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added option to remove Y-Scrollbar and reset page scroll
parent
97e4707f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
1 deletion
+42
-1
kthoom.css
cps/static/css/kthoom.css
+11
-0
kthoom.js
cps/static/js/kthoom.js
+13
-1
readcbr.html
cps/templates/readcbr.html
+18
-0
No files found.
cps/static/css/kthoom.css
View file @
7da40d1c
...
@@ -227,3 +227,14 @@ th {
...
@@ -227,3 +227,14 @@ th {
.dark-theme
.overlay
{
.dark-theme
.overlay
{
background-color
:
rgba
(
0
,
0
,
0
,
0.8
);
background-color
:
rgba
(
0
,
0
,
0
,
0.8
);
}
}
/* Hide scrollbar for Chrome, Safari and Opera */
.disabled-scrollbar
::-webkit-scrollbar
{
display
:
none
;
}
/* Hide scrollbar for IE, Edge and Firefox */
.disabled-scrollbar
{
-ms-overflow-style
:
none
;
/* IE and Edge */
scrollbar-width
:
none
;
/* Firefox */
}
\ No newline at end of file
cps/static/js/kthoom.js
View file @
7da40d1c
...
@@ -69,7 +69,9 @@ var settings = {
...
@@ -69,7 +69,9 @@ var settings = {
rotateTimes
:
0
,
rotateTimes
:
0
,
fitMode
:
kthoom
.
Key
.
B
,
fitMode
:
kthoom
.
Key
.
B
,
theme
:
"light"
,
theme
:
"light"
,
direction
:
0
// 0 = Left to Right, 1 = Right to Left
direction
:
0
,
// 0 = Left to Right, 1 = Right to Left
nextPage
:
0
,
// 0 = Reset to Top, 1 = Remember Position
scrollbar
:
1
// 0 = Hide Scrollbar, 1 = Show Scrollbar
};
};
kthoom
.
saveSettings
=
function
()
{
kthoom
.
saveSettings
=
function
()
{
...
@@ -282,6 +284,7 @@ function updatePage() {
...
@@ -282,6 +284,7 @@ function updatePage() {
}
}
$
(
"body"
).
toggleClass
(
"dark-theme"
,
settings
.
theme
===
"dark"
);
$
(
"body"
).
toggleClass
(
"dark-theme"
,
settings
.
theme
===
"dark"
);
$
(
"#mainContent"
).
toggleClass
(
"disabled-scrollbar"
,
settings
.
scrollbar
===
0
);
kthoom
.
setSettings
();
kthoom
.
setSettings
();
kthoom
.
saveSettings
();
kthoom
.
saveSettings
();
...
@@ -439,6 +442,9 @@ function showPrevPage() {
...
@@ -439,6 +442,9 @@ function showPrevPage() {
currentImage
++
;
currentImage
++
;
}
else
{
}
else
{
updatePage
();
updatePage
();
if
(
settings
.
nextPage
===
0
)
{
$
(
"#mainContent"
).
scrollTop
(
0
);
}
}
}
}
}
...
@@ -449,6 +455,9 @@ function showNextPage() {
...
@@ -449,6 +455,9 @@ function showNextPage() {
currentImage
--
;
currentImage
--
;
}
else
{
}
else
{
updatePage
();
updatePage
();
if
(
settings
.
nextPage
===
0
)
{
$
(
"#mainContent"
).
scrollTop
(
0
);
}
}
}
}
}
...
@@ -650,6 +659,9 @@ function init(filename) {
...
@@ -650,6 +659,9 @@ function init(filename) {
$
(
"#thumbnails"
).
on
(
"click"
,
"a"
,
function
()
{
$
(
"#thumbnails"
).
on
(
"click"
,
"a"
,
function
()
{
currentImage
=
$
(
this
).
data
(
"page"
)
-
1
;
currentImage
=
$
(
this
).
data
(
"page"
)
-
1
;
updatePage
();
updatePage
();
if
(
settings
.
nextPage
===
0
)
{
$
(
"#mainContent"
).
scrollTop
(
0
);
}
});
});
// Fullscreen mode
// Fullscreen mode
...
...
cps/templates/readcbr.html
View file @
7da40d1c
...
@@ -157,6 +157,24 @@
...
@@ -157,6 +157,24 @@
<label
for=
"rightToLeft"
><input
type=
"radio"
id=
"rightToLeft"
name=
"direction"
value=
"1"
/>
{{_('Right to Left')}}
</label>
<label
for=
"rightToLeft"
><input
type=
"radio"
id=
"rightToLeft"
name=
"direction"
value=
"1"
/>
{{_('Right to Left')}}
</label>
</div>
</div>
</td>
</td>
</tr>
<tr>
<th>
{{_('Next Page')}}:
</th>
<td>
<div
class=
"inputs"
>
<label
for=
"resetToTop"
><input
type=
"radio"
id=
"resetToTop"
name=
"nextPage"
value=
"0"
/>
{{_('Reset to Top')}}
</label>
<label
for=
"rememberPosition"
><input
type=
"radio"
id=
"rememberPosition"
name=
"nextPage"
value=
"1"
/>
{{_('Remember Position')}}
</label>
</div>
</td>
</tr>
<tr>
<th>
{{_('Scrollbar')}}:
</th>
<td>
<div
class=
"inputs"
>
<label
for=
"showScrollbar"
><input
type=
"radio"
id=
"showScrollbar"
name=
"scrollbar"
value=
"1"
/>
{{_('Show')}}
</label>
<label
for=
"hideScrollbar"
><input
type=
"radio"
id=
"hideScrollbar"
name=
"scrollbar"
value=
"0"
/>
{{_('Hide')}}
</label>
</div>
</td>
</tr>
</tr>
</tbody>
</tbody>
</table>
</table>
...
...
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