' +
'
' + a +
'
' +
'' +
'' +
'
' +
'
自动提交' +
'
' +
'
' +
'' +
'' +
'题号 | ' +
'题目(点击可复制,可滚动) | ' +
'答案(同👈) | ' +
'
' +
'' +
'' +
'' +
'答案提示框 已折叠 | ' +
'
' +
'' +
'' +
'' +
' | ' +
'
' +
'' +
'
' +
'
' +
'
'
).appendTo('body').on('click', 'button, td, input', function() {
var len = $(this).prevAll('button').length;
if (this.nodeName == 'TD') {
$(this).prev().length && GM_setClipboard($(this).text());
alert("复制成功")
} else if (!$(this).siblings().length) {
$(this).parent().text('正在搜索答案...');
setting.num++;
} else if (len == 0 && this.id != "autosubmit") {
if (setting.loop) {
clearInterval(setting.loop);
delete setting.loop;
len = ['已暂停搜索', '继续答题'];
} else {
setting.loop = setInterval(findAnswer, setting.time);
len = ['正在搜索答案...', '暂停答题'];
}
setting.div.children('div:eq(0)').html(function () {
return $(this).data('html') || len[0];
}).removeData('html');
$(this).html(len[1]);
} else if (len == 1) {
setting.auto = !setting.auto;
$(this).html(setting.auto ? '取消本次自动提交' : '开启本次自动提交');
} else if (len == 2) {
parent.location.reload();
} else if (len == 3) {
setting.div.find('tbody, tfoot').toggle();
} else if (this.id == "autosubmit") {
// 题目自动提交配置
console.log(this.checked);
GM_setValue("autosubmit", this.checked);
}
}).find('table, td, th').css('border', '1px solid').end();
setting.lose = setting.num = 0;
setting.data = parent._data = [];
setting.over = '