您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
This script prevents Notion from adding a strikethrough style to checked items in a todo list, while retaining any custom text colors.
// ==UserScript== // @name Notion.so Colored Checklist with No Strikethrough // @description This script prevents Notion from adding a strikethrough style to checked items in a todo list, while retaining any custom text colors. // @namespace Tampermonkey Scripts // @match https://www.notion.so/* // @grant none // @version 1.0.0 // @license MIT // ==/UserScript== // function restyleCheckedTodos(elements){ elements.forEach((e) => { if(e.style.textDecoration.includes('line-through')){ e.style.textDecoration = 'none'; } }); } 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);