您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Resizes the lessons and reviews buttons on the dashboard to scale with the number of lessons and reviews in the queues respectively.
当前为
// ==UserScript== // @name Wanikani Lesson and Review Button Scaler // @namespace http://tampermonkey.net/ // @version 0.13 // @description Resizes the lessons and reviews buttons on the dashboard to scale with the number of lessons and reviews in the queues respectively. // @author Wantitled // @include https://www.wanikani.com/dashboard // @include https://www.wanikani.com/ // @grant none // @license MIT // ==/UserScript== var buttonsContainer = document.getElementsByClassName("lessons-and-reviews")[0]; var boxes = jQuery(buttonsContainer).find("a"); boxes.each(function(index,elem){replaceStyle(elem)}); function replaceStyle(elem){ let span = elem.children[0] let lrCount = parseInt(span.innerHTML, 10); setGrid(); elem.style.backgroundPosition = "top"; if (lrCount <= 6){ elem.style.padding = "16px 16px 16px"; let imageSize = Math.round(50 * 1.25); elem.style.backgroundSize = `auto ${imageSize}px`; } else { let marginSize = Math.round(lrCount * 2.762); //3.571 let imageSize = Math.round(150*(lrCount/42)); elem.style.padding = `${marginSize}px 16px 16px`; elem.style.backgroundSize = `auto ${imageSize}px`; } } function setGrid(){ let gridContainer = document.querySelectorAll('.progress-and-forecast.progress-and-forecast--with-extra-study'); gridContainer.forEach(gridElem => { gridElem.style.gridTemplateRows = "auto auto"; }); };
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址