File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11// ==UserScript==
22// @name 蓝奏云网盘增强
3- // @version 1.2.5
3+ // @version 1.2.6
44// @author X.I.U
55// @description 刷新不回根目录、后退返回上一级、右键文件显示菜单、自动显示更多文件、自动打开分享链接、自动复制分享链接、拖入文件自动显示上传框、输入密码后回车确认、调整描述(话说)编辑框初始大小
66// @match *://*.lanzous.com/*
194194
195195 // 自动显示更多文件(分享链接列表页)
196196 function fileMoreS ( ) {
197- if ( document . getElementById ( "fileview" ) ) { // 新版页面
198- windowScroll ( function ( direction , e ) {
199- if ( direction === "down" ) { // 下滑才准备加载更多
200- let scrollTop = document . documentElement . scrollTop || window . pageYOffset || document . body . scrollTop ;
201- let scrollDelta = 500 ;
202- if ( document . documentElement . scrollHeight <= document . documentElement . clientHeight + scrollTop + scrollDelta ) {
203- let filemore = document . getElementById ( "filemore" ) ; // 寻找 [显示更多文件] 按钮
204- if ( filemore && filemore . style . display != "none" ) { // 如果正在加载,就不再点击
205- if ( filemore . innerText . indexOf ( '更多' ) > - 1 ) { // 避免已经在加载了,重复点击
206- filemore . click ( ) ; // 点击 [显示更多文件] 按钮
207- }
197+ windowScroll ( function ( direction , e ) {
198+ if ( direction === "down" ) { // 下滑才准备加载更多
199+ let scrollTop = document . documentElement . scrollTop || window . pageYOffset || document . body . scrollTop ;
200+ let scrollDelta = 500 ;
201+ if ( document . documentElement . scrollHeight <= document . documentElement . clientHeight + scrollTop + scrollDelta ) {
202+ let filemore = document . getElementById ( "filemore" ) ; // 寻找 [显示更多文件] 按钮
203+ if ( filemore && filemore . style . display != "none" ) { // 如果正在加载,就不再点击
204+ if ( filemore . innerText . indexOf ( '更多' ) > - 1 ) { // 避免已经在加载了,重复点击
205+ filemore . click ( ) ; // 点击 [显示更多文件] 按钮
208206 }
209207 }
210208 }
211- } ) ;
212- } else { // 旧版页面
213- let filemore = document . getElementById ( "filemore" ) ; // 寻找 [显示更多文件] 按钮
214- if ( filemore && filemore . style . display != "none" ) { // 判断按钮是否存在且可见
215- filemore . click ( ) ; // 点击 [显示更多文件] 按钮
216209 }
217- }
210+ } ) ;
218211 }
219212
220213
You can’t perform that action at this time.
0 commit comments