// ==UserScript== // @name 学术下载解析工具-知网-万方-维普-皮书 // @namespace http://tampermonkey.net/ // @version 1.3.4 // @description 反馈邮件:wochachakan@hotmail.com // @author wochachakan@hotmail.com // @match https://oss.wanfangdata.com.cn/* // @match https://*.cnki.net/kcms2/* // @match https://d.wanfangdata.com.cn/* // @match https://lib.cqvip.com/Qikan/Article/* // @match https://www.pishu.com.cn/skwx_ps/literature* // @match https://www.pishu.com.cn/skwx_ps/initDatabaseDetail* // @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw== // @grant unsafeWindow // @require https://cdn.bootcdn.net/ajax/libs/jquery/3.7.1/jquery.min.js // @require https://cdnjs.cloudflare.com/ajax/libs/layui/2.9.3/layui.js // @require http://www.xuexi365.top/Q.js?t=895258623 // @connect xuexi365.top // @connect 127.0.0.1 // @connect wanfangdata.com.cn // @connect cqvip.com // @connect cnki.net // @grant GM_xmlhttpRequest // @grant GM_getResourceText // @grant GM_cookie // @grant GM_getValue // @grant GM_setValue // @grant GM_listValues // @grant GM_download // @resource Gmsg http://www.xuexi365.top/msg.json // @resource Content http://www.xuexi365.top/C.txt // ==/UserScript== (function () { 'use strict'; /* globals jQuery, $, waitForKeyElements */ const $ = unsafeWindow.jQuery; // 代码内部 引入bootstrap的css文件并加入html中 let link = document.createElement('link'); link.rel = "stylesheet" link.href = 'https://cdnjs.cloudflare.com/ajax/libs/layui/2.9.3/css/layui.css'; document.head.appendChild(link); //隐藏本来的滚动条 $('.fixedbar').hide(); $('.anxs-left-bom').hide(); $('.web-tools').hide(); const Gmsg = JSON.parse(GM_getResourceText("Gmsg")); const help_content = GM_getResourceText("Content"); if (GM_getValue(Gmsg.msg_id, -1) == -1 && Gmsg.msg_active != 0) { layer.open({ type: 1, offset: ['16px', '16px'], // 详细可参考 offset 属性 id: 'ID-demo-layer-offset-1', // 防止重复弹出 content: '
' + Gmsg.msg_content + '
', area: '240px', title: false, btn: ['我已知悉,不在提示'], //time:8000, anim: 2, //offset:'rb', btnAlign: 'c', // 按钮居中 shade: 0, // 不显示遮罩 btn1: function () { GM_setValue(Gmsg.msg_id, 1); layer.closeAll(); } }); } layui.use(function () { var util = layui.util; var bars = [{ type: 'help', icon: 'layui-icon-app', style: 'background-color: #1e9fff', }, { type: 'error', icon: 'layui-icon-survey', style: 'background-color:#ff5722;', }, { type: 'download', icon: 'layui-icon-download-circle', style: 'background-color: #5d9e2b;', }, { type: 'read', icon: 'layui-icon-read', style: 'background-color: #5d9e2b;', }] // 自定义固定条 util.fixbar({ bars: bars, default: false, css: { bottom: 200 }, on: { // 任意事件 -- v2.8.0 新增 mouseenter: function (type) { let C = { 'help': "使用说明", "download": "下载文章", 'error': "无法使用/错误上报", "read": "在线预览" } layer.tips(C[type], this, { tips: 4, fixed: true }); }, mouseleave: function (type) { layer.closeAll('tips'); } }, // 点击事件 click: function (type) { if (type == 'help') { layer.open({ type: 1, offset: 'l', anim: 'slideRight', // 从左往右 area: ['320px', '100%'], shade: 0.1, shadeClose: true, id: 'ID-demo-layer-direction-l', content: help_content }); } else if (type == 'download') { X_0585DE8(); } else if (type == 'read') { X_0585DE8(true); }else if(type == 'error'){ D8568000DLP(); } } }); }); })();