Skip to content

Commit bafa5b3

Browse files
committed
修复 文件夹/文件有密码时 [自动打开分享链接] 获取错误的问题。
1 parent 8919969 commit bafa5b3

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

Lanzou-Enhanced.user.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// ==UserScript==
22
// @name 蓝奏云网盘增强
3-
// @version 1.0.3
3+
// @version 1.0.4
44
// @author X.I.U
55
// @description 自动显示更多文件(文件夹末尾按钮)、自动打开分享链接(点击文件时)
66
// @match *://www.lanzou.com/account.php
@@ -87,10 +87,10 @@
8787
if(menu_open_fileSha){ // 脚本菜单开启时才继续
8888
var f_sha = mainframe.document.getElementById("f_sha"); // 寻找分享链接(下载链接)信息框
8989
if(f_sha && f_sha.style.display == "block"){ // 判断信息框是否存在且可见
90-
let f_sha1 = mainframe.document.getElementById("f_sha1").innerText; // 获取分享链接(下载链接)
91-
if(f_sha1 != ""){ // 确保分享链接(下载链接)不是空
90+
let code = mainframe.document.getElementById("code").getAttribute("title"); // 获取分享链接(下载链接)
91+
if(code != ""){ // 确保分享链接(下载链接)不是空
9292
f_sha.style.display = "none"; // 隐藏分享链接(下载链接)信息框
93-
window.GM_openInTab(f_sha1, {active: true,insert: true,setParent: true}) // 打开分享链接(下载链接)
93+
window.GM_openInTab(code, {active: true,insert: true,setParent: true}) // 打开分享链接(下载链接)
9494
}
9595
}
9696
}

0 commit comments

Comments
 (0)