Skip to content

Commit e3da3ba

Browse files
committed
修复 Raw 快捷下载数量获取错误的问题
1 parent 27ee8c6 commit e3da3ba

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

GithubEnhanced-High-Speed-Download.user.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// ==UserScript==
22
// @name Github 增强 - 高速下载
3-
// @version 1.2.3
3+
// @version 1.2.4
44
// @author X.I.U
55
// @description 高速下载 Clone、Release、Raw、Code(ZIP) 等文件、项目列表单文件快捷下载 (☁)
66
// @match https://github.com/*/*
@@ -77,8 +77,11 @@
7777
menu_raw_fast += 1;
7878
}
7979
GM_setValue('xiu2_menu_raw_fast', menu_raw_fast);
80+
console.log(11111)
8081
delDownLink(); // 删除旧加速源
82+
console.log(22222)
8183
addDownLink(); // 添加新加速源
84+
console.log(33333)
8285
GM_notification(`已切换加速源为:${raw_url_name[menu_raw_fast]}`); // 提示消息
8386
registerMenuCommand(); // 重新注册脚本菜单
8487
};
@@ -219,9 +222,9 @@
219222
// 添加 Raw 下载链接(☁)
220223
function addDownLink(){
221224
// 如果不是项目文件页面,就返回
222-
var files = $('.octicon.octicon-file');
225+
var files = $('div.Box-row svg.octicon.octicon-file');
223226
if(files.length === 0) return;
224-
var files1 = $('.fileDownLink');
227+
var files1 = $('a.fileDownLink');
225228
if(files1.length > 0) return;
226229

227230
// 鼠标指向则显示

0 commit comments

Comments
 (0)