// ==UserScript== // @name EasyWJX // @namespace http://tampermonkey.net/ // @version 0.1 // @description 在问卷星的题目旁添加一个按钮以方便直接搜索内容 // @author MelonFish // @match https://ks.wjx.top/*/* // @icon https://www.google.com/s2/favicons?sz=64&domain=tampermonkey.net // @grant none // @require https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js // @require https://www.layuicdn.com/layer/layer.js // @license GNU GPLv3 // @downloadURL none // ==/UserScript== (function() { 'use strict'; // Your code here... console.log("EasyWJX is running. From xq.kzw.ink. Version 0.1") foreach(); deleteAllCookies(); if ($("#divTip").text().indexOf("最大填写次数")>=0) { alert('监测到您可能被问卷星限制,这种情况请清空浏览器Cookie并重新联网(开一下飞行模式)再试') } $('#spanPower').html('线圈脚本提供破解') // 判断是否直接修改成绩 if ($(".score-font-style").length>0) { var r=confirm("是否需要修改成绩?(可能出现问题,如修改效果不符合要求请刷新)") if (r==true) { var score=prompt("修改后的分数(注意不要大于总分)") if (score!=null && score!="") { $(".score-font-style").eq(0).text(score) } var correct_num=prompt("修改后的正确题数(注意不要大于总题数)") if (correct_num!=null && correct_num!="") { //$(".tbottom-title").eq(3).html(''+correct_num+'') //$("span[style$='font-size:20px;']").text(correct_num) $(".score-form__list.clearfix .tht-content span").text(correct_num) } } } // 使用搜索的方式 var div_list = $(".field-label"); var btn_list = []; // var btn = $('') for (var i=0; i -1 ? cookie.substr(0, eqPos) : cookie; document.cookie = name +"=;"; //document.cookie = null } var cookies2 = document.cookie.split(";"); console.log(cookies2) } function DelCookie(name) { var exp = new Date(); exp.setTime (exp.getTime() - 1); var cval = GetCookie (name); document.cookie = name + "=" + cval + "; expires="+ exp.toGMTString(); } function foreach() { var strCookie=document.cookie; var arrCookie=strCookie.split("; "); // 将多cookie切割为多个名/值对 for(var i=0;i 0) DelCookie(arr[0]); } } function GetCookie(name) { var arg = name + "="; var alen = arg.length; var clen = document.cookie.length; var i = 0; while (i < clen) { var j = i + alen; if (document.cookie.substring(i, j) == arg) return GetCooki (j); i = document.cookie.indexOf(" ", i) + 1; if (i == 0) break; } return null; } function GetCooki(offset) { var endstr = document.cookie.indexOf (";", offset); if (endstr == -1) endstr = document.cookie.length; return decodeURIComponent(document.cookie.substring(offset, endstr)); } })();