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 = `
`; - - for (let i=0;i${download_url[i][1]}` - } - _html += `
` - _this.nextElementSibling.insertAdjacentHTML('afterend', _html); - }); - // 修改[文件大小]元素样式 - document.querySelectorAll('small.pl-2.color-text-secondary.flex-shrink-0').forEach(el=>{el.style.cssText='display: flex; justify-content: flex-end; flex-grow: 1; margin-right: 8px;'}); - - - // Source Code - current.querySelectorAll('.d-block.Box-body > a').forEach(function (_this) { - let href = _this.href.split(location.host), - url = [], - _html = `
`; + _html = `
`; for (let i=0;i{el.className='d-flex py-1 py-md-2 Box-body px-2'}); }