您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Looks for specific key words and changes the background of the cell of a google task to a predefined color
- // ==UserScript==
- // @name Color Code Individual Google Tasks
- // @namespace Tevi
- // @description Looks for specific key words and changes the background of the cell of a google task to a predefined color
- // @include https://www.google.com/calendar/*
- // @include https://calendar.google.com/*
- // @version 1.1
- // @grant none
- // ==/UserScript==
- var keyWords = ["workout", "exam","research","homework"];
- var backgroundColors = ['#D6BD2D','#9E0000','#D67B5C','#1E8096'];
- document.addEventListener('DOMNodeInserted', function() {
- var checkBox = document.querySelectorAll('span.tc-icon');
- for (var J = checkBox.length-1; J >= 0; --J){
- var str = checkBox[J].parentNode.textContent.toString();
- for (var I = keyWords.length - 1; I>= 0; --I)
- if(str.toLowerCase().indexOf(keyWords[I].toLowerCase()) >= 0)
- checkBox[J].parentNode.parentNode.style.background = backgroundColors[I];
- }
- }, false);
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址