WK Move a Lesson To Review

Selectively move a Lesson to Review

目前为 2023-11-02 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name WK Move a Lesson To Review
  3. // @namespace wanikani
  4. // @version 0.1
  5. // @description Selectively move a Lesson to Review
  6. // @author polv
  7. // @match *://www.wanikani.com/*
  8. // @match *://preview.wanikani.com/*
  9. // @license MIT
  10. // @require https://gf.qytechs.cn/scripts/430565-wanikani-item-info-injector/code/WaniKani%20Item%20Info%20Injector.user.js?version=1241826
  11. // @icon https://www.google.com/s2/favicons?sz=64&domain=wanikani.com
  12. // @grant none
  13. // ==/UserScript==
  14.  
  15. (function() {
  16. 'use strict';
  17.  
  18. wkof.include('ItemData');
  19.  
  20. let r = {};
  21. const injector = wkItemInfo.on('itemPage').appendAtTop('Move to Review', (o) => {
  22. if (o.id !== r.id) {
  23. r = o;
  24. wkof.ready('ItemData').then(() => {
  25. wkof.ItemData.get_items('assignments').then((rs) => {
  26. r = rs.find((r) => r.id === o.id) || r;
  27. injector.renew();
  28. });
  29. });
  30. }
  31.  
  32. console.log(r.assignments);
  33. if (!r.assignments) return;
  34. if (r.assignments.unlocked_at && !r.assignments.available_at) {
  35. const a = document.createElement('a');
  36. a.target = '_blank';
  37. a.href = `https://www.wanikani.com/subjects/lesson/quiz?queue=${o.id}`;
  38. a.innerText = 'Lesson Quiz'
  39. return a;
  40. }
  41. })
  42. })();

QingJ © 2025

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