Webwork Keep Alive

NEVER GET LOCKED OUT OF WEBWORK AGAIN

  1. // ==UserScript==
  2. // @name Webwork Keep Alive
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1
  5. // @description NEVER GET LOCKED OUT OF WEBWORK AGAIN
  6. // @author You
  7. // @match https://webwork.elearning.ubc.ca/*
  8. // @icon https://webwork.elearning.ubc.ca/webwork2_files/images/favicon.ico
  9. // @grant none
  10. // @license MIT
  11. // ==/UserScript==
  12.  
  13. function sleep(ms) {
  14. return new Promise(resolve => setTimeout(resolve, ms));
  15. }
  16.  
  17. (function() {
  18. 'use strict';
  19. console.log("Webwork Keep Alive Successfully Injected");
  20. const refreshTime = 5 // minutes
  21. function makeRequest() {
  22. fetch(window.location.href, {
  23. "referrerPolicy": "strict-origin-when-cross-origin",
  24. "body": null,
  25. "method": "GET",
  26. "mode": "cors",
  27. "credentials": "include"
  28. });
  29. }
  30. setInterval(makeRequest, refreshTime * 60 * 1000);
  31. })();

QingJ © 2025

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