From d6edd5e38c1db147a6481a30f87b39f1a0917297 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E8=89=AF?= <841369634@qq.com> Date: Tue, 11 Mar 2025 13:50:55 +0800 Subject: [PATCH] =?UTF-8?q?Github=E6=B2=B9=E7=8C=B4=E8=84=9A=E6=9C=AC?= =?UTF-8?q?=EF=BC=9A=E6=A0=B7=E5=BC=8F=E8=B0=83=E6=95=B4=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- GithubEnhanced-High-Speed-Download.user.js | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/GithubEnhanced-High-Speed-Download.user.js b/GithubEnhanced-High-Speed-Download.user.js index 38b7fd1..0d03084 100644 --- a/GithubEnhanced-High-Speed-Download.user.js +++ b/GithubEnhanced-High-Speed-Download.user.js @@ -4,8 +4,8 @@ * * @name Github 增强 - 高速下载(Github油猴脚本) * @name:en Github Enhancement - High Speed Download(Github Greasemonkey Script) - * @version 2.6.17_1 - * @since 2025-03-11 12:52 + * @version 2.6.17_2 + * @since 2025-03-11 13:50 * @author X.I.U * @description High-speed download of Git Clone/SSH, Release, Raw, Code(ZIP) and other files (Based on public welfare), project list file quick download (☁) * @description:zh-CN 高速下载 Git Clone/SSH、Release、Raw、Code(ZIP) 等文件 (公益加速)、项目列表单文件快捷下载 (☁) @@ -16,7 +16,7 @@ * @homepageURL https://github.com/XIU2/UserScript * @sourceURL https://github.com/XIU2/UserScript/blob/master/GithubEnhanced-High-Speed-Download.user.js */ -const ds_github_monkey_version = "2.6.17_1"; +const ds_github_monkey_version = "2.6.17_2"; document.addEventListener("DOMContentLoaded", () => { const DS_init = (window.__ds_global__ || {})['DS_init'] if (typeof DS_init === 'function') { @@ -241,9 +241,13 @@ document.addEventListener("DOMContentLoaded", () => { let html = document.querySelectorAll('.Box-footer'); if (html.length == 0 || location.pathname.indexOf('/releases') == -1) return // li:hover 鼠标悬停变色 - let styleHover = document.createElement('style'); - styleHover.innerHTML = '.Box-footer ul li.Box-row:hover { background-color: var(--bgColor-muted); }'; - document.head.appendChild(styleHover); + let styleHover = document.getElementById('XIU2-hover-style'); + if (!styleHover) { + styleHover = document.createElement('style'); + styleHover.id = 'XIU2-hover-style'; + styleHover.innerHTML = '.Box-footer ul { padding-top: 1px; } .Box-footer ul li.Box-row:hover { background-color: var(--bgColor-muted); }'; + document.head.appendChild(styleHover); + } let divDisplay = 'margin-left: -90px;', new_download_url = get_New_download_url(); if (document.documentElement.clientWidth > 755) {divDisplay = 'margin-top: -3px;margin-left: 8px;display: inherit;';}; // 调整小屏幕时的样式