您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Adds an "Unburn Item" button to burned item review sessions on Wanikani, allowing you to unburn the item if desired
// ==UserScript== // @name Wanikani ExtraStudy Unburn Script v2 // @namespace wanikani // @version 0.1 // @description Adds an "Unburn Item" button to burned item review sessions on Wanikani, allowing you to unburn the item if desired // @author ChatGPT / SoulLessPuppet // @match https://www.wanikani.com/* // @grant none // @license MIT // ==/UserScript== (function() { 'use strict'; // Define a function to create the "Unburn Item" button and attach it to the appropriate place in the DOM function addUnburnButton() { // Find the element that contains the item information and the "Item Info" button const itemInfoEl = document.querySelector('#item-info'); // Make sure the element exists before continuing if (!itemInfoEl) return; // Find the "Item Info" button const itemInfoButton = itemInfoEl.querySelector('button'); // Make sure the button exists before continuing if (!itemInfoButton) return; // Create the "Unburn Item" button and add it to the DOM const unburnButton = document.createElement('button'); unburnButton.classList.add('btn', 'btn-primary'); unburnButton.textContent = 'Unburn Item'; unburnButton.style.marginLeft = '10px'; unburnButton.addEventListener('click', handleUnburnButtonClick); itemInfoButton.parentElement.appendChild(unburnButton); } // Define a function to handle clicks on the "Unburn Item" button function handleUnburnButtonClick() { // Display a confirmation popup const confirmed = confirm('Do you want to unburn this item?'); // If the user confirmed, unburn the item if (confirmed) { // Find the "Burned" badge and remove it const burnedBadge = document.querySelector('.item-status-badge.burned'); if (burnedBadge) burnedBadge.remove(); // Find the "Apprentice" badge and add it const apprenticeBadge = document.querySelector('.item-status-badge.apprentice'); if (apprenticeBadge) apprenticeBadge.classList.remove('hidden'); // Find the "SRS Level" element and change it to "Apprentice I" const srsLevelEl = document.querySelector('.srs span'); if (srsLevelEl) srsLevelEl.textContent = 'Apprentice I'; // Find the "Add to Review" button and click it const addToReviewButton = document.querySelector('#option-item:not(.hidden) .label:contains("Add to Review")').parentElement; if (addToReviewButton) addToReviewButton.click(); } } // Wait for the page to load, then add the "Unburn Item" button window.addEventListener('load', addUnburnButton); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址