TorcAddons-watch-json-file

provides a watch.json button, to spawn a watch.json file, and set it's contents automatically to that to be compatible with torcAddons-ManualUpdate

当前为 2020-01-17 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name TorcAddons-watch-json-file
  3. // @namespace http://torcado.com
  4. // @description provides a watch.json button, to spawn a watch.json file, and set it's contents automatically to that to be compatible with torcAddons-ManualUpdate
  5. // @author torcado and J-Tech-Foundation
  6. // @license MIT
  7. // @icon http://torcado.com/torcAddons/icon.png
  8. // @run-at document-start
  9. // @grant none
  10. // @include http*://glitch.com/edit/*
  11. // @version 0.0.1.20200117001912
  12. // ==/UserScript==
  13. (function () {
  14. let t = torcAddons;
  15. t.addEventListener("load", () => {
  16. let f1 = $('<div class="torc-update">add-json</div>').insertAfter($('.show-app-wrapper'));
  17. console.log("1234")
  18. f1.on("click", function () {
  19. let FI = application.fileByPath("watch.json");
  20. if (!FI) {
  21. FI = application.newFile("watch.json");
  22. }
  23. application.writeToFile(FI, `{
  24. "install": {
  25. "include": [
  26. "^.torc-update"
  27. ]
  28. },
  29. "throttle": 10
  30. }`)
  31. })
  32. });
  33.  
  34. })

QingJ © 2025

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