|
1 | 1 | // ==UserScript== |
2 | 2 | // @name 蓝奏云网盘增强 |
3 | | -// @version 1.0.6 |
| 3 | +// @version 1.0.7 |
4 | 4 | // @author X.I.U |
5 | | -// @description 刷新不返回根目录(F5)、自动显示更多文件(文件夹末尾按钮)、自动打开分享链接(点击文件时)、自动复制分享链接(点击文件时) |
| 5 | +// @description 刷新不返回根目录(F5)、自动显示更多文件、自动打开分享链接(点击文件时)、自动复制分享链接(点击文件时) |
| 6 | +// @match *://*.lanzous.com/* |
| 7 | +// @match *://*.lanzoux.com/* |
| 8 | +// @match *://*.lanzoui.com/* |
6 | 9 | // @match *://www.lanzou.com/account.php |
7 | 10 | // @match *://www.lanzou.com/u |
8 | 11 | // @match *://up.woozooo.com/u |
|
23 | 26 | // @namespace https://github.com/XIU2/UserScript |
24 | 27 | // ==/UserScript== |
25 | 28 | (function() { |
26 | | - if(window.top.location.href != "https://pc.woozooo.com/mydisk.php"){ |
27 | | - window.top.location.href = "https://pc.woozooo.com/mydisk.php" |
28 | | - } |
29 | | - |
30 | 29 | var menu_open_fileSha = GM_getValue('xiu2_menu_open_fileSha'); |
31 | 30 | var menu_copy_fileSha = GM_getValue('xiu2_menu_copy_fileSha'); |
32 | 31 | var menu_refreshCorrection = GM_getValue('xiu2_menu_refreshCorrection'); |
|
78 | 77 | }; |
79 | 78 |
|
80 | 79 |
|
| 80 | + if(document.getElementById("infos")){ // 分享链接文件列表页 |
| 81 | + setTimeout(fileMoreS, 300); // 自动显示更多文件 |
| 82 | + }else if(document.querySelector("iframe.ifr2")){ // 分享链接文件下载页(暂时没有这方面的功能,先空着) |
| 83 | + //console.log() |
| 84 | + }else if(document.getElementById("mainframe") || window.top.location.href.indexOf("mydisk.php?") > -1){ // 后台页 |
| 85 | + if(window.top.location.href != "https://pc.woozooo.com/mydisk.php"){ |
| 86 | + window.top.location.href = "https://pc.woozooo.com/mydisk.php" |
| 87 | + } |
| 88 | + var mainframe; |
| 89 | + iframe(); |
| 90 | + } |
| 91 | + |
| 92 | + |
81 | 93 | // 获取 iframe 框架 |
82 | | - var mainframe |
83 | | - mainframe = document.getElementById("mainframe"); |
84 | | - if(mainframe){ // 只有找到 iframe 框架时才会继续运行脚本 |
85 | | - mainframe = mainframe.contentWindow; |
86 | | - if(menu_refreshCorrection){ |
87 | | - refreshCorrection(); // 刷新不返回根目录(F5) |
| 94 | + function iframe() { |
| 95 | + mainframe = document.getElementById("mainframe"); |
| 96 | + if(mainframe){ // 只有找到 iframe 框架时才会继续运行脚本 |
| 97 | + mainframe = mainframe.contentWindow; |
| 98 | + if(menu_refreshCorrection){ |
| 99 | + refreshCorrection(); // 刷新不返回根目录(F5) |
| 100 | + } |
| 101 | + EventXMLHttpRequest(); // 监听 XMLHttpRequest 事件并执行 [自动显示更多文件] |
88 | 102 | } |
89 | | - EventXMLHttpRequest(); // 监听 XMLHttpRequest 事件并执行 [自动显示更多文件] |
90 | 103 | } |
91 | 104 |
|
92 | 105 |
|
|
132 | 145 | } |
133 | 146 |
|
134 | 147 |
|
| 148 | + // 自动显示更多文件 |
| 149 | + function fileMoreS() { |
| 150 | + let filemore = document.getElementById("filemore"); // 寻找 [显示更多文件] 按钮 |
| 151 | + if(filemore && filemore.style.display != "none"){ // 判断按钮是否存在且可见 |
| 152 | + filemore.click(); // 点击 [显示更多文件] 按钮 |
| 153 | + } |
| 154 | + } |
| 155 | + |
| 156 | + |
135 | 157 | // 分享链接相关(点击文件时) |
136 | 158 | function fileSha() { |
137 | 159 | var f_sha = mainframe.document.getElementById("f_sha"); // 寻找分享链接(下载链接)信息框 |
|
0 commit comments