From e3da3ba1bfd85f974b820042938d32e2d8aa6c9d Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Tue, 10 Nov 2020 15:28:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20Raw=20=E5=BF=AB=E6=8D=B7?= =?UTF-8?q?=E4=B8=8B=E8=BD=BD=E6=95=B0=E9=87=8F=E8=8E=B7=E5=8F=96=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- GithubEnhanced-High-Speed-Download.user.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/GithubEnhanced-High-Speed-Download.user.js b/GithubEnhanced-High-Speed-Download.user.js index 3993037..7b41817 100644 --- a/GithubEnhanced-High-Speed-Download.user.js +++ b/GithubEnhanced-High-Speed-Download.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name Github 增强 - 高速下载 -// @version 1.2.3 +// @version 1.2.4 // @author X.I.U // @description 高速下载 Clone、Release、Raw、Code(ZIP) 等文件、项目列表单文件快捷下载 (☁) // @match https://github.com/*/* @@ -77,8 +77,11 @@ menu_raw_fast += 1; } GM_setValue('xiu2_menu_raw_fast', menu_raw_fast); + console.log(11111) delDownLink(); // 删除旧加速源 + console.log(22222) addDownLink(); // 添加新加速源 + console.log(33333) GM_notification(`已切换加速源为:${raw_url_name[menu_raw_fast]}`); // 提示消息 registerMenuCommand(); // 重新注册脚本菜单 }; @@ -219,9 +222,9 @@ // 添加 Raw 下载链接(☁) function addDownLink(){ // 如果不是项目文件页面,就返回 - var files = $('.octicon.octicon-file'); + var files = $('div.Box-row svg.octicon.octicon-file'); if(files.length === 0) return; - var files1 = $('.fileDownLink'); + var files1 = $('a.fileDownLink'); if(files1.length > 0) return; // 鼠标指向则显示