Greasy Fork is available in English.
为了方便重复做题背题,添加了一个清楚答案的按钮。
// ==UserScript==
// @name 安徽省高等教育自考网络助学平台清楚答案
// @namespace http://tampermonkey.net/
// @version 0.3
// @description 为了方便重复做题背题,添加了一个清楚答案的按钮。
// @author lyl
// @match https://*.edu-edu.com.cn/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=edu-edu.com.cn
// @grant none
// @license MIT
// ==/UserScript==
(function() {
'use strict';
$(document).ready(function() {
$(".ui-logo").append("<button style='margin-top: 14px;' id='clearBtn'>清楚答案</button>");
$("#clearBtn").click(function(){
let r=confirm("确定清楚吗?");
if (r==true){
$(".ui-paper-iframe").contents().find("li").removeClass("ui-option-selected");
}
})
$(".ui-logo").append("<button style='margin-top: 14px;margin-left: 8px;' id='shuffleBtn'>乱序选项</button>");
$("#shuffleBtn").click(function(){
console.log( $(".ui-paper-iframe").contents().find("ul"))
let ulList = $(".ui-paper-iframe").contents().find("ul").each(function(u){
console.log($(this).children());
$(this).children().each(function(){
if(parseInt(Math.random()*2)==0){
$(this).prependTo($(this).parent());
}
})
});
})
});
})();