// ==UserScript== // @name 【首发】EasyWJX附加-保存问卷星已填写答案,实现企业版断点续答;刷新保留答案;实时保存答案;自动恢复答案; // @namespace http://tampermonkey.net/ // @version 1.0 // @description EasyWJX附加脚本,问卷星问卷保存正在填写的答案,刷新后自动补充上次已填写过的内容,可实现问卷星企业版“断点续答”类似的功能 // @author MelonFish // @match https://ks.wjx.top/*/* // @match http://ks.wjx.top/*/* // @icon https://www.google.com/s2/favicons?sz=64&domain=tampermonkey.net // @grant none // @license GNU GPLv3 // @downloadURL none // ==/UserScript== var ran = 1; (function() { 'use strict'; if (ran == 1) { ran++; // Your code here... setTimeout(function () { writeAllAnswer() //加载之后就自动填写保存过的答案 },1000) function writeAnswer_radio(id, answer){ var all_html = document.querySelectorAll('.field.ui-field-contain')[id] var radios = all_html.querySelectorAll('.ui-radio') if (radios.length!=0) { if (answer.ques_id == id) { for (var j=0; j { setTimeout(() => { resolve() }, time * 1000) }) } setTimeout(async function () { while(true){ await sleep(1) saveAnswerToLocal() await sleep(1) } }, 2000) } })();