WaniKani Hide Button in Review

Hide overly clunky buttons in Review and account for the size

  1. // ==UserScript==
  2. // @name WaniKani Hide Button in Review
  3. // @version 0.1.4
  4. // @description Hide overly clunky buttons in Review and account for the size
  5. // @author polv
  6. // @match https://www.wanikani.com/review/session
  7. // @grant none
  8. // @run-at document-start
  9. // @namespace https://gf.qytechs.cn/users/160259
  10. // ==/UserScript==
  11.  
  12. (function() {
  13. 'use strict';
  14. // Hook into App Store
  15. try { $('.app-store-menu-item').remove(); $('<li class="app-store-menu-item"><a href="https://community.wanikani.com/t/there-are-so-many-user-scripts-now-that-discovering-them-is-hard/20709">App Store</a></li>').insertBefore($('.navbar .dropdown-menu .nav-header:contains("Account")')); window.appStoreRegistry = window.appStoreRegistry || {}; window.appStoreRegistry[GM_info.script.uuid] = GM_info; localStorage.appStoreRegistry = JSON.stringify(appStoreRegistry); } catch (e) {}
  16.  
  17. var button_to_hide = [1, 3];
  18. var button_name = [
  19. /*0*/ "option-wrap-up",
  20. /*1*/ "option-last-items",
  21. /*2*/ "option-item-info",
  22. /*3*/ "option-kana-chart",
  23. /*4*/ "option-audio",
  24. /*5*/ "option-double-check",
  25. /*6*/ "option-retype",
  26. /*7*/ //"option-mark0",
  27. /*8*/ //"option-mark1",
  28. /*9*/ //"option-mark2",
  29. /*10*/ //"option-mark3",
  30. /*11*/ //"option-mark4"
  31. ];
  32. for(var i=0; i<button_to_hide.length; i++) {
  33. document.getElementById(button_name[button_to_hide[i]]).style.display = "none";
  34. }
  35. for(i=0; i<button_name.length; i++) {
  36. document.getElementById(button_name[i]).style.width = 99/(button_name.length - button_to_hide.length) + "%";
  37. }
  38. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址