您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Adjust headline colors authors on washingtonpost.com
// ==UserScript== // @name De-emphasize Some Washington Post Bylines // @namespace http://tampermonkey.net/ // @version 2024-11-25 // @description Adjust headline colors authors on washingtonpost.com // @author Leon Barrett // @match https://www.washingtonpost.com/* // @grant none // @license MIT // ==/UserScript== const authorsToAdjust = ["george-f-will", "megan-mcardle", "marc-a-thiessen"]; function bylineAuthor(byline) { const link = byline.querySelector("a"); const match = new RegExp("https://www\.washingtonpost\.com/people/([^/]*)/").exec(link); if (!match) { return "unknown"; } return match[1]; } function getHeadline(byline) { return byline.parentElement.querySelector("div.headline"); } function adjustBylineColor(byline) { const headline = getHeadline(byline); const color = '#ddcccc' headline.style.color = color; byline.style.color = color; } (function() { 'use strict'; const bylines = document.querySelectorAll("div.byline"); bylines.values().filter(byline => authorsToAdjust.includes(bylineAuthor(byline))).forEach(byline => adjustBylineColor(byline)); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址