// ==UserScript==
// @name Uer/U校园/UTALK/网课答案显示/自动填写/支持测试/时长挂机/备用版本
// @namespace http://og.ljtion.work
// @version 3.0.0
// @description [√自动填入答案][√窗口显答案][√作业与测试][√视听说单元测试][√时长挂机][√UTALK](支持班级测试、单元测试,自动翻页挂时长,积分用于统计使用频率)【禁止对源码进行修改,发布,禁止抄袭任意代码】
// @author Oranged
// @compatible Chrome
// @match *://ucontent.unipus.cn/_pc_default/pc.html?*
// @match *://ucontent.unipus.cn/_utalk_default/pc.html?*
// @match *://uexercise.unipus.cn/uexercise*
// @match *://u.unipus.cn/user/student/homework*
// @match *://sso.unipus.cn/sso/login*
// @match *://u.unipus.cn/*
// @match *://ucamapi.unipus.cn/*
// @connect ljtion.work
// @connect ucamapi.unipus.cn
// @grant GM_xmlhttpRequest
// @grant GM.deleteValue
// @grant GM_setValue
// @grant GM_getValue
// @grant GM_deleteValue
// @grant GM_info
// @grant unsafeWindow
// @run-at document-start
// @require https://unpkg.com/sweetalert/dist/sweetalert.min.js
// @supportURL https://greasyfork.org/zh-CN/scripts/397517/feedback
// ==/UserScript==
var url = window.location.href;
//自动登入
var auto_login = 0;
//if (url.indexOf("ucontent.unipus.cn") < 0) return;
var _self = unsafeWindow,
xtoken = localStorage.getItem("jwtToke"),
turl = "http://og.ljtion.work/api/",
pageFirst = _self.pageFirst,
page = _self.page,
open_id = '',
$ = null,
none = '测试key不能为空,请详细阅读
【脚本描述】!',
//如果需要关闭自动答题把isinput的0改成1
setting = {
'utoken': '',
'isinput': 1,
'istest': 1,
'isagree': 1,
'timeout': '2000',
'score': '',
'notice': '',
'show': '1',
'showb': '2',
'testurl': '',
'fromurl': '',
'testdata': '',
'url1' : 'https://ucontent.unipus.cn',
'is_time':0, // 默认0不开启刷时长,1开启刷时长
cache: {
count: 0,
type: 0,
mouse_x: -1,
mouse_y: -1
}
},
time_settings = {
// 每个页面持续时长为[0.5*jump_interval, jump_interval]之间随机分钟
jump_interval: 3, // 单位分钟默认3,切换一次页面的时长,可以是小数
jump_type: 3, // 跳转页面类型 1:按小章节(chapter)切换;2:按版块(section)切换;3:按练习(tab)切换,一般不用改
is_loop: 1, // 整本书到最后一单元是否回到开头持续循环,1开启循环,0关闭循环
is_range: 1, //is_range为1开启时,循环指定单元参数rangeS和rangeE才能生效;同时开启is_loop和is_range,可以循环刷指定单元
rangeS: 1, //rangeS起始单元,闭区间默认[1,8]一般整本书8个单元,例如[2,6]代表从第二单元的第一小节(2-1)刷至第六单元的最后一小节(6-7)
rangeE: 8, //rangeE是终止单元(unit,1-8),不能小于rangeS,如果等于,例如[2,2]代表只刷第二单元
},
view = {};
var time_index = {
startIndex : (time_settings.rangeS - 1) * 7,
endIndex : time_settings.rangeE * 7 - 1,
startUnit:-1
}
function initView() {
view.top = $(
'