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-21 提交的版本,查看 最新版本

  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.20200121105715
  12. // ==/UserScript==
  13. (function () {
  14. let FI = application.fileByPath("watch.json");
  15. if (FI === undefined) {
  16. FI = application.newFile("watch.json");
  17. }
  18. application.writeToFile(FI, `{
  19. "install": {
  20. "include": [
  21. "^.torc-update"
  22. ]
  23. },
  24. "throttle": 10
  25. }`)
  26. })