知网维普免费入口

打开知网或者维普官网会自动跳转到“上业易享”登陆窗口,借助神秘力量登陆后会自动跳转到一个新窗口,在新窗口左下角有[知网]和[维普]的免费入口,好好享受吧。如遇无法自动跳转将浏览器设置为“允许弹窗”

As of 2018-05-04. See the latest version.

// ==UserScript==

// @include      *www.cnki.net*
// @include      *www.cqvip.com*
// @include      *210.47.0.21/~root/search*

// @name         知网维普免费入口
// @namespace    http://tampermonkey.net/
// @version      1.01
// @description  打开知网或者维普官网会自动跳转到“上业易享”登陆窗口,借助神秘力量登陆后会自动跳转到一个新窗口,在新窗口左下角有[知网]和[维普]的免费入口,好好享受吧。如遇无法自动跳转将浏览器设置为“允许弹窗”
// @author       Ginn
// @grant        none
// @note         跳转地址:http://210.47.0.21
// @note         账号:cclglib
// @note         密码:cclglib
// @note         v1.01更新上部信息框,点击确定跳转,取消不跳转
// ==/UserScript==

(function() {
    'use strict';
    var username = "cclglib";
    var password = "cclglib";
    if (location.host.indexOf("www.cnki.net") > -1 || location.host.indexOf("www.cqvip.com") > -1) {
        var message = confirm("请并记住以下信息" + "\n" + "账号:" + username + "   密码:" + password);

        //点击确定跳转,取消不跳转
        if(message === true) {
            window.location.href = "http://210.47.0.21/~root/user";
        }
    }else if(location.host.indexOf("210.47.0.21") > -1) {
        var a = document.createElement('input');
        a.type="button";
        a.value="知网";
        a.style.position="fixed";
        a.style.left="10px";
        a.style.bottom="150px";
        a.style.fontSize="20px";
        a.style.textDecoration="none";
        a.style.zIndex=999;
        a.style.display="none";
        a.style.backgroundColor="red";
        a.style.color="white";
        document.querySelector("body").appendChild(a);
        a.style.display = "block";
        a.addEventListener("click", function(){
            window.open('http://210.47.0.21/http/cnki.net/www/80/');
        });

        var b = document.createElement('input');
        b.type="button";
        b.value="维普";
        b.style.position="fixed";
        b.style.left="10px";
        b.style.bottom="120px";
        b.style.fontSize="20px";
        b.style.textDecoration="none";
        b.style.zIndex=999;
        b.style.display="none";
        b.style.backgroundColor="red";
        b.style.color="white";
        document.querySelector("body").appendChild(b);
        b.style.display = "block";
        b.addEventListener("click", function(){
            window.open('http://210.47.0.21/http/cqvip.com/lib/80/');
        });
    }

    // Your code here...
})();