优化 [文件排序] 功能细节

This commit is contained in:
xiu2
2022-08-21 15:22:12 +08:00
parent 245e14896b
commit e474f20cac
2 changed files with 10 additions and 8 deletions
+9 -7
View File
@@ -1,8 +1,8 @@
// ==UserScript==
// @name 蓝奏云网盘增强
// @version 1.4.3
// @version 1.4.4
// @author X.I.U
// @description 刷新不回根目录、快捷返回上一级(右键网页空白处)、后退返回上一级、右键文件显示菜单、点击直接下载文件、点击空白进入目录、自动显示更多文件、一键复制所有分享链接、自定义分享链接域名、自动打开/复制分享链接、带密码的分享链接自动输密码、拖入文件自动显示上传框、输入密码后回车确认、调整描述(话说)编辑框初始大小
// @description 文件排序、刷新不回根目录、快捷返回上一级(右键网页空白处)、后退返回上一级、右键文件显示菜单、点击直接下载文件、点击空白进入目录、自动显示更多文件、一键复制所有分享链接、自定义分享链接域名、自动打开/复制分享链接、带密码的分享链接自动输密码、拖入文件自动显示上传框、输入密码后回车确认、调整描述(话说)编辑框初始大小
// @include /^https:\/\/.+\.lanzou[a-z]\.com\/.*$/
// @match *://pan.lanzou.com/*
// @match *://lanzou.com/u
@@ -631,30 +631,32 @@
const down = tabTitle.querySelector('div.f_down'); // 下载量
return {
name: {
el: createButton(name, 'name'),
el: createButton(name, 'name', '按 文件名称 排序'),
order: 'asc',
},
size: {
el: createButton(size, 'size'),
el: createButton(size, 'size', '按 文件大小 排序'),
order: 'asc',
},
time: {
el: createButton(time, 'time'),
el: createButton(time, 'time', '按 上传时间 排序'),
order: 'asc',
},
down: {
el: createButton(down, 'down'),
el: createButton(down, 'down', '按 下载次数 排序'),
order: 'asc',
}
};
}
function createButton(element, by) {
function createButton(element, by, title) {
// element.insertAdjacentHTML('beforeend', '<a class="col_sort_btn" href="javascript: void;" style="font-size: 16px; float: right;">⇧</a>');
let button = frameDoc.createElement('a');
button.className = 'col_sort_btn';
button.href = 'javascript: void(0);';
button.style.fontSize = '16px';
button.style.float = 'right';
if (by == 'name') {button.style.float = 'left';}
button.title = title;
button.textContent = '⇧';
button.onclick = () => clickSortButton(by, button);
element.appendChild(button);
+1 -1
View File
@@ -28,7 +28,7 @@
| [<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)** |
| [<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)** |
| [<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)** |
| [<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)** |
| [<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)** |
| [<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)** |
| [<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)** |
| [<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)** |