From e5d6efa51f9e206893e5c83081948103e67536a3 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Sun, 27 Dec 2020 19:00:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20[=E8=93=9D=E5=A5=8F?= =?UTF-8?q?=E4=BA=91=E7=BD=91=E7=9B=98=E5=A2=9E=E5=BC=BA]=20=E8=84=9A?= =?UTF-8?q?=E6=9C=AC=EF=BC=88=E8=87=AA=E5=8A=A8=E6=98=BE=E7=A4=BA=E6=9B=B4?= =?UTF-8?q?=E5=A4=9A=E6=96=87=E4=BB=B6=EF=BC=88=E6=96=87=E4=BB=B6=E5=A4=B9?= =?UTF-8?q?=E6=9C=AB=E5=B0=BE=E6=8C=89=E9=92=AE=EF=BC=89=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Lanzou-Enhanced.user.js | 40 ++++++++++++++++++++++++++++++++++++++++ README.md | 1 + 2 files changed, 41 insertions(+) create mode 100644 Lanzou-Enhanced.user.js diff --git a/Lanzou-Enhanced.user.js b/Lanzou-Enhanced.user.js new file mode 100644 index 0000000..e64a4ac --- /dev/null +++ b/Lanzou-Enhanced.user.js @@ -0,0 +1,40 @@ +// ==UserScript== +// @name 蓝奏云网盘增强 +// @version 1.0.0 +// @author X.I.U +// @description 自动显示更多文件(文件夹末尾按钮) +// @match https://www.lanzou.com/account.php +// @match https://up.woozooo.com/mydisk.php* +// @icon https://www.lanzou.com/favicon.ico +// @grant GM_xmlhttpRequest +// @grant GM_registerMenuCommand +// @grant GM_openInTab +// @noframes +// @license GPL-3.0 License +// @run-at document-end +// @namespace https://github.com/XIU2/UserScript +// ==/UserScript== + +(function() { + // 如果位于 [https://www.lanzou.com/account.php] 网页,则跳转至 iframe 指向的 [https://up.woozooo.com/mydisk.php] 网页 + // 用来解决 iframe 跨域无法操作的问题,其实 [https://up.woozooo.com/mydisk.php] 还套了一个 iframe,但已经是同域可以操作了,没必要再跳转了 + if(window.top.location.href === "https://www.lanzou.com/account.php"){ + window.top.location.href = "https://up.woozooo.com/mydisk.php" + } + + // 注册脚本菜单 + GM_registerMenuCommand('反馈 & 建议', function () {window.GM_openInTab('https://github.com/XIU2/UserScript#xiu2userscript', {active: true,insert: true,setParent: true});}); + + // 自动显示更多文件 + function fileMore() { + var mainframe = document.getElementById("mainframe").contentWindow; + var filemore = mainframe.document.getElementById("filemore"); + if(filemore && filemore.style.display != "none"){ + if(filemore.children[0]){ + filemore.children[0].click(); + } + } + } + // 定时执行(为了确保不漏掉,只能用这个笨方法了。。。) + setInterval(fileMore,100) +})(); \ No newline at end of file diff --git a/README.md b/README.md index fc57b26..2fc4d51 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,7 @@ | **3DM论坛 美化** | 精简多余内容 | **[「安装」](https://greasyfork.org/zh-CN/scripts/413593)** | **[「安装」](https://cdn.jsdelivr.net/gh/XIU2/UserScript@master/3dm-Beautification.user.js)** | | **3DM论坛 增强** | 自动回复、自动无缝翻页、清理置顶帖子 | **[「安装」](https://greasyfork.org/zh-CN/scripts/412890)** | **[「安装」](https://cdn.jsdelivr.net/gh/XIU2/UserScript@master/3dm-Enhanced.user.js)** | | **423Down 增强 \*** | 自动无缝翻页 | **[「安装」](https://greasyfork.org/zh-CN/scripts/419215)** | **[「安装」](https://cdn.jsdelivr.net/gh/XIU2/UserScript@master/423Down-Enhanced.user.js)** | +| **蓝奏云网盘 增强 \*** | 自动显示更多文件(文件夹末尾按钮) | **[「安装」](https://greasyfork.org/zh-CN/scripts/419224)** | **[「安装」](https://cdn.jsdelivr.net/gh/XIU2/UserScript@master/Lanzou-Enhanced.user.js)** | | **智友邦论坛 美化** | 精简多余内容、宽屏显示 | **[「安装」](https://greasyfork.org/zh-CN/scripts/412361)** | **[「安装」](https://cdn.jsdelivr.net/gh/XIU2/UserScript@master/Zhiyoo-Beautification.user.js)** | | **智友邦论坛 增强** | 自动签到、自动回复、自动无缝翻页、清理置顶帖子... | **[「安装」](https://greasyfork.org/zh-CN/scripts/412362)** | **[「安装」](https://cdn.jsdelivr.net/gh/XIU2/UserScript@master/Zhiyoo-Enhanced.user.js)** | | ~~_**Google 翻译 美化**_~~ | ~~_精简多余内容、修复翻译结果溢出屏幕问题_~~ | ~~_**[「安装」](https://greasyfork.org/zh-CN/scripts/413721)**_~~ | ~~_**[「安装」](https://cdn.jsdelivr.net/gh/XIU2/UserScript@master/GoogleTranslate-Beautification.user.js)**_~~ |