Greasy Fork 还支持 简体中文。

Wanikani Golden Burn

Turn burned items to gold.

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name        Wanikani Golden Burn
// @namespace   rfindley
// @description Turn burned items to gold.
// @version     1.2.2
// @match       https://community.wanikani.com/*
// @match       https://www.wanikani.com/
// @match       https://www.wanikani.com/dashboard
// @match       https://www.wanikani.com/level/*
// @match       https://www.wanikani.com/radicals*
// @match       https://www.wanikani.com/kanji*
// @match       https://www.wanikani.com/vocabulary*
// @match       https://preview.wanikani.com/
// @match       https://preview.wanikani.com/dashboard
// @match       https://preview.wanikani.com/level/*
// @match       https://preview.wanikani.com/radicals*
// @match       https://preview.wanikani.com/kanji*
// @match       https://preview.wanikani.com/vocabulary*
// @copyright   2022+, Robin Findley
// @license     MIT; http://opensource.org/licenses/MIT
// @run-at      document-end
// @grant       none
// ==/UserScript==

window.wkgoldburn = {};

(function(gobj) {

    // Function to add a style tag.
    function add_css(css) {
        let style = document.createElement('style');
        style.setAttribute('type', 'text/css');
        let text = document.createTextNode(css);
        style.appendChild(text);
        document.head.append(style);
    }

    if (window.location.hostname === 'community.wanikani.com') {
      add_css(`
        .avatar-flair[class*="level-60"] {
          color: rgb(223,170,11) !important;
          background: linear-gradient(45deg, rgba(242,215,12,1) 0%,rgba(255,255,255,1) 56%,rgba(252,235,0,1) 96%) !important;
          border: 1px solid rgba(242,215,12,.5);
          box-sizing: border-box;
        }
        .avatar-flair[class*="level-60"]:after {
          color: rgb(223,170,11) !important;
        }
      `);
      return;
    }

    if (location.pathname.match(/^\/level\//) ||
        location.pathname.match(/^\/(radicals|kanji|vocabulary)(\/.*)?$/)) {
        add_css(`
            :root {
                --color-burned:#fbc550 !important;
                --color-burned-dark:#faac05 !important;
            }
            body .subject-character--grid.subject-character--burned .subject-character__characters,
            body .subject-character--grid.subject-character--burned .subject-character__info {opacity:1;}
            body .subject-character--grid.subject-character--burned,
            body .subject-character--burned:not(.subject-character--grid) .subject-character__characters {
                border-top:1px solid var(--color-burned);
                border-left:1px solid var(--color-burned);
                color: #fff;
                text-shadow:1px 1px 3px #000;
                box-shadow:inset -2px -2px 2px #0005, inset 2px 2px 1px #fff7;
            }
            .character-grid__item .character-item--burned .radical-image {opacity:1;}
            .character-grid__item--vocabulary .character-item__info {font-size:14px;}
            .character-grid__item--vocabulary .character-item__info-meaning {padding-bottom:2px;}
        `);
        return;
    }

    if (location.pathname.match(/^\/(dashboard)?/)) {

        add_css(`
            body .dashboard section.srs-progress ul li:last-child,
            body ul.alt-character-list span.burned {
                background-color:#fbc042;
                background-image:linear-gradient(-45deg, #fbc550, #faac05);
            }
        `);

        // Ultimate Timeline
        add_css(`
            body #timeline svg .burn {fill:#fbc042;}
            body #timeline svg .markers .bur {fill:#fbc042;}
            body #timeline .review_info .summary .bur,
            body #timeline .review_info[data-mode="srs_stage"] .burn {background-color:#fbc042;background-image:linear-gradient(to bottom, #fccd69, #faac05);color:#333;}
            body #timeline .review_info[data-mode="srs_stage"] .burn svg.radical {stroke:#333;}
            body #timeline .review_info[data-mode="srs_stage"] li.burn {border:1px solid #fbc042;}
        `);
    }

})(window.wkgoldburn);