IntCyoaAutosaver

Autosaver for IntCyoaCreator

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

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