东农图书馆验证码计算

在登录预定网页后可自动计算验证表达式并填入

// ==UserScript==
// @name         东农图书馆验证码计算
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  在登录预定网页后可自动计算验证表达式并填入
// @author       Laurence_wang
// @match        http://yd.lib.neau.edu.cn/*
// @grant        none
// @include      http://yd.lib.neau.edu.cn/*
// ==/UserScript==

(function() {
    'use strict';

    var math_code;
    var res;
    math_code = document.getElementById('timutext').innerHTML;
    res = eval(math_code.slice(3, math_code.length - 2));
    document.getElementById('yz').value = res;
    //window.alert(res);
})();