mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-06-05 21:01:46 +08:00
Merge branch 'dev' of https://github.com/jerryc127/hexo-theme-butterfly into dev
This commit is contained in:
+4
-4
@@ -277,8 +277,7 @@ document.addEventListener('DOMContentLoaded', function () {
|
|||||||
const isChatBtnHide = typeof chatBtnHide === 'function'
|
const isChatBtnHide = typeof chatBtnHide === 'function'
|
||||||
const isChatBtnShow = typeof chatBtnShow === 'function'
|
const isChatBtnShow = typeof chatBtnShow === 'function'
|
||||||
|
|
||||||
window.scrollCollect = () => {
|
const scrollTask = btf.throttle(() => {
|
||||||
return btf.throttle(function (e) {
|
|
||||||
const currentTop = window.scrollY || document.documentElement.scrollTop
|
const currentTop = window.scrollY || document.documentElement.scrollTop
|
||||||
const isDown = scrollDirection(currentTop)
|
const isDown = scrollDirection(currentTop)
|
||||||
if (currentTop > 56) {
|
if (currentTop > 56) {
|
||||||
@@ -309,8 +308,9 @@ document.addEventListener('DOMContentLoaded', function () {
|
|||||||
if (document.body.scrollHeight <= innerHeight) {
|
if (document.body.scrollHeight <= innerHeight) {
|
||||||
$rightside.style.cssText = 'opacity: 0.8; transform: translateX(-58px)'
|
$rightside.style.cssText = 'opacity: 0.8; transform: translateX(-58px)'
|
||||||
}
|
}
|
||||||
}, 200)()
|
}, 200)
|
||||||
}
|
|
||||||
|
window.scrollCollect = scrollTask
|
||||||
|
|
||||||
window.addEventListener('scroll', scrollCollect)
|
window.addEventListener('scroll', scrollCollect)
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user