Greasy Fork is available in English.

Infinity新标签页图标名称/背景色适配DarkReader

让Infinity新标签页图标名称和背景色适配DarkReader

// ==UserScript==
// @name         Infinity新标签页图标名称/背景色适配DarkReader
// @namespace    https://github.com/iMortRex
// @version      0.0.8
// @description  让Infinity新标签页图标名称和背景色适配DarkReader
// @author       Mort Rex
// @run-at       document-start
// @match        https://inftab.com/
// @grant        GM.addStyle
// @license      MIT
// ==/UserScript==

(function () {
    'use strict';

    GM.addStyle('@media (prefers-color-scheme: dark) {* {--icon-font-color: var(--darkreader-neutral-text) !important;}}');
    GM.addStyle('@media (prefers-color-scheme: dark) {.wallpaper-mask {background-color: #242424 !important;}}');
    (function loop() {
        if (document.getElementsByClassName('wallpaper-mask')[0] && window.matchMedia('(prefers-color-scheme: dark)').matches) {
            document.getElementsByClassName('wallpaper-mask')[0].style.cssText += 'background-color: #242424 !important;';
        } else {
            setTimeout(loop, 20);
        }
    })();
})();