Skip to content

Commit 70b4091

Browse files
committed
修复 [Raw 快捷下载(☁)] 功能 (Github 更新了相关样式)
1 parent 30d2a31 commit 70b4091

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

GithubEnhanced-High-Speed-Download.user.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// ==UserScript==
22
// @name Github 增强 - 高速下载
3-
// @version 1.6.7
3+
// @version 1.6.8
44
// @author X.I.U
55
// @description 高速下载 Git Clone/SSH、Release、Raw、Code(ZIP) 等文件、项目列表单文件快捷下载 (☁)
66
// @match *://github.com/*
@@ -245,7 +245,7 @@
245245
var mouseOverHandler = function(evt) {
246246
let elem = evt.currentTarget,
247247
aElm_new = elem.querySelectorAll('.fileDownLink'),
248-
aElm_now = elem.querySelectorAll('svg.octicon.octicon-file.color-icon-tertiary');
248+
aElm_now = elem.querySelectorAll('svg.octicon.octicon-file');
249249
aElm_new.forEach(el=>{el.style.cssText = 'display: inline'});
250250
aElm_now.forEach(el=>{el.style.cssText = 'display: none'});
251251
};
@@ -254,7 +254,7 @@
254254
var mouseOutHandler = function(evt) {
255255
let elem = evt.currentTarget,
256256
aElm_new = elem.querySelectorAll('.fileDownLink'),
257-
aElm_now = elem.querySelectorAll('svg.octicon.octicon-file.color-icon-tertiary');
257+
aElm_now = elem.querySelectorAll('svg.octicon.octicon-file');
258258
aElm_new.forEach(el=>{el.style.cssText = 'display: none'});
259259
aElm_now.forEach(el=>{el.style.cssText = 'display: inline'});
260260
};
@@ -263,7 +263,7 @@
263263
files.forEach(function(fileElm, i) {
264264
let trElm = fileElm.parentNode.parentNode,
265265
cntElm_a = trElm.querySelector('.css-truncate.css-truncate-target.d-block.width-fit a'),
266-
cntElm_svg = trElm.querySelector('.mr-3.flex-shrink-0 svg.octicon.octicon-file.color-icon-tertiary'),
266+
cntElm_svg = trElm.querySelector('.mr-3.flex-shrink-0 svg.octicon.octicon-file'),
267267
Name = cntElm_a.innerText,
268268
href = cntElm_a.attributes.href.nodeValue.replace(`https://${location.host}`,'');
269269
let href2 = href.replace('/blob/','/'), url, url_name, url_tip = '';
@@ -307,7 +307,7 @@
307307
var mouseOverHandler = function(evt) {
308308
let elem = evt.currentTarget,
309309
aElm_new = elem.querySelectorAll('.fileDownLink'),
310-
aElm_now = elem.querySelectorAll('svg.octicon.octicon-file.color-icon-tertiary');
310+
aElm_now = elem.querySelectorAll('svg.octicon.octicon-file');
311311
aElm_new.forEach(el=>{el.style.cssText = 'display: inline'});
312312
aElm_now.forEach(el=>{el.style.cssText = 'display: none'});
313313
};
@@ -316,7 +316,7 @@
316316
var mouseOutHandler = function(evt) {
317317
let elem = evt.currentTarget,
318318
aElm_new = elem.querySelectorAll('.fileDownLink'),
319-
aElm_now = elem.querySelectorAll('svg.octicon.octicon-file.color-icon-tertiary');
319+
aElm_now = elem.querySelectorAll('svg.octicon.octicon-file');
320320
aElm_new.forEach(el=>{el.style.cssText = 'display: none'});
321321
aElm_now.forEach(el=>{el.style.cssText = 'display: inline'});
322322
};

0 commit comments

Comments
 (0)