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
f821580b
Commit
f821580b
authored
Jan 03, 2019
by
Ozzieisaacs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#Fix 745
parent
7086c8d1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
15 deletions
+4
-15
caliBlur.js
cps/static/js/caliBlur.js
+0
-13
jquery.visible.min.js
cps/static/js/libs/jquery.visible.min.js
+1
-0
layout.html
cps/templates/layout.html
+3
-2
No files found.
cps/static/js/caliBlur.js
View file @
f821580b
/***
* Copyright 2012, Digital Fusion
* Licensed under the MIT license.
* http://teamdf.com/jquery-plugins/license/
*
* @author Sam Sehnert
* @desc A small plugin that checks whether elements are within
* the user visible viewport of a web browser.
* can accounts for vertical position, horizontal, or both
*/
!
function
(
t
){
var
i
=
t
(
window
);
t
.
fn
.
visible
=
function
(
t
,
e
,
o
){
if
(
!
(
this
.
length
<
1
)){
var
r
=
this
.
length
>
1
?
this
.
eq
(
0
):
this
,
n
=
r
.
get
(
0
),
f
=
i
.
width
(),
h
=
i
.
height
(),
o
=
o
?
o
:
"both"
,
l
=
e
===!
0
?
n
.
offsetWidth
*
n
.
offsetHeight
:
!
0
;
if
(
"function"
==
typeof
n
.
getBoundingClientRect
){
var
g
=
n
.
getBoundingClientRect
(),
u
=
g
.
top
>=
0
&&
g
.
top
<
h
,
s
=
g
.
bottom
>
0
&&
g
.
bottom
<=
h
,
c
=
g
.
left
>=
0
&&
g
.
left
<
f
,
a
=
g
.
right
>
0
&&
g
.
right
<=
f
,
v
=
t
?
u
||
s
:
u
&&
s
,
b
=
t
?
c
||
a
:
c
&&
a
;
if
(
"both"
===
o
)
return
l
&&
v
&&
b
;
if
(
"vertical"
===
o
)
return
l
&&
v
;
if
(
"horizontal"
===
o
)
return
l
&&
b
}
else
{
var
d
=
i
.
scrollTop
(),
p
=
d
+
h
,
w
=
i
.
scrollLeft
(),
m
=
w
+
f
,
y
=
r
.
offset
(),
z
=
y
.
top
,
B
=
z
+
r
.
height
(),
C
=
y
.
left
,
R
=
C
+
r
.
width
(),
j
=
t
===!
0
?
B
:
z
,
q
=
t
===!
0
?
z
:
B
,
H
=
t
===!
0
?
R
:
C
,
L
=
t
===!
0
?
C
:
R
;
if
(
"both"
===
o
)
return
!!
l
&&
p
>=
q
&&
j
>=
d
&&
m
>=
L
&&
H
>=
w
;
if
(
"vertical"
===
o
)
return
!!
l
&&
p
>=
q
&&
j
>=
d
;
if
(
"horizontal"
===
o
)
return
!!
l
&&
m
>=
L
&&
H
>=
w
}}}}(
jQuery
);
// Move advanced search to side-menu
// Move advanced search to side-menu
$
(
'a[href*="advanced"]'
).
parent
().
insertAfter
(
'#nav_new'
);
$
(
'a[href*="advanced"]'
).
parent
().
insertAfter
(
'#nav_new'
);
$
(
'body'
).
addClass
(
'blur'
);
$
(
'body'
).
addClass
(
'blur'
);
...
...
cps/static/js/libs/jquery.visible.min.js
0 → 100644
View file @
f821580b
!
function
(
t
){
var
i
=
t
(
window
);
t
.
fn
.
visible
=
function
(
t
,
e
,
o
){
if
(
!
(
this
.
length
<
1
)){
var
r
=
this
.
length
>
1
?
this
.
eq
(
0
):
this
,
n
=
r
.
get
(
0
),
f
=
i
.
width
(),
h
=
i
.
height
(),
o
=
o
?
o
:
"both"
,
l
=
e
===!
0
?
n
.
offsetWidth
*
n
.
offsetHeight
:
!
0
;
if
(
"function"
==
typeof
n
.
getBoundingClientRect
){
var
g
=
n
.
getBoundingClientRect
(),
u
=
g
.
top
>=
0
&&
g
.
top
<
h
,
s
=
g
.
bottom
>
0
&&
g
.
bottom
<=
h
,
c
=
g
.
left
>=
0
&&
g
.
left
<
f
,
a
=
g
.
right
>
0
&&
g
.
right
<=
f
,
v
=
t
?
u
||
s
:
u
&&
s
,
b
=
t
?
c
||
a
:
c
&&
a
;
if
(
"both"
===
o
)
return
l
&&
v
&&
b
;
if
(
"vertical"
===
o
)
return
l
&&
v
;
if
(
"horizontal"
===
o
)
return
l
&&
b
}
else
{
var
d
=
i
.
scrollTop
(),
p
=
d
+
h
,
w
=
i
.
scrollLeft
(),
m
=
w
+
f
,
y
=
r
.
offset
(),
z
=
y
.
top
,
B
=
z
+
r
.
height
(),
C
=
y
.
left
,
R
=
C
+
r
.
width
(),
j
=
t
===!
0
?
B
:
z
,
q
=
t
===!
0
?
z
:
B
,
H
=
t
===!
0
?
R
:
C
,
L
=
t
===!
0
?
C
:
R
;
if
(
"both"
===
o
)
return
!!
l
&&
p
>=
q
&&
j
>=
d
&&
m
>=
L
&&
H
>=
w
;
if
(
"vertical"
===
o
)
return
!!
l
&&
p
>=
q
&&
j
>=
d
;
if
(
"horizontal"
===
o
)
return
!!
l
&&
m
>=
L
&&
H
>=
w
}}}}(
jQuery
);
cps/templates/layout.html
View file @
f821580b
...
@@ -241,8 +241,9 @@
...
@@ -241,8 +241,9 @@
<script
src=
"{{ url_for('static', filename='js/libs/jquery.form.js') }}"
></script>
<script
src=
"{{ url_for('static', filename='js/libs/jquery.form.js') }}"
></script>
<script
src=
"{{ url_for('static', filename='js/main.js') }}"
></script>
<script
src=
"{{ url_for('static', filename='js/main.js') }}"
></script>
{% if g.user.get_theme == 1 %}
{% if g.user.get_theme == 1 %}
<!--script src="{{ url_for('static', filename='js/libs/compromise.min.js') }}"></script>
<script
src=
"{{ url_for('static', filename='js/libs/jquery.visible.min.js') }}"
></script>
<script src="{{ url_for('static', filename='js/libs/readmore.min.js') }}"></script-->
<script
src=
"{{ url_for('static', filename='js/libs/compromise.min.js') }}"
></script>
<script
src=
"{{ url_for('static', filename='js/libs/readmore.min.js') }}"
></script>
<script
src=
"{{ url_for('static', filename='js/caliBlur.js') }}"
></script>
<script
src=
"{{ url_for('static', filename='js/caliBlur.js') }}"
></script>
{% endif %}
{% endif %}
<script
type=
"text/javascript"
>
<script
type=
"text/javascript"
>
...
...
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