您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
8/15/2023, 10:04:26 AM
// ==UserScript== // @name Darken Retweet // @namespace Violentmonkey Scripts // @match https://twitter.com/* // @grant none // @version 0.1.1 // @author CY Fung // @description 8/15/2023, 10:04:26 AM // @license MIT // ==/UserScript== (function () { function getBox(p, anchor) { let u = p.parentNode; let v = null; while (u instanceof HTMLElement) { if (u.querySelector('a[href]') === anchor) { v = u; } else { break; } u = u.parentNode; } v = v ? (v.closest('[data-testid]') || v) : null; return v; } let valid = false; function getHref(href) { let qhref = /https?\:\/\/[-_a-zA-Z0-9.]+\/[^\/]+/.exec(href) if (qhref) qhref = qhref[0] || ''; return qhref || ''; } function firstRun() { let authorPhotoAnchor = document.querySelector('main a[href*="/header_photo"]'); if (!authorPhotoAnchor) return; let apHref = getHref(authorPhotoAnchor.href); if ((location.href + '/').includes(apHref + '/')) { valid = true; } } let frt = true; setInterval(() => { for (const p of document.querySelectorAll('[data-testid="User-Name"]:not([ds37])')) { p.setAttribute('ds37', ''); if (frt) { frt = false; firstRun(); } if (!valid) return; const anchor = p.querySelector('a[href]') if (!anchor) continue; let href = anchor.href let qhref = getHref(href); let box = getBox(p, anchor); if (box && qhref) { if ((location.href + '/').includes(qhref + '/')) { box.setAttribute('twitter-poster', 'current-account') } else { box.setAttribute('twitter-poster', 'others') } } } }, 1); document.head.appendChild(document.createElement('style')).textContent = ` [twitter-poster="others"]:not(:hover){ background-color: #232323; opacity: 0.5; } [twitter-poster="others"]:hover{ transition: none !important; } ` })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址