From 354fc59b323b44b1f05d5b367860b95df4e99bf5 Mon Sep 17 00:00:00 2001
From: xiu2 <54703944+XIU2@users.noreply.github.com>
Date: Fri, 13 Aug 2021 13:51:29 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=20=E5=8A=A0=E9=80=9F?=
=?UTF-8?q?=E6=BA=90=E6=A0=B7=E5=BC=8F=EF=BC=88=E5=90=8C=E6=AD=A5=20Github?=
=?UTF-8?q?=20=E6=A0=B7=E5=BC=8F=E5=8F=98=E5=8A=A8=EF=BC=89?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
GithubEnhanced-High-Speed-Download.user.js | 32 ++++++----------------
1 file changed, 8 insertions(+), 24 deletions(-)
diff --git a/GithubEnhanced-High-Speed-Download.user.js b/GithubEnhanced-High-Speed-Download.user.js
index 77e807e..8ad4489 100644
--- a/GithubEnhanced-High-Speed-Download.user.js
+++ b/GithubEnhanced-High-Speed-Download.user.js
@@ -1,6 +1,6 @@
// ==UserScript==
// @name Github 增强 - 高速下载
-// @version 1.5.6
+// @version 1.5.7
// @author X.I.U
// @description 高速下载 Git Clone/SSH、Release、Raw、Code(ZIP) 等文件、项目列表单文件快捷下载 (☁)
// @match *://github.com/*
@@ -29,7 +29,7 @@
fontColor = '#768390';
} else {
backColor = '#161a21';
- fontColor = '#b2b8bf';
+ fontColor = '#97a0aa';
}
} else if (document.getElementsByTagName('html')[0].getAttribute('data-color-mode') === 'auto') {
console.log(window.getComputedStyle(document.body).backgroundColor)
@@ -38,7 +38,7 @@
fontColor = '#768390';
} else if (window.getComputedStyle(document.body).backgroundColor === 'rgb(13, 17, 23)') {
backColor = '#161a21';
- fontColor = '#b2b8bf';
+ fontColor = '#97a0aa';
}
}
//['https://gh.66ccff.work', '美国'],
@@ -71,8 +71,8 @@
['https://ghproxy.com','韩国首尔', '']
],
svg = [
- '',
- '',
+ '',
+ '',
''
],
style = ['padding:0 6px;margin-right: -1px;border-radius: 2px;background-color: '+backColor+';border-color: rgba(27, 31, 35, 0.1);font-size: 11px;color: '+fontColor+';'];
@@ -134,22 +134,6 @@
addRawDownLink_(); // 在浏览器返回/前进时重新添加 Raw 下载链接(☁)事件
})
- /*pushHistory();
- window.addEventListener('popstate', function(e) {
- addRawDownLink_(); // 在浏览器返回/前进时重新添加 Raw 下载链接(☁)事件
- }, false);
- function pushHistory() {
- let state = {title: 'title',url: '#'};
- window.history.pushState(state, '', '');
- }*/
-
- /*let oldUrl = location.href,
- timer = setInterval(function(){
- if (oldUrl != location.href) {
- oldUrl = location.href;
- addRawDownLink_(); // 在浏览器返回/前进时重新添加 Raw 下载链接(☁)事件
- }
- }, 1000);*/
// Release
function addRelease() {
@@ -229,7 +213,7 @@
}
for (let i=0;i${svg[0]}Download ZIP ${download_url[i][1]}`
+ _html += `${svg[0]}Download ZIP ${download_url[i][1]}`
}
html.insertAdjacentHTML('afterend', _html);
}
@@ -251,7 +235,7 @@
}
for (let i=0;i${svg[1]}
`
+ _html += ``
}
html.insertAdjacentHTML('afterend', _html);
}
@@ -271,7 +255,7 @@
}
for (let i=0;i${svg[1]}
`
+ _html += ``
}
html.insertAdjacentHTML('afterend', _html);
}