您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
This script prevents notion from adding a strikethrough and fading checked off items in a todo list.
// ==UserScript== // @name Notion.so Clean Todo Lists - no strikethrough or fading // @description This script prevents notion from adding a strikethrough and fading checked off items in a todo list. // @namespace Violentmonkey Scripts // @match https://www.notion.so/* // @grant none // @version 1.1.0 // @license AGPLv3 // ==/UserScript== // function restyleCheckedTodos(elements){ elements.forEach((e) => { if( (e.style.textDecoration == 'line-through rgb(127, 127, 127)' && e.style.color == 'rgba(255, 255, 255, 0.46)') || (e.style.textDecoration == 'line-through rgba(55, 53, 47, 0.25)' && e.style.color == 'rgb(115, 114, 110)') ){ e.style.textDecoration = 'none'; e.style.color = ''; } }); } let config = { attributes: true, attributeFilter: ["style"], childList: true, subtree: true }; let observer = new MutationObserver((mutationsList, observer) => { // Any elements recently added or edited. restyleCheckedTodos(mutationsList.map((m) => m.target)); // Anything that was missed by the above. restyleCheckedTodos(document.querySelectorAll("[contenteditable]")); }); observer.observe(document, config);