您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
10/02/2022, 13:08:42
当前为
// ==UserScript== // @name APA Label - derstandard.at // @namespace Violentmonkey Scripts // @match https://www.derstandard.at/story/* // @grant none // @version 1.0 // @author oodeagleoo // @license MIT // @description 10/02/2022, 13:08:42 // @require https://cdn.jsdelivr.net/npm/@ryanmorr/[email protected] // ==/UserScript== function isApaArticle(article) { const paragraphs = article.querySelectorAll('p'); for (const paragraph of paragraphs) { if (/APA,/.test(paragraph.innerText)) { return true; } } return false; } (async () => { waitFor = (selector) => new Promise((resolve) => ready(selector, resolve)); const article = await waitFor('div.story article'); if (isApaArticle(article)) { const h1 = await waitFor('h1.article-title'); h1.innerHTML = `<span style="color: #cb0000">APA: </span>${h1.innerText}`; } })();