|
1 | 1 | // ==UserScript== |
2 | 2 | // @name Github 增强 - 高速下载 |
3 | | -// @version 1.6.7 |
| 3 | +// @version 1.6.8 |
4 | 4 | // @author X.I.U |
5 | 5 | // @description 高速下载 Git Clone/SSH、Release、Raw、Code(ZIP) 等文件、项目列表单文件快捷下载 (☁) |
6 | 6 | // @match *://github.com/* |
|
245 | 245 | var mouseOverHandler = function(evt) { |
246 | 246 | let elem = evt.currentTarget, |
247 | 247 | 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'); |
249 | 249 | aElm_new.forEach(el=>{el.style.cssText = 'display: inline'}); |
250 | 250 | aElm_now.forEach(el=>{el.style.cssText = 'display: none'}); |
251 | 251 | }; |
|
254 | 254 | var mouseOutHandler = function(evt) { |
255 | 255 | let elem = evt.currentTarget, |
256 | 256 | 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'); |
258 | 258 | aElm_new.forEach(el=>{el.style.cssText = 'display: none'}); |
259 | 259 | aElm_now.forEach(el=>{el.style.cssText = 'display: inline'}); |
260 | 260 | }; |
|
263 | 263 | files.forEach(function(fileElm, i) { |
264 | 264 | let trElm = fileElm.parentNode.parentNode, |
265 | 265 | 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'), |
267 | 267 | Name = cntElm_a.innerText, |
268 | 268 | href = cntElm_a.attributes.href.nodeValue.replace(`https://${location.host}`,''); |
269 | 269 | let href2 = href.replace('/blob/','/'), url, url_name, url_tip = ''; |
|
307 | 307 | var mouseOverHandler = function(evt) { |
308 | 308 | let elem = evt.currentTarget, |
309 | 309 | 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'); |
311 | 311 | aElm_new.forEach(el=>{el.style.cssText = 'display: inline'}); |
312 | 312 | aElm_now.forEach(el=>{el.style.cssText = 'display: none'}); |
313 | 313 | }; |
|
316 | 316 | var mouseOutHandler = function(evt) { |
317 | 317 | let elem = evt.currentTarget, |
318 | 318 | 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'); |
320 | 320 | aElm_new.forEach(el=>{el.style.cssText = 'display: none'}); |
321 | 321 | aElm_now.forEach(el=>{el.style.cssText = 'display: inline'}); |
322 | 322 | }; |
|
0 commit comments