From fc83bf8ddded94120a29d9a8bbe12780902dc5f3 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Fri, 22 Oct 2021 12:24:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20=E5=9B=A0=20Github=20?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E6=9B=B4=E6=96=B0=E5=AF=BC=E8=87=B4=20Releas?= =?UTF-8?q?e=20=E5=8A=A0=E9=80=9F=E6=BA=90=E6=8C=89=E9=92=AE=E4=B8=8D?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=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 | 43 +++------------------- 1 file changed, 6 insertions(+), 37 deletions(-) diff --git a/GithubEnhanced-High-Speed-Download.user.js b/GithubEnhanced-High-Speed-Download.user.js index d45de51..10c0022 100644 --- a/GithubEnhanced-High-Speed-Download.user.js +++ b/GithubEnhanced-High-Speed-Download.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name Github 增强 - 高速下载 -// @version 1.6.3 +// @version 1.6.4 // @author X.I.U // @description 高速下载 Git Clone/SSH、Release、Raw、Code(ZIP) 等文件、项目列表单文件快捷下载 (☁) // @match *://github.com/* @@ -134,43 +134,14 @@ // Release function addRelease() { - let html = document.getElementsByClassName('Box Box--condensed');if (!html) return - let divDisplay; - if (document.documentElement.clientWidth > 1000) { - divDisplay = 'display: flex;'; - } else { - divDisplay = 'display: block;'; - } + let html = document.getElementsByClassName('Box-footer');if (!html) return + let divDisplay = ''; + if (document.documentElement.clientWidth > 1000) {divDisplay = 'float: right;margin-top: -3px;margin-left: 8px;';}; // 调整小屏幕下样式 Array.from(html).forEach(function (current) { - current.querySelectorAll('.d-flex.Box-body > a').forEach(function (_this) { + current.querySelectorAll('li.Box-row > a').forEach(function (_this) { let href = _this.href.split(location.host), url = [], - _html = `