Github油猴脚本:新增鼠标移到release下载按钮上的样式

scripts
王良 2025-03-11 12:07:49 +08:00
parent 25cfc702fa
commit d45b793b18
1 changed files with 6 additions and 0 deletions

View File

@ -226,6 +226,12 @@ document.addEventListener("DOMContentLoaded", () => {
// Release // Release
function addRelease() { function addRelease() {
let html = document.querySelectorAll('.Box-footer'); if (html.length == 0 || location.pathname.indexOf('/releases') == -1) return let html = document.querySelectorAll('.Box-footer'); if (html.length == 0 || location.pathname.indexOf('/releases') == -1) return
// li:hover 鼠标悬停变色
let style = document.createElement('style');
style.innerHTML = '.Box-footer ul li.Box-row:hover { background-color: var(--bgColor-muted); }';
document.head.appendChild(style);
let divDisplay = 'margin-left: -90px;', new_download_url = get_New_download_url(); 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;';}; // 调整小屏幕时的样式 if (document.documentElement.clientWidth > 755) {divDisplay = 'margin-top: -3px;margin-left: 8px;display: inherit;';}; // 调整小屏幕时的样式
for (const current of html) { for (const current of html) {