KameSame Open Framework - Jquery module

Progress module for KameSame Open Framework

目前为 2022-10-07 提交的版本。查看 最新版本

此脚本不应直接安装,它是一个供其他脚本使用的外部库。如果您需要使用该库,请在脚本元属性加入:// @require https://update.cn-greasyfork.org/scripts/451523/1101991/KameSame%20Open%20Framework%20-%20Jquery%20module.js

  1. "use strict";
  2. // ==UserScript==
  3. // @name KameSame Open Framework - Jquery module
  4. // @namespace timberpile
  5. // @description Progress module for KameSame Open Framework
  6. // @version 0.1
  7. // @copyright 2022+, Robin Findley, Timberpile
  8. // @license MIT; http://opensource.org/licenses/MIT
  9. // ==/UserScript==
  10. // These lines are necessary to make sure that TSC does not put any exports in the
  11. // compiled js, which causes the script to crash
  12. // eslint-disable-next-line no-var, @typescript-eslint/no-unused-vars
  13. // var module = {};
  14. (async (global) => {
  15. const ksof = global.ksof;
  16. await ksof.ready('document');
  17. try {
  18. $.fn.jquery;
  19. }
  20. catch (e) {
  21. await ksof.load_script(ksof.support_files['jquery.js'], true /* cache */);
  22. }
  23. ksof.Jquery = { version: $.fn.jquery };
  24. // Notify listeners that we are ready.
  25. // Delay guarantees include() callbacks are called before ready() callbacks.
  26. setTimeout(function () { ksof.set_state('ksof.Jquery', 'ready'); }, 0);
  27. })(window);
  28. // module.exports = null;