Skip to content

Commit e474f20

Browse files
committed
优化 [文件排序] 功能细节
1 parent 245e148 commit e474f20

2 files changed

Lines changed: 10 additions & 8 deletions

File tree

Lanzou-Enhanced.user.js

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// ==UserScript==
22
// @name 蓝奏云网盘增强
3-
// @version 1.4.3
3+
// @version 1.4.4
44
// @author X.I.U
5-
// @description 刷新不回根目录、快捷返回上一级(右键网页空白处)、后退返回上一级、右键文件显示菜单、点击直接下载文件、点击空白进入目录、自动显示更多文件、一键复制所有分享链接、自定义分享链接域名、自动打开/复制分享链接、带密码的分享链接自动输密码、拖入文件自动显示上传框、输入密码后回车确认、调整描述(话说)编辑框初始大小
5+
// @description 文件排序、刷新不回根目录、快捷返回上一级(右键网页空白处)、后退返回上一级、右键文件显示菜单、点击直接下载文件、点击空白进入目录、自动显示更多文件、一键复制所有分享链接、自定义分享链接域名、自动打开/复制分享链接、带密码的分享链接自动输密码、拖入文件自动显示上传框、输入密码后回车确认、调整描述(话说)编辑框初始大小
66
// @include /^https:\/\/.+\.lanzou[a-z]\.com\/.*$/
77
// @match *://pan.lanzou.com/*
88
// @match *://lanzou.com/u
@@ -631,30 +631,32 @@
631631
const down = tabTitle.querySelector('div.f_down'); // 下载量
632632
return {
633633
name: {
634-
el: createButton(name, 'name'),
634+
el: createButton(name, 'name', '按 文件名称 排序'),
635635
order: 'asc',
636636
},
637637
size: {
638-
el: createButton(size, 'size'),
638+
el: createButton(size, 'size', '按 文件大小 排序'),
639639
order: 'asc',
640640
},
641641
time: {
642-
el: createButton(time, 'time'),
642+
el: createButton(time, 'time', '按 上传时间 排序'),
643643
order: 'asc',
644644
},
645645
down: {
646-
el: createButton(down, 'down'),
646+
el: createButton(down, 'down', '按 下载次数 排序'),
647647
order: 'asc',
648648
}
649649
};
650650
}
651-
function createButton(element, by) {
651+
function createButton(element, by, title) {
652652
// element.insertAdjacentHTML('beforeend', '<a class="col_sort_btn" href="javascript: void;" style="font-size: 16px; float: right;">⇧</a>');
653653
let button = frameDoc.createElement('a');
654654
button.className = 'col_sort_btn';
655655
button.href = 'javascript: void(0);';
656656
button.style.fontSize = '16px';
657657
button.style.float = 'right';
658+
if (by == 'name') {button.style.float = 'left';}
659+
button.title = title;
658660
button.textContent = '⇧';
659661
button.onclick = () => clickSortButton(by, button);
660662
element.appendChild(button);

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
| [<img src="https://user-images.githubusercontent.com/54703944/118383905-b5d32380-b634-11eb-8914-dcea8e628ed3.png" height="16px" />](https://github.com/XIU2) | **自动无缝翻页 \*** | 无缝衔接下一页内容 **(瀑布流)** 支持各论坛/漫画/百度/谷歌等... | **[安装](https://greasyfork.org/zh-CN/scripts/419215)** \| **[备用](https://cdn.staticaly.com/gh/XIU2/UserScript/master/Autopage.user.js)** |
2929
| [<img src="https://www.3dmgame.com/favicon.ico" height="16px" />](https://bbs.3dmgame.com) | **3DM论坛 美化** | 精简多余内容、样式优化 | **[安装](https://greasyfork.org/zh-CN/scripts/413593)** \| **[备用](https://cdn.staticaly.com/gh/XIU2/UserScript/master/3dm-Beautification.user.js)** |
3030
| [<img src="https://www.3dmgame.com/favicon.ico" height="16px" />](https://bbs.3dmgame.com) | **3DM论坛 增强** | **自动回复**、自动无缝翻页、清理置顶帖子、自动滚至隐藏... | **[安装](https://greasyfork.org/zh-CN/scripts/412890)** \| **[备用](https://cdn.staticaly.com/gh/XIU2/UserScript/master/3dm-Enhanced.user.js)** |
31-
| [<img src="https://www.lanzou.com/favicon.ico" height="16px" />](https://www.lanzou.com) | **蓝奏云网盘 增强 \*** | **右键显示菜单**、直接下载文件、显示更多文件、自动密码... | **[安装](https://greasyfork.org/zh-CN/scripts/419224)** \| **[备用](https://cdn.staticaly.com/gh/XIU2/UserScript/master/Lanzou-Enhanced.user.js)** |
31+
| [<img src="https://www.lanzou.com/favicon.ico" height="16px" />](https://www.lanzou.com) | **蓝奏云网盘 增强 \*** | **文件排序、右键显示菜单**、直接下载文件、显示更多文件... | **[安装](https://greasyfork.org/zh-CN/scripts/419224)** \| **[备用](https://cdn.staticaly.com/gh/XIU2/UserScript/master/Lanzou-Enhanced.user.js)** |
3232
| [<img src="https://user-images.githubusercontent.com/54703944/118383905-b5d32380-b634-11eb-8914-dcea8e628ed3.png" height="16px" />](https://github.com/XIU2) | **新标签页打开链接 \*** | 将网页中所有链接改为新标签页打开~ | **[安装](https://greasyfork.org/zh-CN/scripts/429714)** \| **[备用](https://cdn.staticaly.com/gh/XIU2/UserScript/master/TargetBlank.user.js)** |
3333
| [<img src="https://duckduckgo.com/favicon.ico" height="16px" />](https://duckduckgo.com) | **DuckDuckGo 增强** | **屏蔽指定域名**、修复图标加载、链接不携来源、快捷回到... | **[安装](https://greasyfork.org/zh-CN/scripts/436428)** \| **[备用](https://cdn.staticaly.com/gh/XIU2/UserScript/master/DuckDuckGo-Enhanced.user.js)** |
3434
| [<img src="https://www.52pojie.cn/favicon.ico" height="16px" />](https://www.52pojie.cn) | **吾爱破解论坛 美化** | 精简多余内容、样式优化 | **[安装](https://greasyfork.org/zh-CN/scripts/412681)** \| **[备用](https://cdn.staticaly.com/gh/XIU2/UserScript/master/52pojie-Beautification.user.js)** |

0 commit comments

Comments
 (0)