IntCyoaAutosaver

Autosaver for IntCyoaCreator

当前为 2024-04-07 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name IntCyoaAutosaver
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.3
  5. // @description Autosaver for IntCyoaCreator
  6. // @author Name0930
  7. // @match https://cyoa.ltouroumov.ch/editor/
  8. // @match https://cyoa.ltouroumov.ch/editor/*
  9. // @match https://intcyoacreator.onrender.com/
  10. // @icon https://intcyoacreator.onrender.com/favicon.ico?
  11. // @grant none
  12. // @license MIT
  13. // ==/UserScript==
  14.  
  15. (function() {
  16. 'use strict';
  17.  
  18. const minutes = 10
  19.  
  20. window.setInterval(function() {
  21. var save = document.querySelector("#app > div > div > nav > div.v-navigation-drawer__content > div > div:nth-child(1) > div:nth-child(7)")
  22.  
  23. if (save) {
  24. save.click()
  25. setTimeout(function(){
  26. var button = document.querySelector("#app > div.v-dialog__content.v-dialog__content--active > div > div > div.v-card__text > div > div > div:nth-child(2) > button > span")
  27. var goback = document.querySelector("#app > div.v-dialog__content.v-dialog__content--active > div > div > div.v-card__actions > button > span")
  28.  
  29. if (button) {
  30. button.click()
  31. setTimeout(function(){goback.click()}, 5)
  32. }
  33. }, 5)
  34. }
  35. }, minutes*60000);
  36. })();