万能工具箱

这是一个万能工具箱,我们的目标是你能用到的,这里都有!欢迎提交问题!目前已支持网页图片一键打包下载,爱奇艺腾讯等视频网站的VIP视频解析,QQ音乐、网易音乐等音乐网站的音乐解析下载,屏蔽百度搜索广告,闲鱼搜索框,自动查找百度提取码,知乎视频下载,百度网盘下载,接触右键限制,百度文库解析下载,网页图片预览

// ==UserScript==
// @name         万能工具箱
// @namespace    http://www.ganfl.com/
// @connect api.ganfl.com
// @connect api.iquan.wang
// @connect tm.iquan.wang
// @version      3.8
// @description  这是一个万能工具箱,我们的目标是你能用到的,这里都有!欢迎提交问题!目前已支持网页图片一键打包下载,爱奇艺腾讯等视频网站的VIP视频解析,QQ音乐、网易音乐等音乐网站的音乐解析下载,屏蔽百度搜索广告,闲鱼搜索框,自动查找百度提取码,知乎视频下载,百度网盘下载,接触右键限制,百度文库解析下载,网页图片预览
// @author       xavier_dev
// @require      https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js
// @require      https://cdn.bootcss.com/layer/2.3/layer.js
// @require      https://cdn.bootcss.com/echarts/4.2.1/echarts.min.js
// @require     https://cdn.bootcss.com/jszip/3.1.5/jszip.min.js
// @grant  GM_xmlhttpRequest
// @grant       GM_info
// @grant       GM.getValue
// @grant    GM.setValue
// @grant    GM_getValue
// @grant    GM_setValue
// @grant    GM_notification
// @grant    GM.registerMenuCommand
// @grant    GM.openInTab
// @grant    GM_openInTab
// @grant    GM_registerMenuCommand
// @connect *

// @match        *://*/*
// ==/UserScript==

(function () {
    'use strict';
    var localHref = window.location.href, disable_contextmenu = false, mouse_right_panel = null, img_src = null,
        asyncGMAPI = false, getValue, last_update = 0;
    var default_setting = {
        "setting_funs": [
            {"id": "tmsetting_showLeftMenu", "mc": "显示左侧侧边栏功能菜单", "checked": "checked"},
            {"id": "tmsetting_bdlads", "mc": "屏蔽百度搜索收尾推广", "checked": "checked"},
            {"id": "tmsetting_bdrads", "mc": "屏蔽百度搜索右侧广告", "checked": "checked"},
            // {"id":"tmsetting_bdbjhads","mc":"屏蔽百度搜索百家号"},
            // {"id": "tmsetting_bdpan", "mc": "自动验证百度网盘链接有效性"},
            {"id": "tmsetting_bdpantqm", "mc": "自动查找百度网盘提取码", "checked": "checked"},
            {"id": "tmsetting_bdpantqmfx", "mc": "自动分享百度网盘提取码", "checked": "checked"},
            // {"id": "tmsetting_taobaoxianyu", "mc": "显示淘宝闲鱼搜索框", "checked": ""},
            {"id": "tmsetting_wangpandown", "mc": "显示百度网盘下载助手", "checked": "checked"},
            {"id": "tmsetting_imgziptitle", "mc": "图片打包下载以网页标题作为文件名", "checked": "checked"},
            {"id": "tmsetting_ads", "mc": "关闭脚本的广告推送", "checked": "checked"},
            {"id": "tmsetting_iframe", "mc": "否仅在顶层页面(框架)运行", "checked": "checked"},
            {"id": "tmsetting_mouse", "mc": "解除网页右键限制,开启后无法运行划词翻译", "checked": "checked"}
        ],
        "menuHot_key": "ctrlKey",
        "menuopacity": "1",
        "searchImageSite_list": {
            "Baidu": "https://image.baidu.com/n/pc_search?queryImageUrl={%s}&fm=result_camera&uptype=paste&drag=1",
            "360 ShiTu": "http://st.so.com/stu?imgurl={%s}",
            "TaoBao": "https://ascii2d.net/search/url/{%s}"
        },
        "menu_funs": [
            {"id": "tm_gjx_vipjx", "mc": "VIP视频免费播放"},
            {"id": "tm_gjx_musicjx", "mc": "音乐免费下载播放"},
            {"id": "tm_gjx_img_down", "mc": "下载本页所有图片"},
            {"id": "tm_gjx_showallimg", "mc": "查看本页图片"}
        ],
        "menu_funs_regex":[
            {"id": "tm_gjx_zhihu_video", "mc": "解析本页知乎视频","re":"zhihu.com"},
            {"id":"tm_gjx_wenkujx","mc":"文库解析","re":"wenku.baidu.com/view"}
            //  ,{"id":"tm_gjx_hsjx","mc":"视频解析","re":"(yaoshe)|(yuese)|(furryplace)"}
        ],
        "searchImageSite_option": ["Baidu", "360 ShiTu", "TaoBao"],
        "videoApiUrl": "http://jx.51yfx.com/?url=",
        "musicApiUrl": "http://music.51yfx.com/?type=yh&url=",
        "baseApiUrl": "https://tm.iquan.wang/api/v1/",
        "bangfuliUrl": "https://www.bangfuli.com/api.php",
        "baiduPanApiUrl": "http://api.iquan.wang/test/",
        "suffix": "jpg",
        "downPicMinWidth": 200,
        "last_version": 2.6
    }
    //将脚本排除代码单独定义, 避免恢复默认设置后 被清空
    var ruleSite=[];
    var setting = null;

    pageInit();
    onUpdateAfter();
    if (get_setting_funs_value('tmsetting_showLeftMenu') == "checked") {
        var isAddMenu=true;
        for(var i in ruleSite){
            var reg =new RegExp(ruleSite[i]);
            if(reg.test(localHref)){
                isAddMenu=false;
                break;
            }
        }
        if(isAddMenu){
            addMenu();
        }else{ throw SyntaxError();}
    }

    function pageInit() {
        setting = GM_getValue('tmgjx_setting') ? JSON.parse(GM_getValue('tmgjx_setting')) : default_setting;
        ruleSite = GM_getValue('tmgjx_ruleSite') ? GM_getValue('tmgjx_ruleSite') : ruleSite;
        if (setting.last_version != default_setting.last_version) {
            var user_setting_funs = setting.setting_funs;
            var def_settng_funs = default_setting.setting_funs;
            setting = default_setting;
            for (var i in def_settng_funs) {
                var defFunsId = def_settng_funs[i].id;
                var existsFuns = false;
                for (var j in user_setting_funs) {
                    var userFunsId = user_setting_funs[j].id;
                    if (defFunsId === userFunsId) {
                        existsFuns = true;
                        break;
                    }
                    //删除闲鱼搜索框功能
                    if(userFunsId=='tmsetting_taobaoxianyu'){
                        user_setting_funs.splice(j);
                    }
                }
                if(!existsFuns){
                    user_setting_funs.push(def_settng_funs[i]);
                }
            }
            setting.setting_funs=user_setting_funs;

            set_setting(setting);
        }

        if (typeof GM_getValue === 'undefined' && typeof GM !== 'undefined') {
            self.GM_getValue = GM.getValue;
            self.GM_setValue = GM.setValue;
            self.GM_openInTab = GM.openInTab;
            self.GM_registerMenuCommand = GM.registerMenuCommand;
            getValue = GM.getValue;
            asyncGMAPI = true;
        } else {
            getValue = function (key, init) {
                return new Promise(function (resolve, reject) {
                    try {
                        resolve(GM_getValue(key, init));
                    } catch (e) {
                        reject(e);
                    }
                });
            };
        }
        //先判断是否在iframe里面
        if (self != top&&get_setting_funs_value('tmsetting_iframe') == "checked") {
            throw SyntaxError();
        }
        $("body").append($('<link href="https://cdn.bootcss.com/layer/2.3/skin/layer.css" rel="stylesheet">'));
        addStyle(".tm_gjx_box{margin: 40px 0;position: fixed;top:200px;z-index:99999;} .tm_gjx_change-type { min-width: 40px; min-height: 160px; position: absolute; z-index: 99; left: 0; top: 0; display: flex; } .tm_gjx_change-type .tm_gjx_type-left { width: 0; background: #fff; height: 100%; box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.5); border-bottom-right-radius: 5px; overflow: hidden; transition: width 0.4s; -moz-transition: width 0.4s; -webkit-transition: width 0.4s; -o-transition: width 0.4s; } .tm_gjx_change-type .tm_gjx_showListType { width: 130px; transition: width 0.4s; -moz-transition: width 0.4s; -webkit-transition: width 0.4s; -o-transition: width 0.4s; } .tm_gjx_change-type .tm_gjx_type-left ul li { line-height: 40px; height: 40px; text-align: left; width: 100%; position: relative; cursor: pointer; } .tm_gjx_change-type .tm_gjx_type-left ul li a { display: block; height: 100%; position: absolute; left: 0; top: 0; z-index: 9; padding-left: 15px; overflow: hidden; width: calc(100% - 17px); color: #333; font-size: 14px; border-left: 2px solid #26778d; /*#26778d 00ba97 */ } .tm_gjx_change-type .tm_gjx_type-left ul li span { display: block; position: absolute; width: 0; height: 100%; left: 0; top: 0; z-index: 8; overflow: hidden; transition: width 0.5s; -moz-transition: width 0.5s; -webkit-transition: width 0.5s; -o-transition: width 0.5s; } .tm_gjx_change-type .tm_gjx_type-left ul li:hover span { transition: width 0.5s; -moz-transition: width 0.5s; -webkit-transition: width 0.5s; -o-transition: width 0.5s; } .tm_gjx_type-left ul li:nth-child(1):hover span, .tm_gjx_type-left ul li:nth-child(1).active span, .tm_gjx_type-left ul li:nth-child(8):hover span, .tm_gjx_type-left ul li:nth-child(8).active span { background: #ad1457; width: 100%; box-shadow: 0px 2px 5px 0 rgba(0, 0, 0, 0.5); } .tm_gjx_type-left ul li:nth-child(1):hover a, .tm_gjx_type-left ul li:nth-child(1).active a, .tm_gjx_type-left ul li:nth-child(8):hover a, .tm_gjx_type-left ul li:nth-child(8).active a { border-left: 2px solid #ad1457; color: #fff; } .tm_gjx_type-left ul li:nth-child(2):hover span, .tm_gjx_type-left ul li:nth-child(2).active span, .tm_gjx_type-left ul li:nth-child(9):hover span, .tm_gjx_type-left ul li:nth-child(9).active span { background: #1976d2; width: 100%; box-shadow: 0px 2px 5px 0 rgba(0, 0, 0, 0.5); } .tm_gjx_type-left ul li:nth-child(2):hover a, .tm_gjx_type-left ul li:nth-child(2).active a, .tm_gjx_type-left ul li:nth-child(9):hover a, .tm_gjx_type-left ul li:nth-child(9).active a { border-left: 2px solid #1976d2; color: #fff; } .tm_gjx_type-left ul li:nth-child(3):hover span, .tm_gjx_type-left ul li:nth-child(3).active span, .tm_gjx_type-left ul li:nth-child(10):hover span, .tm_gjx_type-left ul li:nth-child(10).active span { background: #ef5350; width: 100%; box-shadow: 0px 2px 5px 0 rgba(0, 0, 0, 0.5); } .tm_gjx_type-left ul li:nth-child(3):hover a, .tm_gjx_type-left ul li:nth-child(3).active a, .tm_gjx_type-left ul li:nth-child(10):hover a, .tm_gjx_type-left ul li:nth-child(10).active a { border-left: 2px solid #ef5350; color: #fff; } .tm_gjx_type-left ul li:nth-child(4):hover span, .tm_gjx_type-left ul li:nth-child(4).active span, .tm_gjx_type-left ul li:nth-child(11):hover span, .tm_gjx_type-left ul li:nth-child(11).active span { background: #e91e63; width: 100%; box-shadow: 0px 2px 5px 0 rgba(0, 0, 0, 0.5); } .tm_gjx_type-left ul li:nth-child(4):hover a, .tm_gjx_type-left ul li:nth-child(4).active a, .tm_gjx_type-left ul li:nth-child(11):hover a, .tm_gjx_type-left ul li:nth-child(11).active a { border-left: 2px solid #e91e63; color: #fff; } .tm_gjx_type-left ul li:nth-child(5):hover span, .tm_gjx_type-left ul li:nth-child(5).active span, .tm_gjx_type-left ul li:nth-child(12):hover span, .tm_gjx_type-left ul li:nth-child(12).active span { background: #8e24aa; width: 100%; box-shadow: 0px 2px 5px 0 rgba(0, 0, 0, 0.5); } .tm_gjx_type-left ul li:nth-child(5):hover a, .tm_gjx_type-left ul li:nth-child(5).active a, .tm_gjx_type-left ul li:nth-child(12):hover a, .tm_gjx_type-left ul li:nth-child(12).active a { border-left: 2px solid #8e24aa; color: #fff; } .tm_gjx_type-left ul li:nth-child(6):hover span, .tm_gjx_type-left ul li:nth-child(6).active span, .tm_gjx_type-left ul li:nth-child(13):hover span, .tm_gjx_type-left ul li:nth-child(13).active span { background: #64b5f6; width: 100%; box-shadow: 0px 2px 5px 0 rgba(0, 0, 0, 0.5); } .tm_gjx_type-left ul li:nth-child(6):hover a, .tm_gjx_type-left ul li:nth-child(6).active a, .tm_gjx_type-left ul li:nth-child(13):hover a, .tm_gjx_type-left ul li:nth-child(13).active a { border-left: 2px solid #64b5f6; color: #fff; } .tm_gjx_type-left ul li:nth-child(7):hover span, .tm_gjx_type-left ul li:nth-child(7).active span, .tm_gjx_type-left ul li:nth-child(14):hover span, .tm_gjx_type-left ul li:nth-child(14).active span { background: #388e3c; width: 100%; box-shadow: 0px 2px 5px 0 rgba(0, 0, 0, 0.5); } .tm_gjx_type-left ul li:nth-child(7):hover a, .tm_gjx_type-left ul li:nth-child(7).active a, .tm_gjx_type-left ul li:nth-child(14):hover a, .tm_gjx_type-left ul li:nth-child(14).active a { border-left: 2px solid #388e3c; color: #fff; } .tm_gjx_change-type .tm_gjx_type-right {opacity:" + setting.menuopacity + ";width: 25px; background: #62778d; height: 150px; overflow: hidden; box-shadow: 0px 2px 5px 0 rgba(0, 0, 0, 0.5); border-top-right-radius: 5px; border-bottom-right-radius: 5px; display: table; } .tm_gjx_change-type .tm_gjx_type-right p { text-align: center; padding: 0 5px; color: #fff; display: table-cell; vertical-align: middle; cursor: pointer; line-height: 20px; } .tm_gjx_type-left ul,tm_gjx_type-left li{margin:0;padding:0;list-style:none;}");
        addStyle('.mg15{margin: 15px;text-align:left;} .setting_lab{line-height: 30px;} .tpl-switch{float:right} .tpl-switch input[type="checkbox"] { position: absolute; opacity: 0; width:50px; height:25px; } .tpl-switch input[type="checkbox"].ios-switch+div { vertical-align: middle; width: 40px; height: 20px; border-radius: 999px; background-color: rgba(0, 0, 0, 0.1); -webkit-transition-duration: .4s; -webkit-transition-property: background-color, box-shadow; margin-top: 6px; } .tpl-switch input[type="checkbox"].ios-switch:checked+div { width: 40px; background-position: 0 0; background-color: #36c6d3; } .tpl-switch input[type="checkbox"].tinyswitch.ios-switch+div { width: 34px; height: 18px; } .tpl-switch input[type="checkbox"].bigswitch.ios-switch+div { width: 50px; height: 25px; } .tpl-switch input[type="checkbox"].green.ios-switch:checked+div { background-color: #00e359; border: 1px solid rgba(0, 162, 63, 1); box-shadow: inset 0 0 0 10px rgba(0, 227, 89, 1); } .tpl-switch input[type="checkbox"].ios-switch+div>div { float: left; width: 18px; height: 18px; border-radius: inherit; background: #ffffff; -webkit-transition-timing-function: cubic-bezier(.54, 1.85, .5, 1); -webkit-transition-duration: 0.4s; -webkit-transition-property: transform, background-color, box-shadow; -moz-transition-timing-function: cubic-bezier(.54, 1.85, .5, 1); -moz-transition-duration: 0.4s; -moz-transition-property: transform, background-color; pointer-events: none; margin-top: 1px; margin-left: 1px; } .tpl-switch input[type="checkbox"].ios-switch:checked+div>div { -webkit-transform: translate3d(20px, 0, 0); -moz-transform: translate3d(20px, 0, 0); background-color: #ffffff; } .tpl-switch input[type="checkbox"].tinyswitch.ios-switch+div>div { width: 16px; height: 16px; margin-top: 1px; } .tpl-switch input[type="checkbox"].tinyswitch.ios-switch:checked+div>div { -webkit-transform: translate3d(16px, 0, 0); -moz-transform: translate3d(16px, 0, 0); box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.3), 0px 0px 0 1px rgba(8, 80, 172, 1); } .tpl-switch input[type="checkbox"].bigswitch.ios-switch+div>div { width: 23px; height: 23px; margin-top: 1px; } .tpl-switch input[type="checkbox"].bigswitch.ios-switch:checked+div>div { -webkit-transform: translate3d(25px, 0, 0); -moz-transform: translate3d(16px, 0, 0); } .tpl-switch input[type="checkbox"].green.ios-switch:checked+div>div { box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(0, 162, 63, 1); }');
        addStyle('.layer_notice{float:left;color:white; width:330px;font-size:14px;  overflow:hidden;  background:#5FB878; padding:10px;};.layui-btn{margin:5px 1px;display: inline-block; height: 38px; line-height: 38px; padding: 0 18px; background-color: #009688; color: #fff; white-space: nowrap; text-align: center; font-size: 14px; border: none; border-radius: 30px; cursor: pointer}')
        if(get_setting_funs_value('tmsetting_ads') == "checked"){
            var checkTs = GM_getValue('setRightAdsTime');
            var now = $.now();
            if (checkTs > now) {
                //todo
            } else {
                GM_xmlhttpRequest({
                    method: "GET", url: "http://api.ganfl.com/test/yhhd",
                    onload: function (res) {
                        res = JSON.parse(res.responseText);
                        console.info(res)
                        if (res.status == 1&&res.data!=null) {
                            var ads = '<section class="ch1 doudong"> <a href="javascript:void(0)" data-cat="tmall1111" data-url="' + res.data.url + '" target="_blank" title="' + res.data.title + '"><img src="' + res.data.icon + '" ></a><a  data-cat="hidead" class="btn-close"></a></section>';
                            $("body").append(ads)
                        }
                    }
                });
                addStyle('/*双11*/ @-moz-keyframes tada{ /*0%{-moz-transform:scale(1);}*/ 10%,20%{-moz-transform: rotate(-3deg);} 30%,50%,70%,90%{-moz-transform: rotate(3deg);} 40%,60%,80%{-moz-transform: rotate(-3deg);} 100%{-moz-transform: rotate(0);} } @-webkit-keyframes tada{ /* 0%{-webkit-transform:scale(1);}*/ 10%,20%{-webkit-transform: rotate(-3deg);} 30%,50%,70%,90%{-webkit-transform: rotate(3deg);} 40%,60%,80%{-webkit-transform: rotate(-3deg);} 100%{-webkit-transform: rotate(0);}}.doudong{ -webkit-animation: tada 2.4s linear infinite; -moz-animation: tada 2.4s linear infinite; } .doudong:hover{ -webkit-animation: 2.4s linear infinite; -moz-animation: 2.4s linear infinite; } /*侧滑 1s .2s ease both*/ .ch1 { display: block; position: fixed; width: 50px; z-index: 999; right: 5%; bottom: 5%; } .ch1 img{ width: 90px; max-width:250px; } .ch1 a { display: inline-block; } .animate-bounce-up{ -webkit-animation: bounce-up 1s linear infinite;animation: bounce-up 1s linear infinite;} .btn-close{ position: absolute; right: -60px; bottom: 90px; width: 32px; height: 32px; z-index: 4; background: url(../images/btn-close.png) center center no-repeat; cursor: pointer; } .doudong{ -webkit-animation: tada 2.4s linear infinite; -moz-animation: tada 2.4s linear infinite; } .doudong:hover{ -webkit-animation: 2.4s linear infinite; -moz-animation: 2.4s linear infinite; } /*侧滑 1s .2s ease both*/ .ch1 { display: block; position: fixed; width: 50px; z-index: 999; right: 5%; bottom: 5%; } .ch1 img{ width: 90px; max-width:250px; } .ch1 a { display: inline-block; } .animate-bounce-up{ -webkit-animation: bounce-up 1s linear infinite;animation: bounce-up 1s linear infinite;} .btn-close{ position: absolute; right: -60px; bottom: 90px; width: 32px; height: 32px; z-index: 4; background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAA3lBMVEUAAAD////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////+/v7OzM+SjpVkXmhHQEw6Mj/9/f2yr7RSS1c1LTri4eJgWWRfWWPl5ObIxck/OERFPUnPzdDLycxGPkrg3+E4MD2xrrNSS1Y3LzyOiZGLh47Ny86MiI9lX2mNiJA7Mz/Jx8o/N0Ph4OKSjZRjXWcAAADn5S7+AAAAI3RSTlMADFeYyOn4JJv0CIj5iSPPMujqCdDR+pwNmuv1JYoK9liZyeT+oW0AAAABYktHRACIBR1IAAAACXBIWXMAAAsSAAALEgHS3X78AAABZklEQVQ4y4VT6XqCMBCMiAoWqmLBs/VYQIhu1dpT60UPff8nKiBCiHx2fiXMsJtsZgiJkRPyYqFYLIh5IUcuUZJkiCFLJY4u3yhgWvbIcV1nZFsmKGqZ5W8rQMcTjDEZU6gwRao1eJxiCrM51Kpxew2eFsjh+QW0qEb9DiwXL+C+gl4PBSrM3zADi3dQwwMadIqZmFEjaCLB+LT/SKhouYQGIU3ZXIW7T2t95jfWSbEy5SYRYBt93tFIsTkvcAsCaYGNaUXCow0tIsIeUwqGxz2IpA0OMgqP5dGBNlHgC1kFy6MLCifYUOpxAq7FescqghYXh2QVwSFT1wwpL1EE12QHFRGJIhgUM+r4Ry8edadJSAOWVx+LlK49d/cfw9yfLKdnW+4b9IfEtD88z5g2tP3vjOvP2t6voXPBWVLQU+krq4YfvcMxiN7x4EfPSEfPR1fqJOHtNboZ+c71B0PNMLThoM/E/w+OQImujfl/FgAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAxNS0xMS0yMFQxMToxOToxMSswODowMIUibOoAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMTUtMTEtMjBUMTE6MTk6MTErMDg6MDD0f9RWAAAAAElFTkSuQmCC) center center no-repeat; cursor: pointer; }');
            }
        }
    }
    function onUpdateAfter() {
        if(GM_info.script.version!=GM_getValue('tm_version')){
            $("body").after(" <ul class=\"layer_notice\" >\n" +
                "    <li>本次更新内容:</li>\n" +
                "    <li>1. 修改淘宝领券方式</li>\n" +
                "    <li>2. 修复手机领券bug</li>\n" +
                "    <li>3. 鉴于淘宝关闭了闲鱼的搜索地址,所以将闲鱼的搜索框显示功能下线,如果谁知道其他的闲鱼的搜索地址,请与我联系!</li>\n" +
                "  </ul>\n");
            layer.open({
                type: 1,
                shade: false,
                title: false,
                content: $('.layer_notice'),
                cancel: function(){
                    GM_setValue("tm_version",GM_info.script.version);
                }
            });
        }
    }
    //添加设置菜单
    function addMenu() {
        var menuSetting = "";
        for (var i = 0; i < default_setting.menu_funs.length; i++) {
            menuSetting += '<li><a data-cat=' + default_setting.menu_funs[i].id + '>' + default_setting.menu_funs[i].mc + '</a><span></span></li> ';
        }
        for (var i = 0; i < default_setting.menu_funs_regex.length; i++) {
            var reg =new RegExp(default_setting.menu_funs_regex[i].re);
            if(reg.test(localHref)){
                menuSetting += '<li><a data-cat=' + default_setting.menu_funs_regex[i].id + '>' + default_setting.menu_funs_regex[i].mc + '</a><span></span></li> ';
            }
        }

        var sidenav = '<div class="tm_gjx_box"> <div class="tm_gjx_change-type"> <div class="tm_gjx_type-left" class="tm_gjx_showListType"> <ul> ' +
            menuSetting +
            '<li><a data-cat=tm_gjx_setting>设置</a><span></span></li> ' +
            '<li><a data-cat=tm_gjx_help>帮助</a><span></span></li> ' +
            '</ul> </div> <div class="tm_gjx_type-right"> <p> <i class="tm_gjx_el-icon-menu"></i> 功能选择 </p> </div> </div> </div>';
        $("body").append(sidenav);

        $('.tm_gjx_type-right').click(function () {
            $(this).prev('.tm_gjx_type-left').toggleClass('tm_gjx_showListType')
        });
        $('.tm_gjx_type-left ul li').click(function () {
            $(this).addClass('tm_gjx_active').siblings('li').removeClass('tm_gjx_active')
        })
    }

    document.addEventListener('mousedown', function (event) {
        if (disable_contextmenu == true) {
            document.oncontextmenu = null;
            disable_contextmenu = false;
        }
        if (event[setting.menuHot_key] == true && event.button == 2) {
            if (mouse_right_panel == null) create_panel();
            // GM 4.x api is async, so we cannot update it in time
            else {
                if (!asyncGMAPI) {
                    if (last_update != GM_getValue('timestamp', 0)) {
                        last_update = GM_getValue('timestamp', 0);
                        mouse_right_panel.parentElement && mouse_right_panel.parentElement.removeChild(mouse_right_panel);
                        setting = GM_getValue('tmgjx_setting') ? JSON.parse(GM_getValue('tmgjx_setting')) : default_setting;
                        create_panel();
                    } else document.body.appendChild(mouse_right_panel);
                } else {
                    document.body.appendChild(mouse_right_panel);
                    mouse_right_panel.parentElement && mouse_right_panel.parentElement.removeChild(mouse_right_panel);
                    setting = GM_getValue('tmgjx_setting') ? JSON.parse(GM_getValue('tmgjx_setting')) : default_setting;
                }
            }
            mouse_right_panel.style.left = (document.documentElement.offsetWidth + (document.documentElement.scrollLeft || document.body.scrollLeft) - event.pageX >= 200 ? event.pageX : event.pageX >= 200 ? event.pageX - 200 : 0) + 'px';
            mouse_right_panel.style.top = (event.pageY + mouse_right_panel.offsetHeight < (document.documentElement.scrollTop || document.body.scrollTop) + document.documentElement.clientHeight ? event.pageY : event.pageY >= mouse_right_panel.scrollHeight ? event.pageY - mouse_right_panel.offsetHeight : 0) + 'px';
            disable_contextmenu = true;
            document.oncontextmenu = function () {
                return false;
            };
            if (event.target.tagName.toLowerCase() == 'img' && event.target.src != null) {
                mouse_right_panel.getElementsByClassName('search_top_url')[0].style.marginTop = '0px';
                mouse_right_panel.getElementsByClassName('search_top_url')[0].textContent = event.target.src;
                if (/^data:\s*.*?;\s*base64,\s*/.test(event.target.src)) upload_file(event.target.src);
                else if (/^(?:blob:|filesystem:)/.test(event.target.src)) upload_blob_url(event.target.src);
                else img_src = event.target.src;
            } else {
                mouse_right_panel.getElementsByClassName('search_top_url')[0].style.marginTop = '-24px';
                var firefoxPasteNode = document.getElementsByClassName('image-search-paste-node-firefox')[0];
                if (navigator.userAgent.indexOf('Firefox') >= 0 && firefoxPasteNode) {
                    firefoxPasteNode.innerHTML = '';
                    firefoxPasteNode.focus();
                } else document.addEventListener('paste', get_clipboard, false);
            }
        } else if (mouse_right_panel != null) {
            if (event.target.compareDocumentPosition(mouse_right_panel) == 10 || event.target.compareDocumentPosition(mouse_right_panel) == 0) {
                if (event.target.className == 'image-search-item' && event.button == 0) {
                    switch (event.target.getAttribute('search-option')) {
                        case 'all':
                            if (img_src != null) {
                                for (var i = setting.site_option.length - 1; i >= 0; i--) {
                                    var rsrc = img_src;
                                    var turl = setting.site_list[setting.site_option[i]];
                                    if (turl.substr(0, turl.indexOf('{%s}')).indexOf('?') >= 0) {
                                        rsrc = encodeURIComponent(img_src);
                                    }
                                    GM_openInTab(turl.replace(/\{%s\}/, rsrc), event[setting.hot_key]);
                                }
                                hide_panel();
                            }
                            break;
                        default:
                            if (img_src != null) {
                                var rsrc = img_src;
                                var turl = setting.site_list[event.target.getAttribute('search-option')];
                                if (turl.substr(0, turl.indexOf('{%s}')).indexOf('?') >= 0) {
                                    rsrc = encodeURIComponent(img_src);
                                }

                                GM_openInTab(turl.replace(/\{%s\}/, rsrc), event[setting.hot_key]);
                                hide_panel();
                            }
                    }
                } else if (event.button != 0) hide_panel();
            } else hide_panel();
        }
    }, true);

    function hide_panel() {
        if (!mouse_right_panel || !mouse_right_panel.parentElement) return;
        img_src = null;
        mouse_right_panel.parentElement && mouse_right_panel.parentElement.removeChild(mouse_right_panel);
        document.removeEventListener('paste', get_clipboard, false);
    }

    function get_clipboard(event) {
        var items = event.clipboardData.items;
        if (items[items.length - 1].type.indexOf('image') >= 0) reader.readAsDataURL(items[items.length - 1].getAsFile());
    }

    function create_panel() {
        mouse_right_panel = document.createElement('div');
        mouse_right_panel.style.cssText = 'width: 198px; font-size: 14px; text-align: center; position: absolute; color: #000; z-index: 9999999999; box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.5); border: 1px solid #CCC; background: rgba(255, 255, 255, 0.9); border-top-right-radius: 2px; border-bottom-left-radius: 2px; font-family: "Arial"; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none;';
        document.body.appendChild(mouse_right_panel);
        var search_top = document.createElement('div');
        search_top.style.cssText = 'height: 24px; line-height: 24px; font-size: 12px; overflow: hidden; margin: 0 auto; padding: 0 5px;';
        search_top.className = 'image-search-top';
        search_top.innerHTML = '<div class="search_top_url" style="overflow: hidden; white-space: nowrap; text-overflow: ellipsis; width: 100%; height: 24px;"></div><div class="search_top_file" style="width: 100%; height: 24px; line-height: 24px;" draggable="true"><label for="image-search-file">本菜单由万能工具箱提供</label></div><style>.image-search-item{color: #000000; transition: all 0.2s linear; -webkit-transition: all 0.1s linear;}.image-search-item:hover{background: #eeeeee;}</style>';
        mouse_right_panel.appendChild(search_top);
        var search_item = document.createElement('div');
        search_item.style.cssText = 'width: 100%; height: 24px; line-height: 24px; cursor: pointer;';
        search_item.className = 'image-search-item';
        for (var i in default_setting.menu_funs) {
            var search_item_child = search_item.cloneNode(true);
            search_item_child.textContent = default_setting.menu_funs[i].mc;
            search_item_child.setAttribute('data-cat', default_setting.menu_funs[i].id);
            mouse_right_panel.appendChild(search_item_child);
        }
        for (var i = 0; i < default_setting.menu_funs_regex.length; i++) {
            var reg =new RegExp(default_setting.menu_funs_regex[i].re);
            if(reg.test(localHref)){
                var search_item_child = search_item.cloneNode(true);
                search_item_child.textContent = default_setting.menu_funs_regex[i].mc;
                search_item_child.setAttribute('data-cat', default_setting.menu_funs_regex[i].id);
                mouse_right_panel.appendChild(search_item_child);
            }
        }
        search_item.textContent = '设置';
        search_item.setAttribute('data-cat', 'tm_gjx_setting');
        mouse_right_panel.appendChild(search_item);
        mouse_right_panel.ondrop = function (event) {
            event.stopPropagation();
            event.preventDefault();
            var files = event.target.files || event.dataTransfer.files;
            if (files[files.length - 1].type.indexOf('image') >= 0) reader.readAsDataURL(files[files.length - 1]);
        };
        if (navigator.userAgent.indexOf('Firefox') >= 0) {
            var paste_node_firefox = document.createElement('div');
            paste_node_firefox.setAttribute('contenteditable', 'true');
            paste_node_firefox.className = 'image-search-paste-node-firefox';
            paste_node_firefox.style.cssText = 'width: 0!important; height: 0!important; position: absolute; overflow: hidden;';
            paste_node_firefox.addEventListener('paste', get_clipboard, false);
            search_top.appendChild(paste_node_firefox);
        }
    }
    function checkTs() {

        var checkTs = GM_getValue('checkTsTime');
        var now = $.now();
        if (checkTs > now) {
            //todo
        } else {
            var lasttsid = GM_getValue('lasttsid');
            if (lasttsid == 'undefined' || lasttsid === undefined) {
                lasttsid = 0;
            }
            GM_xmlhttpRequest({
                method: "GET", url: "http://api.ganfl.com/test/checkTs?id=" + lasttsid,
                onload: function (res) {
                    console.info(res)
                    res = JSON.parse(res.responseText);
                    if (res.status == 1) {
                        GM_setValue('lasttsid', res.data.id);
                        notifiy(res.data.title, res.data.text, res.data.icon, res.data.click_url)
                    }
                }
            });
            GM_setValue('checkTsTime', $.now() + 60 * 60 * 1000);//记录超时时间
        }
    }
    checkTs();
    $('body').on('click', '[data-cat=hidead]', function () {
        $(".doudong").hide();
        GM_setValue('setRightAdsTime', $.now() + 30 * 60 * 1000);//记录超时时间
    });
    $('body').on('click', '[data-cat=tm_gjx_setting]', function () {
        openSettingPage();
    });
    $('body').on('click', '[data-cat=tmall1111]', function () {
        var url = $(this).attr("data-url");
        window.open(url);
        $(".doudong").hide();
        GM_setValue('setRightAdsTime', new Date().getTime()+((24*60*60)-(new Date().getHours()*60*60+new Date().getMinutes()*60+new Date().getSeconds()))*1000);//记录超时时间
    });
    $('body').on('click', '[data-cat=tmgjx_setting]', function () {
        var id = $(this).attr("id");
        if(id=="tmsetting_ads"){
            if($(this).prop("checked")){
                layer.msg('已开启❤️❤️❤️🌹🌹🌹', {icon: 6});
            }else{
                layer.confirm('亲❤️,一定要关闭本功能吗?我仅仅在618的时候在右下角显示一个领红包的图标哟,并且每天只显示一次。', {
                    btn: ['一定要关闭💔️','算了,饶了你吧🌹‍'] //按钮
                }, function(){
                    for (var i in setting.setting_funs) {
                        if (setting.setting_funs[i].id == id) {
                            if ($(this).prop("checked")) {
                                setting.setting_funs[i].checked = "checked";
                            } else {
                                setting.setting_funs[i].checked = "";
                            }
                        }
                    };
                    layer.msg('已关闭💔💔💔', {icon: 5});
                }, function(){
                    layer.msg('O(∩_∩)O谢谢💖💖', {icon: 6});
                });
            }
        }else{
            for (var i in setting.setting_funs) {
                if (setting.setting_funs[i].id == id) {
                    if ($(this).prop("checked")) {
                        setting.setting_funs[i].checked = "checked";
                    } else {
                        setting.setting_funs[i].checked = "";
                    }
                }
            }
        }
        set_setting(setting);


    });
    $('body').on('click', '[data-cat=tm_gjx_vipjx]', function () {
        window.open(setting.videoApiUrl + localHref);
        try{hide_panel();}catch(e){}
    });
    $('body').on('click', '[data-cat=tm_gjx_618]', function () {
        window.open("http://www.ganfl.com/618/");
        try{hide_panel();}catch(e){}
    });
    $('body').on('click', '[data-cat=tm_gjx_zhihu_video]', function () {
        downZhiHuVideo();
        try{hide_panel();}catch(e){}
    });
    $('body').on('click', '[data-cat=tm_gjx_musicjx]', function () {
        window.open(setting.musicApiUrl + encodeURIComponent(localHref));
        try{hide_panel();}catch(e){}
    });
    $('body').on('click', '[data-cat=tm_gjx_img_down]', function () {
        try{hide_panel();}catch(e){}
        batchDownloadImg();
    });

    $('body').on('click', '[data-cat=tm_gjx_showallimg]', function () {
        try{hide_panel();}catch(e){}
        // layer.load();
        var photos=preDownImgs();
        var photojson=[];
        for(var i in photos){
            var temp={};
            temp.alt="万能工具箱_图片预览";
            temp.pid="layer_photo_"+i;
            temp.src=photos[i].hdurl;
            temp.thumb=photos[i].hdurl;
            photojson.push(temp);
        }
        if(photojson.length==0){
            layer.msg("未找到符合规则的图片");
            return;
        }
        var json={
            "title": "万能工具箱_图片预览", //相册标题
            "id": 123, //相册id
            "start": 0, //初始显示的图片序号,默认0
            "data": photojson
        }
        layer.photos({
            photos: json
            ,anim: 3
            , area: '700px'
            ,maxHeight:500
            ,zIndex:2147483646
        });
    });

    $('body').on('click', '[data-cat=tm_gjx_help]', function () {
        try{hide_panel();}catch(e){}
        layer.open({
            type: 2,
            title: '万能工具箱使用教程',
            shadeClose: true,
            shade: false,
            maxmin: true, //开启最大化最小化按钮
            area: ['900px', '700px'],
            content: 'https://xalone.gitee.io/passages/%E5%85%B3%E4%BA%8E%E6%B2%B9%E7%8C%B4%E8%84%9A%E6%9C%AC-%E4%B8%87%E8%83%BD%E5%B7%A5%E5%85%B7%E7%AE%B1%E7%9A%84%E4%BD%BF%E7%94%A8%E6%95%99%E7%A8%8B/'
        });
    });
    $('body').on('change', '[id=tmgjx_menu_setting]', function () {
        var value = $(this).val();
        if (isNaN(value) || value <= 0 || value > 1) {
            layer.msg('请输入0到1区间的数字', {time: 5000, icon: 2});
        } else {
            layer.msg('设置成功', {time: 5000, icon: 1});
            setting = GM_getValue('tmgjx_setting') ? JSON.parse(GM_getValue('tmgjx_setting')) : default_setting;
            setting.menuopacity = value;
            set_setting(setting);
            addStyle(".tm_gjx_change-type .tm_gjx_type-right{opacity:" + value + "}");
        }
    });
    $('body').on('change', '[id=tmgjx_ruleSite]', function () {
        var value = $(this).val();
        var arrPara = value.split("|");
        var newRuleSite=[];
        for(var i in arrPara){
            if(arrPara[i]!=""){newRuleSite.push(arrPara[i])}
        }
        GM_setValue('tmgjx_ruleSite', newRuleSite);

    });
    $('body').on('change', '[id=tmgjx_downpic_minwidth]', function () {
        var value = $(this).val();
        if (isNaN(value) ) {
            layer.msg('请输入数字', {time: 5000, icon: 2});
        } else {
            layer.msg('设置成功', {time: 5000, icon: 1});
            setting = GM_getValue('tmgjx_setting') ? JSON.parse(GM_getValue('tmgjx_setting')) : default_setting;
            setting.downPicMinWidth = value;
            set_setting(setting);
        }
    });

    $('body').on('change', '[data-cat=tmgjx_setting_hotkey]', function () {
        var value = $(this).val();
        setting = GM_getValue('tmgjx_setting') ? JSON.parse(GM_getValue('tmgjx_setting')) : default_setting;
        setting.menuHot_key = value;
        set_setting(setting);
    });
    $('body').on('click', '[data-cat=tmgjx_setting_defsetting]', function () {
        setting =  default_setting;

        set_setting(setting);
        layer.msg('已恢复成默认设置,请刷新页面', {time: 5000, icon: 1});
    });
    $('body').on('click', '[data-cat=tm_gjx_wenkujx]', function () {
        try{hide_panel();}catch(e){}
        var settingStr = '<div class="mg15">';
        settingStr += '<button class="layui-btn layui-btn-fluid" type="button" onclick="window.open(\'https://tm.iquan.wang/public/wk?wkurl='+localHref+'\')">文库解析</button> ';
        settingStr += '</div><hr/>';
        settingStr += '<div class="mg15"><label for="" class="setting_lab" style="color: red;" title="加群">说明:</label>   </div>';
        settingStr += '<div class="mg15"><label for="" class="setting_lab" title="加群">万能工具箱作者自己开发的解析,目前还在测试阶段.</label>   </div>';

        //设置
        layer.open({
            type: 1,
            title: '万能工具箱-文库解析',
            shadeClose: true,
            area: ['400px', '550px'],
            content: settingStr
        });
    });

    //百度搜索广告
    if (get_setting_funs_value('tmsetting_bdlads') == "checked" && (/www.baidu.com\/s/i).test(localHref)) {
        setInterval(clearBaiduLAds, 2000);
    }
    if (get_setting_funs_value('tmsetting_bdrads') == "checked" && (/www.baidu.com\/s/i).test(localHref)) {
        setInterval(clearBaiduRAds, 2000);
    }
    if (get_setting_funs_value('tmsetting_bdpantqm') == "checked" && (/pan.baidu.com\/s/i).test(localHref)) {
        autoGetBaiduPanCode();
    }
    if (get_setting_funs_value('tmsetting_bdpantqmfx') == "checked" && (/pan.baidu.com\/s/i).test(localHref)) {
        checkAndSendCode();
    }
    if (get_setting_funs_value('tmsetting_taobaoxianyu') == "checked" && (/2.taobao.com/i).test(localHref)) {//s.2.taobao.com

        if ($(".bottom-wrap").length > 0) {
            $('div.bottom-wrap').remove();
        }
        if ((/2.taobao.com\/item.htm/i).test(localHref) || (/2.taobao.com\/list/i).test(localHref)) {
            timerDoOnce('#popUp-div', function () {
                $('#popUp-div').remove();
            }, 200);
        }
        if ($(".mau-guide").length > 0) {
            $('div.mau-guide').remove();
        }
        if ($('#J_IdleHeader').length > 0) {
            let form =
                '<div class="idle-search"><form method="get" action="//s.2.taobao.com/list" name="search" target="_top"><input class="input-search" id="J_HeaderSearchQuery" name="q" type="text" value="" placeholder="搜闲鱼" /><input type="hidden" name="search_type" value="item" autocomplete="off" /><input type="hidden" name="app" value="shopsearch" autocomplete="off" /><button class="btn-search" type="submit"><i class="iconfont">&#xe602;</i><span class="search-img"></span></button></form></div>';
            $('#J_IdleHeader').append(form);
        } else if ($('div.tab-wrap').length > 0) {
            let form =
                '<div class="tab" style="margin-left: 60px; position: relative;"><form method="get" action="//s.2.taobao.com/list" name="search" target="_top"><input name="q" type="text" value="" placeholder="搜闲鱼" style="width: 150px; padding: 5px 10px; border: solid 1px; border-radius: 5px;" /><input type="hidden" name="search_type" value="item" autocomplete="off" /><input type="hidden" name="app" value="shopsearch" autocomplete="off" /></form></div>';
            $('div.tab-wrap').append(form);
            $('div.navbar-wrap').css('justify-content', 'flex-start');
            // 调整首页
            $('div.banner-wrap').height('225px');
            $('div.usercard-wrap').css('bottom', 0);
            $('div.slodbar-wrap').remove();
            $('div.pop-wrap').remove();
        }
    }
    if ((/detail.tmall.com/i).test(localHref) || (/detail.taobao.com/i).test(localHref) || (/detail.tmall.hk/i).test(localHref) || (/item.taobao.com/i).test(localHref)) {
        queryAliBaBaQuan();
    }
    var intervalId;
    if ((/ai.taobao.com/i).test(localHref)) {
        //爱淘
        intervalId = setInterval(function () {
            aiTao();
        }, 1000);
    }
    if ((/s.taobao.com/i).test(localHref)) {
        addStyle(".boxbef { opacity:0.8;width:80px;position:absolute;left:0px;top:0px;float:left; line-height: 40px;font-size: 17px;color:black;text-align: center; height:40px; margin:0 auto; background:#56ff00; background-size:5px 7px; background-repeat:repeat-y; background-image:-webkit-radial-gradient(left, circle, #fff 45%, transparent 45%); background-image:-moz-radial-gradient(left, circle, #fff 45%, transparent 45%); } .boxaft { opacity:0.8;width:10px;position:absolute;left:80px;top:0px;float:left; height:40px; margin:0 auto; background:#56ff00; background-size:5px 8px; background-repeat:repeat-y; background-position:right; background-image:-webkit-radial-gradient(right, circle, #fff 45%, transparent 45%); background-image:-moz-radial-gradient(right, circle, #fff 45%, transparent 45%); }");
        intervalId = setInterval(function () {
            sTao();
        }, 1000);
        $('body').on('click','.J_Ajax',function(){
            intervalId = setInterval(function () {
                sTao();
            }, 1000);
        })
    }
    if ((/list.tmall.com/i).test(localHref)||(/list.tmall.hk/i).test(localHref)) {
        addStyle(".boxbef { opacity:0.8;width:80px;position:absolute;left:0px;top:0px;float:left; line-height: 40px;font-size: 17px;color:black;text-align: center; height:40px; margin:0 auto; background:#56ff00; background-size:5px 7px; background-repeat:repeat-y; background-image:-webkit-radial-gradient(left, circle, #fff 45%, transparent 45%); background-image:-moz-radial-gradient(left, circle, #fff 45%, transparent 45%); } .boxaft { opacity:0.8;width:10px;position:absolute;left:80px;top:0px;float:left; height:40px; margin:0 auto; background:#56ff00; background-size:5px 8px; background-repeat:repeat-y; background-position:right; background-image:-webkit-radial-gradient(right, circle, #fff 45%, transparent 45%); background-image:-moz-radial-gradient(right, circle, #fff 45%, transparent 45%); }");
        intervalId = setInterval(function () {
            sMao();
        }, 1000);
        $('body').on('click','.ui-page-num a',function(){
            intervalId = setInterval(function () {
                sMao();
            }, 1000);
        })
    }
    function sMao() {
        var ischeck=false;
        $(".product").each(function(){
            var goodsid=$(this).attr('data-id'),
                _img=$(this).find(".productImg-wrap").find("img");
            GM_xmlhttpRequest({
                method: "GET", url:  setting.baseApiUrl +"taobao/getQuanByGoodsId?goodsid="+goodsid,
                onload: function (res) {
                    res = JSON.parse(res.responseText);
                    if (res.code == 0 && res.data != null&&res.data>0) {
                        $(_img).after('<div class="boxbef">省'+res.data+'元</div><div class="boxaft"></div>');
                    }
                }
            });
            ischeck=true;
        });
        if(ischeck){clearInterval(intervalId)}
    }
    function sTao() {
        var ischeck=false;
        $(".J_MouserOnverReq").each(function(){
            var goodsid=$(this).find(".pic").find("a").attr('data-nid'),
                _img=$(this).find(".pic").find("img");
            GM_xmlhttpRequest({
                method: "GET", url:  setting.baseApiUrl +"taobao/getQuanByGoodsId?goodsid="+goodsid,
                onload: function (res) {
                    res = JSON.parse(res.responseText);
                    if (res.code == 0 && res.data != null&&res.data>0) {
                        $(_img).after('<div class="boxbef">省'+res.data+'元</div><div class="boxaft"></div>');
                    }
                }
            });
            ischeck=true;
        });
        if(ischeck){clearInterval(intervalId)}
    }
    if ((/item.jd.com/i).test(localHref) ) {
        showJdHis();
    }
    var d = {
        zero: ["0", "00", "000", "0000", "00000", "000000", "0000000", "00000000"],
        chars: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'],
        strReverse: function (a) {
            var b, c = [];
            for (b = 0, l = a.length; b < l; b++) c[c.length] = a.charAt(b);
            return c.reverse().join("")
        },
        encrypt: function (a, b, e) {
            var a1 = d.shuzi(a);
            var a2 = d.zimu(a);
            a = a2 + a1;
            var f, g = [];
            for (f = 0, l = a.length; f < l; f++) g[g.length] = d.to(a.charCodeAt(f), b);
            return d.rnd(e ? d.strReverse(g.join("")) : g.join(""), 4)
        },
        to: function (a, c) {
            var e = "" + d.round(a + 88, c).toString(16), f = c - e.length;
            return f > 0 ? d.zero[f - 1] + e : e
        },
        round: function (a, b) {
            var c = 1 << 4 * b;
            return 0 > a ? a % c + c : a % c
        },
        shuzi: function (a) {
            return a.replace(/[^0-9]+/ig, "")
        },
        zimu: function (a) {
            return a.toLowerCase().replace(/https/g, "http").replace(/[^a-zA-Z]+/ig, "")
        },
        rnd: function (a, b) {
            return d.rd(b) + hex_md5(a) + d.rd(Math.ceil(Math.random() * 10))
        },
        rd: function (a) {
            var res = "";
            for (var i = 0; i < a; i++) {
                res += d.chars[Math.ceil(Math.random() * 35)]
            }
            return res
        }
    }
    function showJdHis() {
        addStyle('* { margin: 0; padding: 0 } li, ol, ul { list-style: none } .fl { float: left } .fr { float: right } .triangle-b { width: 0; height: 0; border-style: solid; border-width: 5px 4px 0; border-color: #545454 transparent transparent; display: inline-block } .clearfix:after, .clearfix:before { content: ""; display: table } .clearfix:after { clear: both } .clearfix { zoom: 1 } .ell { text-overflow: ellipsis; white-space: nowrap; overflow: hidden } .ganfanli-clear { zoom: 1 } #ganfanliMid { position: relative; z-index: 23456789; margin: 10px 0 } .ganfanli-mid { display: none; position: relative; z-index: 9; font-family: "Microsoft Yahei", serif !important; background-color: #fff; font-size: 14px; color: #666; margin: -1px 0 0 } .ganfanli-mid i { display: inline-block } .ganfanli-mid-coupon { height: 50px; border: 1px solid #fd2550; border-radius: 5px; border-top-left-radius: 0; padding: 10px } .ganfanli-mid-coupon .coupon-left, .ganfanli-mid-coupon .couponinfo-right, .ganfanli-mid-coupon .tqcoupon-code { display: inline-block; float: left } .ganfanli-mid-coupon .coupon-left { width: 121px; padding-right: 60px; text-align: center; height: 50px; background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALUAAAAyCAMAAAAtOGr7AAABUFBMVEUAAADyLlf4TXP1L1j8aJn1L1j8Snr/bH78cZ78XJH7b530Llb8Y5X2L1j5UX3vJ1T8V476WI33P274RXX1MFr4Q3L5Snz////6ToL7Vov0LVf4R3j6UYX5TYD6VIj7bZv6a5j1Mlz4SHn3PWv5SXr2OWf6apb7cJ33PGr5S337WY7wJ1PzMV7zLVr/+vztIk75Z5L3PGn/9Pf2N2P+QWf/8PP6YI//4uf/3OPrHEj0NWL/5On7ZZT0N2T1NF/6YpL5Vof5W4r/9/n7aJjpFkL/7PD/6O3/w8/+UXT+OGD5X435WYj5U4T/X3//gZr+TG//3uX/2eH+1Nz9ztj+vMn/jqX/epT6ZZH/bIn+V3n+Mlr/rb3/m7D0gZn/aIb/tMP+Rmr+PmT3kaj+ytX5ssH3pLX6iJ//6u70cI3/o7bwPmbvN1//co7vXHzyR272nK5VFOdZAAAAEnRSTlMA+QrOaGgqAvfB0L1wcEIX89SIZzP7AAAJyElEQVRo3q2a53cSURDFE3vvuoJEYwNNCKzrFnCJQDCUIL2EXtLs+v9/c+bVZRfbWW8Q8Nvv3HPfzOw8VkBnLt4IbAQCgfQjUCDwkCmUXQ+Hw/uhUOg+11pZNdfW1l6C7nE9e/LsCegB6rbUXa5bLj198fQF6NWr5w69Bm2/fv3mDXy+ff32Lf57zHTn8R2uYHD19NkV1PWLG4CMygF0GKA5dzgM2NkQiEPfX9tXy4ANzJIaBMwoN/NyahBhdmAjM0CjkBuxH8NLiEPfCYIuXwdqhN4gXqPVaeF1KLW+vh7eY8yc+72q3n+JEsxgNopQu7mR+a6LGcxGOa2muPh6y4XMbwWzoKbYEI9Iinm9gdTwlWGnEdoEaAc22LynZteA+aXTa2B2Qd+9/Vur0WuJTZIRfRtFPX4chT90+q10WmJTt8+uXIpE0gHCneKxJtjmOkgNUeqQoEaz17jV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xPCbHNmBr01l7Ut1RmjXrg6YY+qjWVA71hpG3x+/ixGrvxowuQ+Rjo3PtHvbur8nW3ff+mpudPEbsHStGho8PCsqOWbHYDkIfv2P58HotlyGSma/d9737a2q17/01mo3Y8WPL3gXumGP+A2bN2LWt4yTJx8ISR57GCAuId1Q1PfM1u03yv7+mGdlMJsd1Ow/cCI5CZGDO2/UxOE2tXrK/JvmQFUROqoTaPV/Tm7s1//trssfBaL/71rKQ2wBylGEgs9X6xqDRam9Ccl6rZbn2bidNtYwPjr7312wTDOUP7G5atm1/+LAL+vABvlrNcVJAL99fy1Q752tzaeG7X1ZNBu1/f02jjXbHx+26ZSG6DR/19jj+LrkUmovc3OU23F4HSHv3LPogH+/pU7r//TUIseFIAve71Y8/jgrNZuHox8fVd5SZQoM8++tVvCXNUeasmK8zZhipTTc05CPLoH3vr9FsxKZ2JwFcSDJHPVfS7Jb0DECD2H0jmZ/4zJdxQ++pJoEG+Zmvidh1I2IjNxjOFSfMAM1vwDz767N4+8/y4Z6vs+79dRbqB6EGbn/7a3mPvr1NuQGca5MyU5/dCUFdZr+0IFfSqcX5Ou1eBJdVNQPM//v3IXgj/RjAg5tUACyQJbScr/GXFvxXLaC00+tU2b2/LofVDLH6P/8+BG//o4u3//RSd9nvQ9ivWn4CHhR7jKwBXgIAAAAASUVORK5CYII=) no-repeat; color: #fff; font-size: 14px; margin-right: 15px; cursor: pointer } .coupon-left .tqconpon { margin-top: -2px } .coupon-left .tqconpon span { font-size: 22px } .coupon-left .tqcp-info { font-size: 12px; margin-top: -4px } .ganfanli-mid-coupon .couponinfo-right { font-size: 12px; color: #666 } .couponinfo-right .dis-info { margin: 2px 0 6px } .couponinfo-right .dis-info span { font-size: 14px; color: #fd2550; font-weight: 700 } .ganfanli-timer { color: #999 } .ganfanli-mid-coupon .tqcoupon-code { width: 48px; margin-left: 10px; position: relative; top: 1px; cursor: pointer } .ganfanli-mid-coupon .tqcoupon-code i { width: 30px; height: 30px; background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAClUlEQVRIS81X3W3bQAwmT7Jf607QZILaE9Qb1JnACmAd/JhOUGeC5tE4Gog6gdUJ4k6QjuBskL5KsFlQuBPOqvUTw0hyT7J1vI88fvxIIbzRQh93NpuNEZGbfAmC4Gm5XG7dniiKBmEYflFKDevsmPkZAH4T0R+3pwAW416v94CItcaVQ6+MMalnd8nM5aFVBxBxAACfmfmaiBJ5XwDHcRwBwCLP82GSJOJd7dJaL5h5TETjE+y+EtGoBPYPa0u5pEMp9WCMwVPt3i+wRBeG4dYnU5eItdY3Sqm0zq4xYjEGgB8AsDXGXLoUtAF3sWsDngDAmpmlDMZdga1jKTMnRCTOF8t3+P3m+BjD2666rirOFXFqjBm8pJy01pK6ROx8ARki4ma/308RsVFARGgA4C8RTeI4FrtHET9mLmW0Juo7AHgSuxJYHsR7ABAyfGgSESFbEASRKxUbdYSIn1rsfuV5HjllPGgSbap1zvevCizaftAkvKueAsBFS2RplmXXfjPRWifMXF41M9+uVqtN9RytNYvGV8n1KG2rjSRKqTvZ40hinZYefivP0rmEqMYY4czB+g/4pWXBzPdE9NGd6h9oSQpnB64KgYvYXeFbAt8w85SZF74mIOKEma+IqOBQkehjV23nrzUA/GwS+2rE8juOYxGL6hglwrRwc1ctsGtvzCxqUzK97aq71notsPU8CoJg09TQj0XcBbwRuK07VVktU2e/37+X/12tz+fzi91ut7Yl9s3ZnBXYaxpSzyPJp+1KwhUpsVIpy/EWEb9nWTbqMt4CwMQYU5JHyOnq1o684KTRpkKaj4xQ6UHE9oo2VvZqB3MAGNihvxjou+Sybk8ZugWX2arpa+K5Oj2eCv6q3cl38h9t6W09IrqgQAAAAABJRU5ErkJggg==) no-repeat; display: block; margin: 0 auto 1px } .ganfanli-mid-coupon .tqcoupon-code p { font-size: 12px; color: #888 } .ganfanli-mid-coupon .tqcode-box { display: none; position: absolute; top: 50px; left: -48px; padding: 10px; border-radius: 5px; border: 1px solid #fd2550; background: #fff } .ganfanli-mid-coupon .tqcode-box img { width: 120px; height: 120px; display: block } .ganfanli-mid-coupon .tqcode-box p { font-size: 12px; color: #fd2550; text-align: center } .ganfanli-mid-coupon .tqcode-box .sj { position: absolute; top: -6px; left: 66px; width: 0; height: 0; border-style: solid; border-width: 0 5px 5px 5px; border-color: transparent transparent #fd2550 transparent } .ganfanli-top { position: relative; z-index: 10; height: 30px; background: #fff; width: 210px; border: 1px solid #fd2550 } .ganfanli-top .ganfanli-price, .ganfanli-top .ganfanli-quan { float: left; display: inline-block; height: 30px; line-height: 30px; font-size: 14px; width: 90px; text-align: center } .ganfanli-top .ganfanli-quan { color: #fff } .ganfanli-quan .shopc-txt { display: block; cursor: pointer; background: #ff0036 } .ganfanli-top .ganfanli-price { cursor: pointer } .price-hidebox, .shopc-hidebox { display: none; position: absolute; top: 30px; left: -1px; width: 420px; padding: 10px; border: 1px solid #fd2550; background: #fff; border-radius: 5px; border-top-left-radius: 0 } .ganfanli-top .ganfanli-price:hover .price-hidebox { display: block } .price-hidebox .price-chart { width: 400px; height: 190px } .price-hidebox .remind { font-size: 12px; color: #666; text-align: center } .price-hidebox .empty-box { display: none; font-size: 14px; color: #666; text-align: center; padding: 50px 0 } .ganfanli-quan:hover .shopc-hidebox { display: block } .shopc-hidebox { color: #333; text-align: left } .shopc-nologin { display: none; padding: 30px 0; text-align: center } .shopc-nocoupon { display: none; padding: 30px 0; color: #666; text-align: center } .shopc-hidebox ul { display: none; padding: 10px 0 0 } .shopc-hidebox li { position: relative; height: 41px; width: 200px; display: inline-block; float: left; margin: 0 10px 15px 0 } .ganfanli-quan2 { float: left; display: inline-block; height: 30px; line-height: 30px; font-size: 14px; width: 30px; text-align: center; } .shopc-hidebox li .shopc-btn { float: left; width: 100px; height: 41px; line-height: 41px; padding-right: 50px; text-align: center; background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAAApCAYAAADXndBCAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWF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3+HPfpzts2QZaJHezVzqoXjeQWxq2Fi2PlxRSH8/M1cP2PgdnMt7ny5nTXfao+8AFMkNxEtr59rIC0qUkoQsjzmUkoYMBtBvahm7epn9l12hDvyXZgjUTIcZDCuKBfkiaTZSUWzLlwKCeuIlvAwGscVy2chwVc1W5VhTZfK7i8dJCBSK/AXA+G4Fdd07u3G8M0znIl78641iLi9cvPvLoZ6ur1n5ER83MRUiCUyILUbvjPttgyhK9mJapkdUbNaTLuXBy1tZaRVHxoAXG60s3zAZtE8MmwiFxgbKDc5umEqRfymZUkC7pvhLauyXqIQ9g8Upor9ktdyW0J6u68xlMj8ojJu3cSzF/kr0ytBGHI+Zdiflb3CXU+kAPDdqNbQu62fInZQOoKEqX19m9TsvF366I5d23S6Lb+EfzECZXM8h8M6gg1U2G9U/A0MC96Pd5R4r87mdS9mJqmduQggqcBd9srm43oWja5Gn3UJ4ypBJ1fWKEEasKKJUQMwsmxZFP1vYmy89xErrrpiHPMPmcT4Ok23H7BbuY2yXPHisVBzq2K54MeNfsRIugwl2d5PbA9xkHWSpgq1aJUVq5jANCF0khbFvJ3g3+iETrSoSyzzt+gQ/9tmQg/XH/J8AAoPGZ2yu2qhQAAAAASUVORK5CYII=) no-repeat; color: #fff !important; font-size: 15px; display: inline-block; margin: 0 10px } .shopc-hidebox li .shopc-btn:hover { text-decoration: none } .shopc-hidebox li .telget { display: inline-block; height: 41px; line-height: 20px; cursor: pointer } .shopc-hidebox li .shopcode-box { display: none; position: absolute; z-index: 10; right: 40px; top: -15px; padding: 10px; border-radius: 3px; border: 1px solid #e6e6e6; background: #fff } .shopc-hidebox li .shopcode-box img { width: 120px; height: 120px; display: block } .shopc-hidebox li .shopcode-box p { text-align: center; font-size: 12px; color: #ff4066; padding-top: 3px; line-height: 20px } .shopc-hidebox li .icon-tip { position: absolute; top: 26px; right: -8px; width: 8px; height: 14px; background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAOCAYAAAASVl2WAAAAGXRF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2MDZjZDQyIiBzdFJlZjpkb2N1bWVudElEPSJhZG9iZTpkb2NpZDpwaG90b3Nob3A6ODdiODY2NWItZGJiYS0xMWU3LTgxMWQtOGY1NTBkODgxMzgwIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+7+Lw3gAAAF9JREFUeNp80VEKACEIBFDbw66dPOijG+jOViwLgY5g/TywRum9o7V2A5Coxcww0ZOhdYChDRj6QYYOEKGCzc5ydxljYN71El6FjVD2SGXfVBaUsqg1jPpbVs2W9QowAJNxVLG2z+QsAAAAAElFTkSuQmCC) no-repeat; display: inline-block } .tqcoupon-code:hover .tqcode-box { display: block }');
        var _ele = $("#choose-attrs");

        _ele.after($('<div id="ganfanliMid"> <div class="ganfanli-top"> <div class="ganfanli-quan2"><img style="height: 30px;" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmN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ghv9NTf/k5P/Dw/+np/9paf8oKP82Nv+MjP+Jif9UVP8fH//g4P94eP9HR/9WVv89Pf+/v/9ISP/Q0P/b2/8DA/9GRv+rq/9LS/+cnP9gYP98fP+Li//Gxv8yMv+qqv+8vP/n5//Bwf9ERP+UlP/t7f8HB/9FRf8iIv9QUP/4+P/09P9SUv/u7v9VVf/MzP/Ozv/Y2P85Of+trf/T0/8sLP8kJP9TU/8NDf9DQ/+Xl//Nzf8QEP8EBP/Fxf+Pj//i4v84OP+3t//d3f9zc/9lZf9+fv/j4//IyP/Pz/8uLv90dP9XV//z8/+4uP///3GQ2vEAAAC9dFJOU///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AJtEhCYAAALPSURBVHjanJb3W9pAGMcvIAjIEFCQokwRKSLWPeverVq17qrde++999577713/7jm3kvChdCn0e8PPO/6HHfv5S5Bf6YoRNkOwTJMei4N6H9pOHdGYqC4PYs3owjL6yHe4taJZVLAsQkh60bOmQVALRl5cgdCnWfigYy9uCQUJp4FgEdubGt3g3NtQAzkp0H4FZlVGJxRsAfBRiuYuCnNIYR1EXbWgL0Omy5S/10vWfTZFMhk21h7IZjHWauH1OfdS9AlSwubuVqIzY9Q9Zm1ivKwlfZV3CXza7VabSytQajXtc/Imo0A+FizsAn/cbCULVC/Z3hAm444zUUSUaEMAfAiObLOFIAFsoDLMaBXFhCbkvuKTknJ1AbpdKVYuoAt7mkVtByA7f99vHnpyZKK/wloNNcZSv1VUB9y9jMSaTCguW16rKBFnpHQkEKioYMAKJBsjQEwWz6QPz2gQj5wAAPm8rFwEmh8aSeXaLgIgRpwCpqqST7p+Q3xPrwdOUTq0zdwO1IJbmB+wo1jhp9y46dYhINLHvyUbXYpMC+Hn2ibMzbK72wS22IRA4as+7GVjbiSBa1U8tH6Or0AaOtMclqUuyrCAGBLld3WagDcJXLr++xkSvbNMoFMftFOuHz2qFR+0qrGEhWvILSp5TT+VRqELk2gih87sdEBW3uO2s12WC8TqUcoEmvrraovZDPgD55R9WUFOKLD74C1WskRLSP9WkKFXkDkcOIznaGDrIJ+RRkh5E8IjPeRXhyjB2mGULMUYI50cL3r1lL151/y/RQBjlO7Kvlep7IX4voLq3/6uk6cTH5iJcFvNKC5+yYntje1UTxArnjDTFoaMH+iUt0fIOwXAw/EB8jewCdahw0knCmqH4y/KqPcQfOV8+E7VHneVsndar6JF9tFnVz90XcB9kbX6UaDPbYEl/FD7/4iz5Q+TgzT+pqRpb8CDACEDh9Ot9eSYwAAAABJRU5ErkJggg=="> </div> <div class="ganfanli-price"><span class="price-txt">历史价格</span> <div class="price-hidebox"> <div class="price-chart" id="price-chart" style="display: block; width: 400px;height: 190px;"></div> <p class="remind" style="display: block;">*注:价格趋势数据仅作参考</p> </div> </div> </div>  </div>'));
        var myChart = echarts.init(document.getElementById('price-chart'));
        var option = {
            title: {subtext: "历史价格数据由敢返利(ganfl.com)提供"},
            tooltip: {trigger: "axis"},
            calculable: true,
            xAxis: [{type: "category", boundaryGap: false, data: []}],
            yAxis: [{type: "value", axisLabel: {formatter: "{value} 元"}}],
            series: [{
                name: "价格",
                type: "line",
                data: [],
                markPoint: {data: [{type: "max", name: "最大值"}, {type: "min", name: "最小值"}]}
            }]
        };
        myChart.setOption(option);
        myChart.showLoading();
        var names = [];
        var nums = [];
        GM_xmlhttpRequest({
            method: "get", url: setting.baseApiUrl + "/bijia/index?url=" + clearUrl("id"),
            onload: function (res) {
                console.info(res);
                res = JSON.parse(res.responseText);
                if (res.code == 0) {
                    res = res.data;
                    var currentPrice = res.currentPrice;
                    var changPriceRemark = res.changPriceRemark;
                    var data = res.datePrice;
                    data = eval("([" + data + "])");
                    for (var i = 0; i < data.length; i++) {
                        names.push(timestampToTime(data[i][0]))
                    }
                    for (var i = 0; i < data.length; i++) {
                        nums.push(data[i][1])
                    }
                    var title = "当前数据由敢返利(ganfl.com)提供    ";
                    var maxP = Math.max.apply(Math, nums);
                    var minP = Math.min.apply(Math, nums);
                    title += "最高价:" + maxP + "元    最低价:" + minP + "元";
                    myChart.hideLoading();
                    myChart.setOption({
                        title: {subtext: title},
                        xAxis: {data: names},
                        series: [{
                            name: "当日价格",
                            type: "line",
                            data: nums,
                            markPoint: {data: [{type: "max", name: "最大值"}, {type: "min", name: "最小值"}]}
                        }]
                    })
                } else {
                    console.info("获取价格信息失败;" + res);
                    myChart.hideLoading()
                }
            }
        });

    }
    function queryAliBaBaQuan() {
        addStyle('* { margin: 0; padding: 0 } li, ol, ul { list-style: none } .fl { float: left } .fr { float: right } .triangle-b { width: 0; height: 0; border-style: solid; border-width: 5px 4px 0; border-color: #545454 transparent transparent; display: inline-block } .clearfix:after, .clearfix:before { content: ""; display: table } .clearfix:after { clear: both } .clearfix { zoom: 1 } .ell { text-overflow: ellipsis; white-space: nowrap; overflow: hidden } .ganfanli-clear { zoom: 1 } #ganfanliMid { position: relative; z-index: 23456789; margin: 10px 0 } .ganfanli-mid { display: none; position: relative; z-index: 9; font-family: "Microsoft Yahei", serif !important; background-color: #fff; font-size: 14px; color: #666; margin: -1px 0 0 } .ganfanli-mid i { display: inline-block } .ganfanli-mid-coupon { height: 50px; border: 1px solid #fd2550; border-radius: 5px; border-top-left-radius: 0; padding: 10px } .ganfanli-mid-coupon .coupon-left, .ganfanli-mid-coupon .couponinfo-right, .ganfanli-mid-coupon .tqcoupon-code { display: inline-block; float: left } .ganfanli-mid-coupon .coupon-left { width: 121px; padding-right: 60px; text-align: center; height: 50px; background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALUAAAAyCAMAAAAtOGr7AAABUFBMVEUAAADyLlf4TXP1L1j8aJn1L1j8Snr/bH78cZ78XJH7b530Llb8Y5X2L1j5UX3vJ1T8V476WI33P274RXX1MFr4Q3L5Snz////6ToL7Vov0LVf4R3j6UYX5TYD6VIj7bZv6a5j1Mlz4SHn3PWv5SXr2OWf6apb7cJ33PGr5S337WY7wJ1PzMV7zLVr/+vztIk75Z5L3PGn/9Pf2N2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NcVJAL99fy1Q752tzaeG7X1ZNBu1/f02jjXbHx+26ZSG6DR/19jj+LrkUmovc3OU23F4HSHv3LPogH+/pU7r//TUIseFIAve71Y8/jgrNZuHox8fVd5SZQoM8++tVvCXNUeasmK8zZhipTTc05CPLoH3vr9FsxKZ2JwFcSDJHPVfS7Jb0DECD2H0jmZ/4zJdxQ++pJoEG+Zmvidh1I2IjNxjOFSfMAM1vwDz767N4+8/y4Z6vs+79dRbqB6EGbn/7a3mPvr1NuQGca5MyU5/dCUFdZr+0IFfSqcX5Ou1eBJdVNQPM//v3IXgj/RjAg5tUACyQJbScr/GXFvxXLaC00+tU2b2/LofVDLH6P/8+BG//o4u3//RSd9nvQ9ivWn4CHhR7jKwBXgIAAAAASUVORK5CYII=) no-repeat; color: #fff; font-size: 14px; margin-right: 15px; cursor: pointer } .coupon-left .tqconpon { margin-top: -2px } .coupon-left .tqconpon span { font-size: 22px } .coupon-left .tqcp-info { font-size: 12px; margin-top: -4px } .ganfanli-mid-coupon .couponinfo-right { font-size: 12px; color: #666 } .couponinfo-right .dis-info { margin: 2px 0 6px } .couponinfo-right .dis-info span { font-size: 14px; color: #fd2550; font-weight: 700 } .ganfanli-timer { color: #999 } .ganfanli-mid-coupon .tqcoupon-code { width: 48px; margin-left: 10px; position: relative; top: 1px; cursor: pointer } .ganfanli-mid-coupon .tqcoupon-code i { width: 30px; height: 30px; background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAClUlEQVRIS81X3W3bQAwmT7Jf607QZILaE9Qb1JnACmAd/JhOUGeC5tE4Gog6gdUJ4k6QjuBskL5KsFlQuBPOqvUTw0hyT7J1vI88fvxIIbzRQh93NpuNEZGbfAmC4Gm5XG7dniiKBmEYflFKDevsmPkZAH4T0R+3pwAW416v94CItcaVQ6+MMalnd8nM5aFVBxBxAACfmfmaiBJ5XwDHcRwBwCLP82GSJOJd7dJaL5h5TETjE+y+EtGoBPYPa0u5pEMp9WCMwVPt3i+wRBeG4dYnU5eItdY3Sqm0zq4xYjEGgB8AsDXGXLoUtAF3sWsDngDAmpmlDMZdga1jKTMnRCTOF8t3+P3m+BjD2666rirOFXFqjBm8pJy01pK6ROx8ARki4ma/308RsVFARGgA4C8RTeI4FrtHET9mLmW0Juo7AHgSuxJYHsR7ABAyfGgSESFbEASRKxUbdYSIn1rsfuV5HjllPGgSbap1zvevCizaftAkvKueAsBFS2RplmXXfjPRWifMXF41M9+uVqtN9RytNYvGV8n1KG2rjSRKqTvZ40hinZYefivP0rmEqMYY4czB+g/4pWXBzPdE9NGd6h9oSQpnB64KgYvYXeFbAt8w85SZF74mIOKEma+IqOBQkehjV23nrzUA/GwS+2rE8juOYxGL6hglwrRwc1ctsGtvzCxqUzK97aq71notsPU8CoJg09TQj0XcBbwRuK07VVktU2e/37+X/12tz+fzi91ut7Yl9s3ZnBXYaxpSzyPJp+1KwhUpsVIpy/EWEb9nWTbqMt4CwMQYU5JHyOnq1o684KTRpkKaj4xQ6UHE9oo2VvZqB3MAGNihvxjou+Sybk8ZugWX2arpa+K5Oj2eCv6q3cl38h9t6W09IrqgQAAAAABJRU5ErkJggg==) no-repeat; display: block; margin: 0 auto 1px } .ganfanli-mid-coupon .tqcoupon-code p { font-size: 12px; color: #888 } .ganfanli-mid-coupon .tqcode-box { display: none; position: absolute; top: 50px; left: -48px; padding: 10px; border-radius: 5px; border: 1px solid #fd2550; background: #fff } .ganfanli-mid-coupon .tqcode-box img { width: 120px; height: 120px; display: block } .ganfanli-mid-coupon .tqcode-box p { font-size: 12px; color: #fd2550; text-align: center } .ganfanli-mid-coupon .tqcode-box .sj { position: absolute; top: -6px; left: 66px; width: 0; height: 0; border-style: solid; border-width: 0 5px 5px 5px; border-color: transparent transparent #fd2550 transparent } .ganfanli-top { position: relative; z-index: 10; height: 30px; background: #fff; width: 210px; border: 1px solid #fd2550 } .ganfanli-top .ganfanli-price, .ganfanli-top .ganfanli-quan { float: left; display: inline-block; height: 30px; line-height: 30px; font-size: 14px; width: 90px; text-align: center } .ganfanli-top .ganfanli-quan { color: #fff } .ganfanli-quan .shopc-txt { display: block; cursor: pointer; background: #ff0036 } .ganfanli-top .ganfanli-price { cursor: pointer } .price-hidebox, .shopc-hidebox { display: none; position: absolute; top: 30px; left: -1px; width: 420px; padding: 10px; border: 1px solid #fd2550; background: #fff; border-radius: 5px; border-top-left-radius: 0 } .ganfanli-top .ganfanli-price:hover .price-hidebox { display: block } .price-hidebox .price-chart { width: 400px; height: 190px } .price-hidebox .remind { font-size: 12px; color: #666; text-align: center } .price-hidebox .empty-box { display: none; font-size: 14px; color: #666; text-align: center; padding: 50px 0 } .ganfanli-quan:hover .shopc-hidebox { display: block } .shopc-hidebox { color: #333; text-align: left } .shopc-nologin { display: none; padding: 30px 0; text-align: center } .shopc-nocoupon { display: none; padding: 30px 0; color: #666; text-align: center } .shopc-hidebox ul { display: none; padding: 10px 0 0 } .shopc-hidebox li { position: relative; height: 41px; width: 200px; display: inline-block; float: left; margin: 0 10px 15px 0 } .ganfanli-quan2 { float: left; display: inline-block; height: 30px; line-height: 30px; font-size: 14px; width: 30px; text-align: center; } .shopc-hidebox li .shopc-btn { float: left; width: 100px; height: 41px; line-height: 41px; padding-right: 50px; text-align: center; background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAAApCAYAAADXndBCAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTM4IDc5LjE1OTgyNCwgMjAxNi8wOS8xNC0wMTowOTowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8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yXqIQ9g8Upor9ktdyW0J6u68xlMj8ojJu3cSzF/kr0ytBGHI+Zdiflb3CXU+kAPDdqNbQu62fInZQOoKEqX19m9TsvF366I5d23S6Lb+EfzECZXM8h8M6gg1U2G9U/A0MC96Pd5R4r87mdS9mJqmduQggqcBd9srm43oWja5Gn3UJ4ypBJ1fWKEEasKKJUQMwsmxZFP1vYmy89xErrrpiHPMPmcT4Ok23H7BbuY2yXPHisVBzq2K54MeNfsRIugwl2d5PbA9xkHWSpgq1aJUVq5jANCF0khbFvJ3g3+iETrSoSyzzt+gQ/9tmQg/XH/J8AAoPGZ2yu2qhQAAAAASUVORK5CYII=) no-repeat; color: #fff !important; font-size: 15px; display: inline-block; margin: 0 10px } .shopc-hidebox li .shopc-btn:hover { text-decoration: none } .shopc-hidebox li .telget { display: inline-block; height: 41px; line-height: 20px; cursor: pointer } .shopc-hidebox li .shopcode-box { display: none; position: absolute; z-index: 10; right: 40px; top: -15px; padding: 10px; border-radius: 3px; border: 1px solid #e6e6e6; background: #fff } .shopc-hidebox li .shopcode-box img { width: 120px; height: 120px; display: block } .shopc-hidebox li .shopcode-box p { text-align: center; font-size: 12px; color: #ff4066; padding-top: 3px; line-height: 20px } .shopc-hidebox li .icon-tip { position: absolute; top: 26px; right: -8px; width: 8px; height: 14px; background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAOCAYAAAASVl2WAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA4RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTM4IDc5LjE1OTgyNCwgMjAxNi8wOS8xNC0wMTowOTowMSAgICAgICAgIj4gPHJkZ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GXfVBaUsqg1jPpbVs2W9QowAJNxVLG2z+QsAAAAAElFTkSuQmCC) no-repeat; display: inline-block } .tqcoupon-code:hover .tqcode-box { display: block }');
        var _ele = null;
        if ((/detail.taobao.com/i).test(localHref) || (/item.taobao.com/i).test(localHref)) {
            _ele = $("#J_StepPrice");
        } else if ((/detail.tmall.com/i).test(localHref) || (/detail.tmall.hk/i).test(localHref)) {
            _ele = $(".tm-fcs-panel");
        }
        _ele.after($('<div id="ganfanliMid"> <div class="ganfanli-top"> <div class="ganfanli-quan2"><img style="height: 30px;" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3R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Uv/u7v9VVf/MzP/Ozv/Y2P85Of+trf/T0/8sLP8kJP9TU/8NDf9DQ/+Xl//Nzf8QEP8EBP/Fxf+Pj//i4v84OP+3t//d3f9zc/9lZf9+fv/j4//IyP/Pz/8uLv90dP9XV//z8/+4uP///3GQ2vEAAAC9dFJOU///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AJtEhCYAAALPSURBVHjanJb3W9pAGMcvIAjIEFCQokwRKSLWPeverVq17qrde++999577713/7jm3kvChdCn0e8PPO/6HHfv5S5Bf6YoRNkOwTJMei4N6H9pOHdGYqC4PYs3owjL6yHe4taJZVLAsQkh60bOmQVALRl5cgdCnWfigYy9uCQUJp4FgEdubGt3g3NtQAzkp0H4FZlVGJxRsAfBRiuYuCnNIYR1EXbWgL0Omy5S/10vWfTZFMhk21h7IZjHWauH1OfdS9AlSwubuVqIzY9Q9Zm1ivKwlfZV3CXza7VabSytQajXtc/Imo0A+FizsAn/cbCULVC/Z3hAm444zUUSUaEMAfAiObLOFIAFsoDLMaBXFhCbkvuKTknJ1AbpdKVYuoAt7mkVtByA7f99vHnpyZKK/wloNNcZSv1VUB9y9jMSaTCguW16rKBFnpHQkEKioYMAKJBsjQEwWz6QPz2gQj5wAAPm8rFwEmh8aSeXaLgIgRpwCpqqST7p+Q3xPrwdOUTq0zdwO1IJbmB+wo1jhp9y46dYhINLHvyUbXYpMC+Hn2ibMzbK72wS22IRA4as+7GVjbiSBa1U8tH6Or0AaOtMclqUuyrCAGBLld3WagDcJXLr++xkSvbNMoFMftFOuHz2qFR+0qrGEhWvILSp5TT+VRqELk2gih87sdEBW3uO2s12WC8TqUcoEmvrraovZDPgD55R9WUFOKLD74C1WskRLSP9WkKFXkDkcOIznaGDrIJ+RRkh5E8IjPeRXhyjB2mGULMUYI50cL3r1lL151/y/RQBjlO7Kvlep7IX4voLq3/6uk6cTH5iJcFvNKC5+yYntje1UTxArnjDTFoaMH+iUt0fIOwXAw/EB8jewCdahw0knCmqH4y/KqPcQfOV8+E7VHneVsndar6JF9tFnVz90XcB9kbX6UaDPbYEl/FD7/4iz5Q+TgzT+pqRpb8CDACEDh9Ot9eSYwAAAABJRU5ErkJggg=="> </div> <div class="ganfanli-price"><span class="price-txt">历史价格</span> <div class="price-hidebox"> <div class="price-chart" id="price-chart" style="display: block; width: 400px;height: 190px;"></div> <p class="remind" style="display: block;">*注:价格趋势数据仅作参考</p> </div> </div> </div> <ul class="ganfanli-mid" style="display: inline-block;"> <li class="ganfanli-mid-coupon"> <a id="ganfanli_href" href="" target="_blank"><div class="coupon-left" ><p class="tqconpon">¥<span id="ganfanli_quan"></span>元优惠券</p> <p class="tqcp-info" id="ganfanli_info"></p></div> </a><div class="couponinfo-right"><p class="dis-info">券后价: <span id="ganfanli_price"></span>元</p> <p class="tqtimer-info">剩 余:<span class="ganfanli-timer"></span></p></div> <div class="tqcoupon-code"> <div class="tqcode-tb"><i ></i> <p>手淘领券</p></div> <div class="tqcode-box"><i class="sj"></i><img src="" id="ganfanli_sturl"> <p>手机淘宝扫码领券</p></div> </div> </li> </ul> </div>'));
        var myChart = echarts.init(document.getElementById('price-chart'));
        var option = {
            title: {subtext: "历史价格数据由敢返利(ganfl.com)提供"},
            tooltip: {trigger: "axis"},
            calculable: true,
            xAxis: [{type: "category", boundaryGap: false, data: []}],
            yAxis: [{type: "value", axisLabel: {formatter: "{value} 元"}}],
            series: [{
                name: "价格",
                type: "line",
                data: [],
                markPoint: {data: [{type: "max", name: "最大值"}, {type: "min", name: "最小值"}]}
            }]
        };
        myChart.setOption(option);
        myChart.showLoading();
        var names = [];
        var nums = [];
        GM_xmlhttpRequest({
            method: "get", url: setting.baseApiUrl + "/bijia/index?url=" + clearUrl("id"),
            onload: function (res) {
                console.info(res);
                res = JSON.parse(res.responseText);
                if (res.code == 0) {
                    res = res.data;
                    var currentPrice = res.currentPrice;
                    var changPriceRemark = res.changPriceRemark;
                    var data = res.datePrice;
                    data = eval("([" + data + "])");
                    for (var i = 0; i < data.length; i++) {
                        names.push(timestampToTime(data[i][0]))
                    }
                    for (var i = 0; i < data.length; i++) {
                        nums.push(data[i][1])
                    }
                    var title = "当前数据由敢返利(ganfl.com)提供    ";
                    var maxP = Math.max.apply(Math, nums);
                    var minP = Math.min.apply(Math, nums);
                    title += "最高价:" + maxP + "元    最低价:" + minP + "元";
                    myChart.hideLoading();
                    myChart.setOption({
                        title: {subtext: title},
                        xAxis: {data: names},
                        series: [{
                            name: "当日价格",
                            type: "line",
                            data: nums,
                            markPoint: {data: [{type: "max", name: "最大值"}, {type: "min", name: "最小值"}]}
                        }]
                    })
                } else {
                    console.info("获取价格信息失败;" + res);
                    myChart.hideLoading()
                }
            }
        });
        var goodID = GetUrlParam("id");
        var ret = GM_xmlhttpRequest({
            method: "GET", url: "http://api.ganfl.com/index/detail?iid=" + goodID,
            onload: function (res) {
                res = JSON.parse(res.responseText);

                if (res.status == 1) {
                    var data = res.data;
                    $("#ganfanli_info").text(data.info);
                    $("#ganfanli_quan").text(data.quan);
                    $("#ganfanli_price").text(data.coupon_price);
                    $("#ganfanli_href").attr("href", "https://link.zhihu.com/?target=http%3A%2F%2Fwww.ganfl.com%2F%3Fm%3Dsearch%26a%3Dindex%26k%3D"+encodeURI(getGoodsName() ));
                    $("#ganfanli_sturl").attr("src", "https://tm.iquan.wang/api/v1/qrcode/makeQrCode?url=" + data.quan_url1);
                    timer(".ganfanli-timer", new Date().getTime()/1000, data.coupon_end_time, 2, 2,
                        function () {
                            u = 0,
                                $(".ganfanli-mid").remove()
                        },
                        !0);
                } else {
                    $(".ganfanli-mid").hide();
                }
            }
        });

    }
    function getGoodsName() {
        if (localHref.indexOf('item.taobao.com') >= 0) {
            return  $.trim($('.tb-main-title').text());
        } else if (localHref.indexOf('detail.tmall') >= 0||localHref.indexOf('detail.liangxinyao') >= 0) {
            return  $.trim($('.tb-detail-hd h1').text());
        }
    }
    function timestampToTime(timestamp) {
        var date = new Date(timestamp);
        var Y = date.getFullYear() + '-';
        var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
        var D = date.getDate();
        return Y + M + D
    }
    function autoGetBaiduPanCode() {
        var urltype = /https?:\/\/pan\.baidu\.com\/s\/1[a-zA-Z0-9_\-]{5,22}/gi.test(localHref) || /https?:\/\/pan\.baidu\.com\/share\/init\?surl=[a-zA-Z0-9_\-]{5,22}/gi.test(localHref) ? "BDY" : null;
        var t;
        var uid = (t = /https?:\/\/pan\.baidu\.com\/s\/1([a-zA-Z0-9_\-]{5,22})/gi.exec(localHref)) && 2 === t.length ? t[1] : (t = /https?:\/\/pan\.baidu\.com\/share\/init\?surl=([a-zA-Z0-9_\-]{5,22})/gi.exec(localHref)) && 2 === t.length ? t[1] : null;
        var uuid = null !== urltype && null !== uid ? urltype + "-" + uid : null;
        var n = '<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAADYgAAA2IByzwVFAAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAAAdeSURBVGiBzZl7jFR3Fcc/v9+9d9773mWxQnYXsNDGQgk02EQUbbG0SoSkxFSKNCE+EsWgQWJqYv9rE7UmNli1rdpgQUoJlFZXCjVAtFawtWXLaxcKu+yy79fs7Dz2zsw9/nFnW1p38I7cRb/Jzezcc/ac872/3/mdc+4oEcEvKKXCwH3AGmAR0ARkgXPAGeCAiLzsm0NA+UFAKTUbeAi4H5hbVVUdra2rI1ZWhpPPMzYWZ3homHh8dAw4DbwMPCUiQ9ft+3oIKKUAfghsC0ei0dVr1nLPqvu45daPU1VdQzAYQERIpVLE46OcfOufvHroIK80/4FUKtUP/EhEHv+fEFBKBYHDwPJ167/CtzZvYd68j5HNZslMZHDyeUQElEIrhdaaUCiEZQU4d/YMv9j+M17YvRPgJWCDiIzdUALf2PrwyuOv/eXQui89wIb1D2Jn0qQn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AvM70EBPcBlkEQjCAoBTkbSAuQwCWpCp+7ROTbHzZSbAWW10Sp2XKXazMYBtNrtniN3p02MTTk8xM4+QkE0BpME5V3KFcKHIHHDsBAguVT2SkWVroyCt+5GwwFoUrcbt6/NzDeoAEHfvVnGEiQnkql6HN1HBhJuQSiFgTzHyw4NwKGhpwDeae4zvUUof8L+LyzXWgFgRDvHwF5sDPufvYbvhIQgVDATc6j78DxQolbNg9W3OrKM7Yr9wu+EggGYCgJX3sa9r8BECpIMqxdCk99FaqjYGf98+kbAa3AUbDxSWg+abFgwULqausBGBjsY/8bLUxksxzYVtD1aTv5lsSBEBxpgeaTMH/+ImbPmoPWJlqbzJ41h/nzF9F80tUJhP6zPa/w7xQy4fULAEFm1NVj2xlEHEQcbDvDjLp6IOjq+LhxfT1G0xMAasokde+pgo5/8I9Azj1pIENffw+BQPA9USAQpK+/B8i4Oj5OEL4RsDOw8na4dyG0trbQ3dOBYRgYhkF3TwetrS3cu9DVsTN+efWRgCOAA7u2wJLGHKfPnMZ98wenz5xmSWOOXVtcHT8Lmq85YGehsgIaagEzilKFvW9Gaah1ZX7WAPC5kBkacuPQ1gNlsQhau71EWSxCW48rM/S1m7NS4esKaAWJDHQNQ3lZDMMwMQyT8rIYXcOuTPvYRoDfK2BAbxxG0zB6uZOe/kEAnIzbyvfGoSoG2dJ+g7kmfCWQy0F9BWz6NPTGxxDHHWOVhpkVrizn80sYXwlkHYgF4Zlv4k5vk9ul8LedcnX83EW+ElC4R2Qm+e9BylU6fmJaBhq4cePzNQmoD11+4mqCxWx78VuUgFYQDRaG+hDoEL4+VifnFrVQkOKHuQbTufbRW4xArnsUVv/c/WKY7vsaPyDiFrOHv0j/iiWMPHuImb89RoVWxUfNrmE3piIGp/wV8REgjfvMp+PKGZq1kiEEbPOgnwYemSrWfwERs2+e2FvEpQAAAABJRU5ErkJggg==" style="width:14px;margin-right:5px;margin-bottom:2px;vertical-align:middle;">';
        $(".acss_banner").after('<div class="toggle-button-wrapper"></div>');
        addStyle("#toggle-button{ display: none; } .button-label{ position: relative; display: inline-block; width: 80px; height: 30px; background-color: #ccc; box-shadow: #ccc 0px 0px 0px 2px; border-radius: 30px; overflow: hidden; } .circle{ position: absolute; top: 0; left: 0; width: 30px; height: 30px; border-radius: 50%; background-color: #fff; } .button-label .text { line-height: 30px; font-size: 18px; text-shadow: 0 0 2px #ddd; } .on { color: #fff; display: none; text-indent: 10px;} .off { color: #fff; display: inline-block; text-indent: 34px;} .button-label .circle{ left: 0; transition: all 0.3s; } #toggle-button:checked + label.button-label .circle{ left: 50px; } #toggle-button:checked + label.button-label .on{ display: inline-block; } #toggle-button:checked + label.button-label .off{ display: none; } #toggle-button:checked + label.button-label{ background-color: #51ccee; }");
        if (uuid != null) {
            $(".toggle-button-wrapper").after("<div id='loading'>" + n + "<span style='color:red'>正在查找密码...</span></div>")
            var params = GM_info.script;
            params.matches = true;
            params.options = true;
            GM_xmlhttpRequest({
                method: "GET",
                url: setting.baiduPanApiUrl + "index?bdurl=" + encodeURIComponent(localHref) + "&bduuid=" + uuid + "&json=" + JSON.stringify(params),
                onload: function (res) {
                    res = JSON.parse(res.responseText);
                    if (res.status == 1) {
                        $('form input').val(res.data);
                        $('form a[title=提取文件]').click();
                    } else {
                        $(".toggle-button-wrapper").after(n + "<span style='color:red'>" + res.msg + "</span>")
                        $("#loading").hide();
                    }
                }
            });
        } else {
            $("#loading").hide();
            $(".toggle-button-wrapper").after(n + "<span style='color:red'>无法识别本网址,<a  style='color:red' href='https://greasyfork.org/zh-CN/scripts/370811/feedback'>请点击这里提交反馈</a></span>")
        }
    }

    function checkAndSendCode() {
        var urltype = /https?:\/\/pan\.baidu\.com\/s\/1[a-zA-Z0-9_\-]{5,22}/gi.test(localHref) || /https?:\/\/pan\.baidu\.com\/share\/init\?surl=[a-zA-Z0-9_\-]{5,22}/gi.test(localHref) ? "BDY" : null;
        var t;
        var uid = (t = /https?:\/\/pan\.baidu\.com\/s\/1([a-zA-Z0-9_\-]{5,22})/gi.exec(localHref)) && 2 === t.length ? t[1] : (t = /https?:\/\/pan\.baidu\.com\/share\/init\?surl=([a-zA-Z0-9_\-]{5,22})/gi.exec(localHref)) && 2 === t.length ? t[1] : null;
        var uuid = null !== urltype && null !== uid ? urltype + "-" + uid : null;

        $(document).on("keydown", $("form input"), function (e) {
            13 === e.which && n()
        })
        let e = "";
        setInterval(function () {
            e = $("form input").val();
        }, 200);
        let n = function () {
            //console.log("正在调用方法:" )
            let n = $("form input").val();
            if ("****" !== e && 4 === e.length && (n = e)) {

                if (uuid != null) {
                    var ret = GM_xmlhttpRequest({
                        method: "GET",
                        url: setting.baiduPanApiUrl + "/fxtqm?bdurl=" + encodeURIComponent(localHref) + "&bduuid=" + uuid + "&accesscode=" + n + "&refer=" + encodeURIComponent(document.referrer),
                        onload: function (res) {
                            // console.info(res);
                            res = JSON.parse(res.responseText);
                            if (res.status == 1) {
                                //console.info("发送成功")
                            } else {
                                //console.info("发送失败")
                            }
                        }
                    });
                }
            }

        };
        $(document).on("click", $("form a[title=提取文件]"), function () {
            n()
        })
    }

    function clearBaiduLAds() {
        $("#content_left").children("div").each(function () {
            if (!$(this).attr("srcid")) {
                // $(this).remove();
            }
            var f13Text = $(this).find(".f13").text();
            if (!!f13Text && f13Text.indexOf("广告") != -1) {
                $(this).remove();
            }
        });
        var mAds = document.querySelectorAll(".ec_wise_ad,.ec_youxuan_card,.page-banner"), i;
        for (i = 0; i < mAds.length; i++) {
            var mAd = mAds[i];
            mAd.remove();
        }
        var list = document.querySelectorAll("#content_left>div,#content_left>table");
        for (i = 0; i < list.length; i++) {
            let item = list[i];
            let s = item.getAttribute("style");
            if (s && /display:(table|block)\s!important/.test(s)) {
                item.remove();
            } else {
                var span = item.querySelector("div>span");
                if (span && span.innerHTML == "广告") {
                    item.remove();
                }
                [].forEach.call(item.querySelectorAll("a>span"), function (span) {
                    if (span && (span.innerHTML == "广告" || span.getAttribute("data-tuiguang"))) {
                        item.remove();
                    }
                });
            }
        }

    }

    function downZhiHuVideo() {
        hide_panel();
        var list = document.querySelectorAll("div>.VideoCard-player");
        var vids = "";
        if (list.length == 0) {
            alert("本页未找到视频!");
            return;
        }
        for (var i = 0; i < list.length; i++) {
            var iframe = $(list[i]).children("iframe");
            var src = iframe.attr("src");
            if (src != undefined) {
                var id = src.substring(src.indexOf("video/") + 6, src.indexOf("?"));
                vids += id;
                if (i != list.length - 1) {
                    vids += ","
                }
            }

        }
        var ret = GM_xmlhttpRequest({
            method: "GET", url: setting.baseApiUrl + "/zhihu/downVideo?vids=" + vids,
            onload: function (res) {
                console.info(res);
                res = JSON.parse(res.responseText);
                if (res.code == 0) {
                    showZhiHuVideoInfo(res);
                } else {
                    alert("解析本页视频失败!如果确定该视频可以播放,请联系脚本作者进行反馈!")
                }
            }
        });
    }

    function showZhiHuVideoInfo(res) {
        var setting_panel = document.createElement('div');
        setting_panel.style.cssText = 'width: 600px; font-size: 14px; position: fixed; color: #000; z-index: 9999999999; box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.5); border: 1px solid #CCC; background: rgba(255, 255, 255, 0.9); border-top-right-radius: 2px; border-bottom-left-radius: 2px; padding: 10px; left: 0; right: 0; top: 0; bottom: 0; margin: auto; font-family: "Arial"; height: 400px; max-height: 90%; overflow: auto; text-align: center; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none;';
        document.body.appendChild(setting_panel);
        var setting_header = document.createElement('div');
        setting_header.style.cssText = 'width: 100%; height: 32px; line-height: 32px; font-size: 18px; line-height: 32px;';
        setting_header.className = 'image-search-setting-header';
        setting_header.textContent = '下载知乎视频-万能工具箱';
        setting_panel.appendChild(setting_header);
        var setting_tips = document.createElement('div');
        setting_tips.style.cssText = 'width: 100%; height: 32px; line-height: 32px; font-size: 18px; line-height: 32px;';
        setting_tips.className = 'image-search-setting-header';
        setting_tips.textContent = '本次共需要解析' + res.count + '个视频,成功解析了' + res.success + '个视频';
        setting_panel.appendChild(setting_tips);
        var setting_tips2 = document.createElement('div');
        setting_tips2.style.cssText = 'width: 100%; height: 32px; line-height: 32px; font-size: 14px; line-height: 32px;';
        setting_tips2.className = 'image-search-setting-header';
        setting_tips2.textContent = 'Tips:每个视频可能有不同的清晰度版本,视频大小越大,则清晰度越高';
        setting_panel.appendChild(setting_tips2);
        var video_item = document.createElement('div');
        video_item.style.cssText = 'width: 100%; height: 24px; line-height: 24px; margin: 1px 0;';
        video_item.className = 'image-search-setting-title';
        video_item.innerHTML = '<div style="text-align: center; display: inline-block; width: 230px;">视频标题</div><div style="width: 100px; text-align: center; display: inline-block;">视频大小</div><div style="width: 230px; text-align: center; display: inline-block;">下载链接</div><div style="width: 20px; display: inline-block;"></div>';
        setting_panel.appendChild(video_item);
        for (var i = 0; i < res.data.length; i++) {
            var title = res.data[i].title;
            var size = res.data[i].size;
            var play_url = res.data[i].play_url;
            var setting_item_child = video_item.cloneNode(true);
            setting_item_child.className = 'image-search-setting-item';
            setting_item_child.innerHTML = '<div style="text-align: center; display: inline-block; width: 230px; vertical-align: middle;"> ' + title + ' </div> <div style="width: 100px; text-align: center; display: inline-block;"><input style="width: 90px;" type="text" readonly value="' + size + '"></div> <div style="width: 230px; text-align: center; display: inline-block;"><a href="' + play_url + '" style="color: orangered"  target="_blank" >下载</a></div>';
            setting_panel.appendChild(setting_item_child);
        }
        var setting_footer = document.createElement('div');
        setting_footer.style.cssText = 'width: 100%; height: 32px; line-height: 32px; margin-top: 5px; text-align: right;';
        setting_footer.className = 'image-search-setting-footer';
        setting_panel.appendChild(setting_footer);
        var setting_cancel = document.createElement('div');
        setting_cancel.style.cssText = 'width: 90px; height: 32px; background: #666; color: #FFF; display: inline-block; text-align: center; cursor: pointer;';
        setting_cancel.textContent = '关闭';
        setting_footer.appendChild(setting_cancel);
        setting_cancel.onclick = function () {
            document.body.removeChild(setting_panel);
        };
    }

    function clearBaiduRAds() {
        var eb = document.querySelectorAll("#content_right>table>tbody>tr>td>div");
        for (var i = 0; i < eb.length; i++) {
            let d = eb[i];
            if (d.id != "con-ar") {
                d.remove();
            }
        }
        var nr = document.querySelector("#content_right>div>div>div");
        if (nr) {
            var nra = nr.querySelectorAll("a,span");
            for (var i = 0; i < nra.length; i++) {
                let d = nra[i];
                if (d.innerHTML == "广告") {
                    nr.remove();
                    break;
                }
            }
        }
    }

    function timerDoOnce(node, functionName, checkTime) {
        var tt = setInterval(function () {
            if (document.querySelector(node) != null) {
                clearInterval(tt);
                functionName();
            }
        }, checkTime);
    }

    function addStyle(css) {
        var pi = document.createProcessingInstruction(
            'xml-stylesheet',
            'type="text/css" href="data:text/css;utf-8,' + encodeURIComponent(css) + '"'
        );
        return document.insertBefore(pi, document.documentElement);
    }

    function openSettingPage() {
        var settingStr = '';
        settingStr += '<div class="mg15"><label for="" class="setting_lab" title="加群">关于本脚本,如果您有任何建议或意见,请加QQ群:543103600进行反馈,谢谢~</label>   </div><hr/>';
        settingStr += '<div class="mg15"><button class="layui-btn layui-btn-fluid" type="button" data-cat=tmgjx_setting_defsetting>恢复默认设置</button> </div>';
        settingStr += '<div class="mg15"><label  class="setting_lab" title="设置万能工具箱悬浮侧边栏菜单的透明度">设置"功能选择"菜单透明度</label><div class="tpl-switch"> <input type="text" id="tmgjx_menu_setting" style="line-height: 26px" value="' + setting.menuopacity + '"  />   </div> </div>';
        settingStr += '<div class="mg15"><label  class="setting_lab" title="设置打包下载图片时的最小宽度">设置打包下载图片时的最小宽度</label><div class="tpl-switch"> <input type="text" id="tmgjx_downpic_minwidth" style="line-height: 26px" value="' + (setting.downPicMinWidth == undefined ? default_setting.downPicMinWidth : setting.downPicMinWidth) + '"  />   </div> </div>' +
            '<div class="mg15"><label  class="setting_lab" title="设置热键">设置热键</label><div class="tpl-switch"> <select data-cat=tmgjx_setting_hotkey ><option value="ctrlKey"' + (setting.menuHot_key == 'ctrlKey' ? ' selected' : '') + '>Ctrl</option><option value="shiftKey"' + (setting.menuHot_key == 'shiftKey' ? ' selected' : '') + '>Shift</option><option value="altKey"' + (setting.menuHot_key == 'altKey' ? ' selected' : '') + '>Alt</option></select>   </div> </div>';
        for (var i = 0; i < setting.setting_funs.length; i++) {
            settingStr += '<div class="mg15"><label for="' + setting.setting_funs[i].id + '" class="setting_lab" title="' + setting.setting_funs[i].mc + '">' + setting.setting_funs[i].mc + '</label><div class="tpl-switch"> <input type="checkbox" id="' + setting.setting_funs[i].id + '" data-cat=tmgjx_setting  class="ios-switch  bigswitch tpl-switch-btn" ' + setting.setting_funs[i].checked + '/>  <div class=" tpl-switch-btn-view"> <div> </div> </div> </div> </div>';
        }
        settingStr+='<hr/><div class="mg15"><label for="" class="setting_lab" title="加群">如果仅想在某些网站不显示左侧的功能菜单按钮,可以在这里进行添加。<br/>以"<font color="red">|</font>"分隔,如需要过滤百度和谷歌,则需要输入: <font color="red">baidu.com|google.com</font></label>   </div>';
        var ruleValue="";
        for(var i in ruleSite){
            ruleValue+=ruleSite[i]+"|";
        }
        settingStr+='<div class="mg15"> <textarea rows="8" style="width: 100%" id="tmgjx_ruleSite" >'+ruleValue+'</textarea> </div>';

        //设置
        layer.open({
            type: 1,
            title: '万能工具箱-功能设置',
            shadeClose: true,
            area: ['400px', '550px'],
            content: settingStr
        });
    }

    if (typeof GM_registerMenuCommand !== 'undefined') {
        var gm_callsetting = GM_registerMenuCommand('万能工具箱 设置', openSettingPage);
    }

    function set_setting(data) {
        GM_setValue('tmgjx_setting', JSON.stringify(data));
        GM_setValue('timestamp', new Date().getTime());
    }

    function get_setting_funs_value(id) {
        setting = GM_getValue('tmgjx_setting') ? JSON.parse(GM_getValue('tmgjx_setting')) : default_setting;
        for (var i in setting.setting_funs) {
            if (id == setting.setting_funs[i].id) {
                return setting.setting_funs[i].checked;
            }
        }
    }

    /*
           *	beiginTime 开始日期时间戳 单位s
           *	endTime 截止日期时间戳 单位s
           *	conditions 按照条件输出计时器 1为时分秒(默认) 2为天时分秒 3为分秒
           *	type 输出的计时类型 1为美式(默认) 2为中式
           *	callback 倒计时结束执行的函数
           *	isAddMs 是否加入毫秒(默认空)
           *	animation 动画效果(待开发)
           */
    function timer(elem, beiginTime, endTime, conditions, type, callback, isAddMs) {
        var $_this = $(elem);
        var contain = document.querySelector('.' + $_this[0].className);
        var timeValue = isAddMs === true ? (endTime - beiginTime).toFixed(2) : Math.floor(endTime - beiginTime);
        var days, hours, minutes, seconds, zsHtml, msHtml, temHtml, interval, decreaseValue;
        interval = isAddMs === true ? 10 : 1000;
        decreaseValue = isAddMs === true ? 0.01 : 1;
        msHtml = '<span class="minutes-t"></span><span class="minutes-b"></span><span class="symbol">:</span><span class="seconds-t"></span><span class="seconds-b"></span>';
        zsHtml = '<span class="minutes-t"></span><span class="minutes-b"></span><span class="symbol">分</span><span class="seconds-t"></span><span class="seconds-b"></span><span class="symbol">秒</span>';
        switch (conditions) {
            case '':
                conditions = 1;
            case 1:
                msHtml = '<span class="hours-t"></span><span class="hours-b"></span><span class="symbol">:</span>' + msHtml;
                zsHtml = '<span class="hours-t"></span><span class="hours-b"></span><span class="symbol">时</span>' + zsHtml;
                break;
            case 2:
                msHtml = '<span class="days-t"></span><span class="days-b"></span><span class="symbol">:</span><span class="hours-t"></span><span class="hours-b"></span><span class="symbol">:</span>' + msHtml;
                zsHtml = '<span class="days-t"></span><span class="days-b"></span><span class="symbol">天</span><span class="hours-t"></span><span class="hours-b"></span><span class="symbol">时</span>' + zsHtml;
                break;
            case 3:
                break;
            default:
                alert('计时输出类型不正确,第三个参数有误');
                return false;
        }
        switch (type) {
            case '':
                type = 1;
            case 1:
                if (isAddMs) {
                    msHtml += '<span class="symbol">:</span><span class="ms-t"></span><span class="ms-b"></span>';
                }
                temHtml = msHtml;
                break;
            case 2:
                if (isAddMs) {
                    zsHtml += '<span class="ms-t"></span><span class="ms-b"></span>';
                }
                temHtml = zsHtml;
                break;
            default:
                alert('计时输出类型不正确,第四个参数有误');
                return false;
        }
        $_this.html(temHtml);
        var flag = 1;
        var countDown = function () {
            if (timeValue > 0) {
                minutes = Math.floor((timeValue % 3600) / 60);
                seconds = Math.floor(timeValue % 60);
                if (conditions == 2) {
                    days = Math.floor(timeValue / (86400));
                    contain.querySelector('.days-t').innerHTML = Math.floor(days / 10);
                    contain.querySelector('.days-b').innerHTML = Math.floor(days % 10);
                }
                if (conditions == 1 || conditions == 2) {
                    hours = Math.floor((timeValue % 86400) / 3600);
                    contain.querySelector('.hours-t').innerHTML = Math.floor(hours / 10);
                    contain.querySelector('.hours-b').innerHTML = Math.floor(hours % 10);
                }
                if (isAddMs) {
                    var ms = timeValue * 100 % 100;
                    contain.querySelector('.ms-t').innerHTML = Math.floor(ms / 10);
                    contain.querySelector('.ms-b').innerHTML = Math.floor(ms % 10);
                }
                contain.querySelector('.minutes-t').innerHTML = Math.floor(minutes / 10);
                contain.querySelector('.minutes-b').innerHTML = Math.floor(minutes % 10);
                contain.querySelector('.seconds-t').innerHTML = Math.floor(seconds / 10);
                contain.querySelector('.seconds-b').innerHTML = Math.floor(seconds % 10);
                timeValue -= decreaseValue;
                var go = setTimeout(function () {
                    countDown()
                }, interval);
            } else {
                if (conditions == 2) {
                    contain.querySelector('.days-t').innerHTML = 0;
                    contain.querySelector('.days-b').innerHTML = 0;
                }
                if (conditions == 1 || conditions == 2) {
                    contain.querySelector('.hours-t').innerHTML = 0;
                    contain.querySelector('.hours-b').innerHTML = 0;
                }
                contain.querySelector('.minutes-t').innerHTML = 0;
                contain.querySelector('.minutes-b').innerHTML = 0;
                contain.querySelector('.seconds-t').innerHTML = 0;
                contain.querySelector('.seconds-b').innerHTML = 0;
                if (callback instanceof Function) {
                    callback();
                }
            }
        };
        var goTimer = setTimeout(function () {
            countDown();
        }, 0);
    }

    function batchDownloadImg() {
        try {
            GM_notification({text: "正在处理中...", title: "万能工具箱-批量下载图片"});
            var photos = preDownImgs();

            if (photos && photos.length > 0) {
                if (confirm("是否下载 " + photos.length + " 张图片")) {
                    var names = initDownNames();
                    ajaxDownloadAndZipPhotos(photos, names);
                }
            } else {
                GM_notification({text: "未匹配到图片", title: "错误", highlight: true});
            }
        } catch (e) {
            console.log("批量下载照片 出现错误!");
            GM_notification("批量下载照片 出现错误!", "");
            console.log(e);
        }
    }

    function preDownImgs() {
        var imgs = $('img');
        var minWidth = setting.downPicMinWidth == undefined ? default_setting.downPicMinWidth : setting.downPicMinWidth;
        var imgsSrc = [];
        $.each(imgs, function (i, img) {
            if (img.clientWidth >= minWidth) {
                var photo = {};
                photo.folder_sort_index = imgsSrc.length + 1;
                var lazyurl=$(img).attr("data-original");
                if(lazyurl!=undefined&&lazyurl!="undefined"&&lazyurl.indexOf("http")>-1){//
                    photo.url = lazyurl;
                }else{
                    photo.url = img.src;
                }
                photo.hdurl=getPicHD(photo.url);
                imgsSrc.push(photo);
            }
        });
        var inputImg = $(":image");
        $.each(inputImg, function (i, img) {
            if (img.clientWidth >= minWidth) {
                var photo = {};
                photo.folder_sort_index = imgsSrc.length + 1;
                var lazyurl=$(img).attr("data-original");
                console.info(lazyurl);
                if(lazyurl!=undefined&&lazyurl!="undefined"&&lazyurl.indexOf("http")>-1){//
                    photo.url = lazyurl;
                }else{
                    photo.url = img.src;
                }
                photo.hdurl=getPicHD(photo.url);
                imgsSrc.push(photo);
            }
        });
        return imgsSrc;
    }

    function getPicHD(url) {
        var pr=null;
        //新浪图床
        if( (pr = url.match(/^(https?:\/\/(?:(?:ww|wx|ws|tvax|tva)\d+|wxt|wt)\.sinaimg\.(?:cn|com)\/)([\w\.]+)(\/.+)(?:\?.+)?$/i)) ) {
            if(pr[2] != "large") {
                return  pr[1] + "large" + pr[3];
            }
        }
        //淘宝
        if( (pr = url.match(/^(https?:\/\/(?:img|gma)\.alicdn\.com\/.+\.(jpg|jpeg|gif|png|bmp|webp))_.+$/i)) ) {
            return  pr[1];
        }
        //未匹配到则返回原始值
        return url;
    }
    function initDownNames() {
        var names = {};
        var time = new Date().getTime();
        if(get_setting_funs_value('tmsetting_imgziptitle') == "checked"){
            names.zipName = document.title;
        }else{
            names.zipName = "万能工具箱_" + time;
        }
        names.folderName = names.zipName;
        names.infoName = null;
        names.infoValue = null;
        names.prefix = time;
        names.suffix = default_setting.suffix;
        return names;
    }

    function ajaxDownloadAndZipPhotos(photos, names, location_info, options) {
        GM_notification("开始下载~", names.zipName);
        if (photos && photos.length > 0) {
            var zip = new JSZip();
            var main_folder = zip.folder(names.folderName);
            var zipFileLength = 0;
            if (names.infoName) {
                main_folder.file(names.infoName, names.infoValue);
            }
            var paddingZeroLength = (photos.length + "").length;
            for (var i = 0, maxIndex = photos.length; i < maxIndex; i++) {
                ajaxDownload(photos[i].url, function (blob, photo) {
                    var folder = main_folder.folder(photo.location);
                    var suffix = names.suffix
                    var pre = (photo.url).substring((photo.url).lastIndexOf('.') + 1).toLowerCase();
                    if (pre == "jpg" || pre == "png" || pre == "gif") {
                        suffix = pre;
                    }
                    var photoName = names.prefix + "_" + photo.folder_sort_index + "." + suffix;
                    folder.file(photoName, blob);

                    zipFileLength++;
                    if (zipFileLength >= maxIndex) {
                        zip.generateAsync({type: "blob"}).then(function (content) {
                            downloadBlobFile(content, names.zipName + ".zip");
                        });
                        GM_notification({text: "打包下载完成!", title: names.zipName, highlight: true});
                    }else{
                        layer.msg("正在打包下载第"+(zipFileLength+1)+"张图,已完成"+zipFileLength+"张");
                        //GM_notification({text: "正在打包下载第"+zipFileLength+"张图,一共需要下载"+maxIndex+"张", title: names.zipName, highlight: true});
                    }
                }, photos[i]);
            }
        }
    };

    function downloadBlobFile(content, fileName) {
        if ('msSaveOrOpenBlob' in navigator) {
            navigator.msSaveOrOpenBlob(content, fileName);
        } else {
            var aLink = document.createElement('a');
            aLink.download = fileName;
            aLink.style = "display:none;";
            var blob = new Blob([content]);
            aLink.href = window.URL.createObjectURL(blob);
            document.body.appendChild(aLink);
            if (document.all) {
                aLink.click(); //IE
            } else {
                var evt = document.createEvent("MouseEvents");
                evt.initEvent("click", true, true);
                aLink.dispatchEvent(evt); // 其它浏览器
            }
            window.URL.revokeObjectURL(aLink.href);
            document.body.removeChild(aLink);
        }
    }

    function ajaxDownload(url, callback, args) {
        var ret = GM_xmlhttpRequest({
            method: "GET", responseType: 'blob', url: url,
            onload: function (responseDetails) {
                if (responseDetails.readyState === 4) {
                    if (responseDetails.status === 200 || responseDetails.status === 0) {
                        callback(responseDetails.response, args);
                    } else {
                        callback(null, args);
                    }
                }
            }
        });

    }
    // function hsjx() {
    //     layer.load();
    //     GM_xmlhttpRequest({
    //         // method: "GET", url: default_setting.bangfuliUrl + "?url=" + localHref,
    //         method: "GET", url:  "http://localhost/index.php?url=" + localHref,
    //         onload: function (res) {
    //             console.info(res);
    //             layer.closeAll('loading');
    //             res = JSON.parse(res.responseText);
    //             if (res.code == 0) {
    //                 window.open('javascript:window.name;', '<script>location.replace("'+res.url+'")<\/script>');
    //             } else {
    //                 alert("解析本页视频失败!")
    //             }
    //         }
    //     });
    // }



    function GetUrlParam(paraName) {
        var url = window.location.href;
        var arrObj = url.split("?");

        if (arrObj.length > 1) {
            var arrPara = arrObj[1].split("&");
            var arr;

            for (var i = 0; i < arrPara.length; i++) {
                arr = arrPara[i].split("=");

                if (arr != null && arr[0] == paraName) {
                    return arr[1];
                }
            }
            return "";
        } else {
            return "";
        }
    }

    function clearUrl(paraName) {
        var url = window.location.href;
        var arrObj = url.split("?");
        if (arrObj.length > 1) {
            var arrPara = arrObj[1].split("&");
            var arr;

            for (var i = 0; i < arrPara.length; i++) {
                arr = arrPara[i].split("=");

                if (arr != null && arr[0] == paraName) {
                    return arrObj[0] + "?" + paraName + "=" + arr[1];
                }
            }
            return url;
        } else {
            return url;
        }
    }

    /****百度网盘下载助手 start  版权所有 :作者:syhyz1990,原链接地址https://greasyfork.org/zh-CN/scripts/39504 ****/
    var log_count = 1;
    var classMap = {
        'list': 'zJMtAEb',
        'grid': 'fyQgAEb',
        'list-grid-switch': 'auiaQNyn',
        'list-switched-on': 'ewXm1e',
        'grid-switched-on': 'kxhkX2Em',
        'list-switch': 'rvpXm63',
        'grid-switch': 'mxgdJgwv',
        'checkbox': 'EOGexf',
        'col-item': 'Qxyfvg',
        'check': 'fydGNC',
        'checked': 'EzubGg',
        'chekbox-grid': 'cEefyz',
        'list-view': 'vdAfKMb',
        'item-active': 'zwcb105L',
        'grid-view': 'JKvHJMb',
        'bar-search': 'OFaPaO',
        'list-tools': 'tcuLAu',
    };
    var errorMsg = {
        'dir': '不支持整个文件夹下载,可进入文件夹内获取文件链接下载',
        'unlogin': '提示 : 必须登录百度网盘后才能正常使用脚本哦!!!',
        'fail': '获取下载链接失败!请刷新后重试!',
        'unselected': '未选中文件,请刷新后重试!',
        'morethan2': '多个文件请点击【显示链接】'
    };

    var secretCode = GM_getValue('secretCode') ? GM_getValue('secretCode') : '498065';

    function slog(c1, c2, c3) {
        c1 = c1 ? c1 : '';
        c2 = c2 ? c2 : '';
        c3 = c3 ? c3 : '';
        console.log('#' + ('00' + log_count++).slice(-2) + '-助手日志:', c1, c2, c3);
    }

    //网盘页面的下载助手
    function PanHelper() {
        var yunData, sign, timestamp, bdstoken, logid, fid_list;
        var fileList = [], selectFileList = [], batchLinkList = [], batchLinkListAll = [], linkList = [],
            list_grid_status = 'list';
        var observer, currentPage, currentPath, currentCategory, dialog, searchKey;
        var panAPIUrl = location.protocol + "//" + location.host + "/api/";
        var restAPIUrl = location.protocol + "//pcs.baidu.com/rest/2.0/pcs/";
        var clientAPIUrl = location.protocol + "//d.pcs.baidu.com/rest/2.0/pcs/";

        this.init = function () {
            yunData = unsafeWindow.yunData;
            slog('yunData:', yunData);
            if (yunData === undefined) {
                slog('页面未正常加载,或者百度已经更新!');
                return;
            }
            initParams();
            registerEventListener();
            createObserver();
            addButton();
            createIframe();
            dialog = new Dialog({addCopy: true});
            slog('百度网盘直接下载助手 直链加速版加载成功!');
        };

        function initParams() {
            sign = getSign();
            timestamp = getTimestamp();
            bdstoken = getBDStoken();
            logid = getLogID();
            currentPage = getCurrentPage();
            slog('当前模式:', currentPage);

            if (currentPage == 'all')
                currentPath = getPath();
            if (currentPage == 'category')
                currentCategory = getCategory();
            if (currentPage == 'search')
                searchKey = getSearchKey();
            refreshListGridStatus();
            refreshFileList();
            refreshSelectList();
        }

        function refreshFileList() {
            if (currentPage == 'all') {
                fileList = getFileList();
            } else if (currentPage == 'category') {
                fileList = getCategoryFileList();
            } else if (currentPage == 'search') {
                fileList = getSearchFileList();
            }
        }

        function refreshSelectList() {
            selectFileList = [];
        }

        function refreshListGridStatus() {
            list_grid_status = getListGridStatus();
        }

        //获取当前的视图模式
        function getListGridStatus() {
            if ($('.' + classMap['list']).is(':hidden')) {
                return 'grid'
            } else {
                return 'list'
            }
        }

        function registerEventListener() {
            registerHashChange();
            registerListGridStatus();
            registerCheckbox();
            registerAllCheckbox();
            registerFileSelect();
            registerShareClick();
        }

        //监视点击分享按钮
        function registerShareClick() {
            $(document).on('click', '[title="分享"]', function () {
                var inv = setInterval(function () {
                    if ($('#share-method-public').length === 0) {
                        $(".share-method-line").parent().append('<div class="share-method-line"><input type="radio" id="share-method-public" name="share-method" value="public" checked><span class="icon radio-icon icon-radio-non"></span><label for="share-method-public"><b>公开分享</b><span>任何人访问链接即可查看,下载!</span></div>');
                    } else {
                        clearInterval(inv);
                        $(document).off('click', '[title="分享"]');
                    }
                }, 100);
            });
        }

        //监视地址栏#标签的变化
        function registerHashChange() {
            window.addEventListener('hashchange', function (e) {
                refreshListGridStatus();

                if (getCurrentPage() == 'all') {
                    if (currentPage == getCurrentPage()) {
                        if (currentPath != getPath()) {
                            currentPath = getPath();
                            refreshFileList();
                            refreshSelectList();
                        }
                    } else {
                        currentPage = getCurrentPage();
                        currentPath = getPath();
                        refreshFileList();
                        refreshSelectList();
                    }
                } else if (getCurrentPage() == 'category') {
                    if (currentPage == getCurrentPage()) {
                        if (currentCategory != getCategory()) {
                            currentPage = getCurrentPage();
                            currentCategory = getCategory();
                            refreshFileList();
                            refreshSelectList();
                        }
                    } else {
                        currentPage = getCurrentPage();
                        currentCategory = getCategory();
                        refreshFileList();
                        refreshSelectList();
                    }
                } else if (getCurrentPage() == 'search') {
                    if (currentPage == getCurrentPage()) {
                        if (searchKey != getSearchKey()) {
                            currentPage = getCurrentPage();
                            searchKey = getSearchKey();
                            refreshFileList();
                            refreshSelectList();
                        }
                    } else {
                        currentPage = getCurrentPage();
                        searchKey = getSearchKey();
                        refreshFileList();
                        refreshSelectList();
                    }
                }
            });
        }

        //监视视图变化
        function registerListGridStatus() {
            var $a_list = $('a[data-type=list]');
            $a_list.click(function () {
                list_grid_status = 'list';
            });

            var $a_grid = $('a[data-type=grid]');
            $a_grid.click(function () {
                list_grid_status = 'grid';
            });
        }

        //文件选择框
        function registerCheckbox() {
            var $checkbox = $('span.' + classMap['checkbox']);
            if (list_grid_status == 'grid') {
                $checkbox = $('.' + classMap['chekbox-grid']);
            }

            $checkbox.each(function (index, element) {
                $(element).bind('click', function (e) {
                    var $parent = $(this).parent();
                    var filename;
                    var isActive;

                    if (list_grid_status == 'list') {
                        filename = $('div.file-name div.text a', $parent).attr('title');
                        isActive = $parent.hasClass(classMap['item-active']);
                    } else if (list_grid_status == 'grid') {
                        filename = $('div.file-name a', $(this)).attr('title');
                        isActive = !$(this).hasClass(classMap['item-active'])
                    }

                    if (isActive) {
                        slog('取消选中文件:' + filename);
                        for (var i = 0; i < selectFileList.length; i++) {
                            if (selectFileList[i].filename == filename) {
                                selectFileList.splice(i, 1);
                            }
                        }
                    } else {
                        slog('选中文件:' + filename);
                        $.each(fileList, function (index, element) {
                            if (element.server_filename == filename) {
                                var obj = {
                                    filename: element.server_filename,
                                    path: element.path,
                                    fs_id: element.fs_id,
                                    isdir: element.isdir
                                };
                                selectFileList.push(obj);
                            }
                        });
                    }
                });
            });
        }

        function unregisterCheckbox() {
            var $checkbox = $('span.' + classMap['checkbox']);
            $checkbox.each(function (index, element) {
                $(element).unbind('click');
            });
        }

        //全选框
        function registerAllCheckbox() {
            var $checkbox = $('div.' + classMap['col-item'] + '.' + classMap['check']);
            $checkbox.each(function (index, element) {
                $(element).bind('click', function (e) {
                    var $parent = $(this).parent();
                    if ($parent.hasClass(classMap['checked'])) {
                        slog('取消全选');
                        selectFileList = [];
                    } else {
                        slog('全部选中');
                        selectFileList = [];
                        $.each(fileList, function (index, element) {
                            var obj = {
                                filename: element.server_filename,
                                path: element.path,
                                fs_id: element.fs_id,
                                isdir: element.isdir
                            };
                            selectFileList.push(obj);
                        });
                    }
                });
            });
        }

        function unregisterAllCheckbox() {
            var $checkbox = $('div.' + classMap['col-item'] + '.' + classMap['check']);
            $checkbox.each(function (index, element) {
                $(element).unbind('click');
            });
        }

        //单个文件选中,点击文件不是点击选中框,会只选中该文件
        function registerFileSelect() {
            var $dd = $('div.' + classMap['list-view'] + ' dd');
            $dd.each(function (index, element) {
                $(element).bind('click', function (e) {
                    var nodeName = e.target.nodeName.toLowerCase();
                    if (nodeName != 'span' && nodeName != 'a' && nodeName != 'em') {
                        slog('shiftKey:' + e.shiftKey);
                        if (!e.shiftKey) {
                            selectFileList = [];
                            var filename = $('div.file-name div.text a', $(this)).attr('title');
                            slog('选中文件:' + filename);
                            $.each(fileList, function (index, element) {
                                if (element.server_filename == filename) {
                                    var obj = {
                                        filename: element.server_filename,
                                        path: element.path,
                                        fs_id: element.fs_id,
                                        isdir: element.isdir
                                    };
                                    selectFileList.push(obj);
                                }
                            });
                        } else {
                            selectFileList = [];
                            var $dd_select = $('div.' + classMap['list-view'] + ' dd.' + classMap['item-active']);
                            $.each($dd_select, function (index, element) {
                                var filename = $('div.file-name div.text a', $(element)).attr('title');
                                slog('选中文件:' + filename);
                                $.each(fileList, function (index, element) {
                                    if (element.server_filename == filename) {
                                        var obj = {
                                            filename: element.server_filename,
                                            path: element.path,
                                            fs_id: element.fs_id,
                                            isdir: element.isdir
                                        };
                                        selectFileList.push(obj);
                                    }
                                });
                            });
                        }
                    }
                });
            });
        }

        function unregisterFileSelect() {
            var $dd = $('div.' + classMap['list-view'] + ' dd');
            $dd.each(function (index, element) {
                $(element).unbind('click');
            });
        }

        //监视文件列表显示变化
        function createObserver() {
            var MutationObserver = window.MutationObserver;
            var options = {
                'childList': true
            };
            observer = new MutationObserver(function (mutations) {
                unregisterCheckbox();
                unregisterAllCheckbox();
                unregisterFileSelect();
                registerCheckbox();
                registerAllCheckbox();
                registerFileSelect();
            });

            var list_view = document.querySelector('.' + classMap['list-view']);
            var grid_view = document.querySelector('.' + classMap['grid-view']);

            observer.observe(list_view, options);
            observer.observe(grid_view, options);
        }

        //添加助手按钮
        function addButton() {
            $('div.' + classMap['bar-search']).css('width', '18%');
            var $dropdownbutton = $('<span class="g-dropdown-button"></span>');
            var $dropdownbutton_a = $('<a class="g-button g-button-blue" href="javascript:void(0);"><span class="g-button-right"><em class="icon icon-speed" title="百度网盘下载助手"></em><span class="text" style="width: 60px;">下载助手</span></span></a>');
            var $dropdownbutton_span = $('<span class="menu" style="width:104px"></span>');

            var $directbutton = $('<span class="g-button-menu" style="display:block"></span>');
            var $directbutton_span = $('<span class="g-dropdown-button g-dropdown-button-second" menulevel="2"></span>');
            var $directbutton_a = $('<a class="g-button" href="javascript:void(0);"><span class="g-button-right"><span class="text" style="width:auto">直接下载</span></span></a>');
            var $directbutton_menu = $('<span class="menu" style="width:120px;left:79px"></span>');
            var $directbutton_download_button = $('<a id="download-direct" class="g-button-menu" href="javascript:void(0);">下载</a>');
            var $directbutton_link_button = $('<a id="link-direct" class="g-button-menu" href="javascript:void(0);">显示链接</a>');
            var $directbutton_batchhttplink_button = $('<a id="batchhttplink-direct" class="g-button-menu" href="javascript:void(0);">批量链接(HTTP)</a>');
            var $directbutton_batchhttpslink_button = $('<a id="batchhttpslink-direct" class="g-button-menu" href="javascript:void(0);">批量链接(HTTPS)</a>');
            $directbutton_menu.append($directbutton_download_button).append($directbutton_link_button).append($directbutton_batchhttplink_button).append($directbutton_batchhttpslink_button);
            $directbutton.append($directbutton_span.append($directbutton_a).append($directbutton_menu));
            $directbutton.hover(function () {
                $directbutton_span.toggleClass('button-open');
            });
            $directbutton_download_button.click(downloadClick);
            $directbutton_link_button.click(linkClick);
            $directbutton_batchhttplink_button.click(batchClick);
            $directbutton_batchhttpslink_button.click(batchClick);

            var $apibutton = $('<span class="g-button-menu" style="display:block"></span>');
            var $apibutton_span = $('<span class="g-dropdown-button g-dropdown-button-second" menulevel="2"></span>');
            var $apibutton_a = $('<a class="g-button" href="javascript:void(0);"><span class="g-button-right"><span class="text" style="width:auto">API下载</span></span></a>');
            var $apibutton_menu = $('<span class="menu" style="width:120px;left:77px"></span>');
            var $apibutton_download_button = $('<a id="download-api" class="g-button-menu" href="javascript:void(0);">直接下载</a>');
            var $apibutton_batchhttplink_button = $('<a id="batchhttplink-api" class="g-button-menu" href="javascript:void(0);">显示链接</a>');
            var $setting_button = $('<a id="appid-setting" class="g-button-menu" href="javascript:void(0);">脚本配置</a>');
            $apibutton_menu.append($apibutton_download_button).append($apibutton_batchhttplink_button).append($setting_button);
            $apibutton.append($apibutton_span.append($apibutton_a).append($apibutton_menu));
            $apibutton.hover(function () {
                $apibutton_span.toggleClass('button-open');
            });
            $apibutton_download_button.click(downloadClick);
            $apibutton_batchhttplink_button.click(batchClick);
            $setting_button.click(setSetting);

            var $outerlinkbutton = $('<span class="g-button-menu" style="display:block"></span>');
            var $outerlinkbutton_span = $('<span class="g-dropdown-button g-dropdown-button-second" menulevel="2"></span>');
            var $outerlinkbutton_a = $('<a class="g-button" href="javascript:void(0);"><span class="g-button-right"><span class="text" style="width:auto">外链下载</span></span></a>');
            var $outerlinkbutton_menu = $('<span class="menu" style="width:120px;left:79px"></span>');
            var $outerlinkbutton_batchlink_button = $('<a id="batchlink-outerlink" class="g-button-menu" href="javascript:void(0);">显示链接</a>');
            $outerlinkbutton_menu.append($outerlinkbutton_batchlink_button);
            $outerlinkbutton.append($outerlinkbutton_span.append($outerlinkbutton_a).append($outerlinkbutton_menu));
            $outerlinkbutton.hover(function () {
                $outerlinkbutton_span.toggleClass('button-open');
            });
            $outerlinkbutton_batchlink_button.click(batchClick);

            var $github = $('<iframe src="https://ghbtns.com/github-btn.html?user=syhyz1990&repo=baiduyun&type=star&count=true" frameborder="0" scrolling="0" style="height: 20px;max-width: 120px;padding: 0 5px;box-sizing: border-box;margin-top: 5px;"></iframe>');
            //$dropdownbutton_span.append($directbutton).append($apibutton).append($outerlinkbutton);
            $dropdownbutton_span.append($apibutton).append($outerlinkbutton).append($github);
            $dropdownbutton.append($dropdownbutton_a).append($dropdownbutton_span);

            $dropdownbutton.hover(function () {
                $dropdownbutton.toggleClass('button-open');
            });

            $('.' + classMap['list-tools']).append($dropdownbutton);
            $('.' + classMap['list-tools']).css('height', '40px');
        }

        function setSetting() {
            var str = prompt('请输入神秘代码 , 不懂请勿输入 , 否则后果自负', secretCode);
            if(/^\d{1,6}$/.test(str)){
                GM_setValue('secretCode', str)
                alert('神秘代码执行成功 , 点击确定将自动刷新')
                history.go(0)
            }
        }

        // 我的网盘 - 下载
        function downloadClick(event) {
            slog('选中文件列表:', selectFileList);
            var id = event.target.id;
            var downloadLink;

            if (id == 'download-direct') {
                var downloadType;
                if (selectFileList.length === 0) {
                    alert(errorMsg.unselected);
                    return;
                } else if (selectFileList.length == 1) {
                    if (selectFileList[0].isdir === 1)
                        downloadType = 'batch';
                    else if (selectFileList[0].isdir === 0)
                        downloadType = 'dlink';
                } else if (selectFileList.length > 1) {
                    downloadType = 'batch';
                }

                fid_list = getFidList(selectFileList);
                var result = getDownloadLinkWithPanAPI(downloadType);
                if (result.errno === 0) {
                    if (downloadType == 'dlink')
                        downloadLink = result.dlink[0].dlink;
                    else if (downloadType == 'batch') {
                        downloadLink = result.dlink;
                        if (selectFileList.length === 1)
                            downloadLink = downloadLink + '&zipname=' + encodeURIComponent(selectFileList[0].filename) + '.zip';
                    } else {
                        alert("发生错误!");
                        return;
                    }
                } else if (result.errno == -1) {
                    alert('文件不存在或已被百度和谐,无法下载!');
                    return;
                } else if (result.errno == 112) {
                    alert("页面过期,请刷新重试!");
                    return;
                } else {
                    alert("发生错误!");
                    return;
                }
            } else {
                if (selectFileList.length === 0) {
                    alert("获取选中文件失败,请刷新重试!");
                    return;
                } else if (selectFileList.length > 1) {
                    alert(errorMsg.morethan2);
                    return;
                } else {
                    if (selectFileList[0].isdir == 1) {
                        alert(errorMsg.dir);
                        return;
                    }
                }
                if (id == 'download-api') {
                    downloadLink = getDownloadLinkWithRESTAPIBaidu(selectFileList[0].path);
                }
            }
            execDownload(downloadLink);
        }

        //我的网盘 - 显示链接
        function linkClick(event) {
            slog('选中文件列表:', selectFileList);
            var id = event.target.id;
            var linkList, tip;

            if (id.indexOf('direct') != -1) {
                var downloadType;
                var downloadLink;
                if (selectFileList.length === 0) {
                    alert(errorMsg.unselected);
                    return;
                } else if (selectFileList.length == 1) {
                    if (selectFileList[0].isdir === 1)
                        downloadType = 'batch';
                    else if (selectFileList[0].isdir === 0)
                        downloadType = 'dlink';
                } else if (selectFileList.length > 1) {
                    downloadType = 'batch';
                }
                fid_list = getFidList(selectFileList);
                var result = getDownloadLinkWithPanAPI(downloadType);
                if (result.errno === 0) {
                    if (downloadType == 'dlink')
                        downloadLink = result.dlink[0].dlink;
                    else if (downloadType == 'batch') {
                        slog(selectFileList);
                        downloadLink = result.dlink;
                        if (selectFileList.length === 1)
                            downloadLink = downloadLink + '&zipname=' + encodeURIComponent(selectFileList[0].filename) + '.zip';
                    } else {
                        alert("发生错误!");
                        return;
                    }
                } else if (result.errno == -1) {
                    alert('文件不存在或已被百度和谐,无法下载!');
                    return;
                } else if (result.errno == 112) {
                    alert("页面过期,请刷新重试!");
                    return;
                } else {
                    alert("发生错误!");
                    return;
                }
                var httplink = downloadLink.replace(/^([A-Za-z]+):/, 'http:');
                var httpslink = downloadLink.replace(/^([A-Za-z]+):/, 'https:');
                var filename = '';
                $.each(selectFileList, function (index, element) {
                    if (selectFileList.length == 1)
                        filename = element.filename;
                    else {
                        if (index == 0)
                            filename = element.filename;
                        else
                            filename = filename + ',' + element.filename;
                    }
                });
                linkList = {
                    filename: filename,
                    urls: [
                        {url: httplink, rank: 1},
                        {url: httpslink, rank: 2}
                    ]
                };
                tip = '显示模拟百度网盘网页获取的链接,可以使用右键迅雷或IDM下载,多文件打包(限300k)下载的链接可以直接复制使用';
                dialog.open({title: '下载链接', type: 'link', list: linkList, tip: tip});
            } else {
                if (selectFileList.length === 0) {
                    alert(errorMsg.unselected);
                    return;
                } else if (selectFileList.length > 1) {
                    alert(errorMsg.morethan2);
                    return;
                } else {
                    if (selectFileList[0].isdir == 1) {
                        alert(errorMsg.dir);
                        return;
                    }
                }
                if (id.indexOf('api') != -1) {
                    var downloadLink = getDownloadLinkWithRESTAPIBaidu(selectFileList[0].path);
                    var httplink = downloadLink.replace(/^([A-Za-z]+):/, 'http:');
                    var httpslink = downloadLink.replace(/^([A-Za-z]+):/, 'https:');
                    linkList = {
                        filename: selectFileList[0].filename,
                        urls: [
                            {url: httplink, rank: 1},
                            {url: httpslink, rank: 2}
                        ]
                    };

                    //linkList.urls.push({url: httpslink, rank: 4});
                    tip = '显示模拟APP获取的链接(使用百度云ID),可以右键使用迅雷或IDM下载,直接复制链接无效';
                    dialog.open({title: '下载链接', type: 'link', list: linkList, tip: tip});
                } else if (id.indexOf('outerlink') != -1) {
                    getDownloadLinkWithClientAPI(selectFileList[0].path, function (result) {
                        if (result.errno == 0) {
                            linkList = {
                                filename: selectFileList[0].filename,
                                urls: result.urls
                            };
                        } else if (result.errno == 1) {
                            alert('文件不存在!');
                            return;
                        } else if (result.errno == 2) {
                            alert('文件不存在或者已被百度和谐,无法下载!');
                            return;
                        } else {
                            alert('发生错误!');
                            return;
                        }
                        tip = '左键点击调用IDM下载(<b>复制链接无效</b>)';
                        dialog.open({
                            title: '下载链接',
                            type: 'GMlink',
                            list: linkList,
                            tip: tip,
                            showcopy: false,
                            showedit: false
                        });
                    });
                }
            }
        }

        // 我的网盘 - 批量下载
        function batchClick(event) {
            slog('选中文件列表:', selectFileList);
            if (selectFileList.length === 0) {
                alert(errorMsg.unselected);
                return;
            }
            var id = event.target.id;
            var linkType, tip;
            linkType = id.indexOf('https') == -1 ? (id.indexOf('http') == -1 ? location.protocol + ':' : 'http:') : 'https:';
            batchLinkList = [];
            batchLinkListAll = [];
            if (id.indexOf('direct') != -1) {
                batchLinkList = getDirectBatchLink(linkType);
                tip = '显示所有选中文件的直接下载链接,文件夹显示为打包下载的链接';
                if (batchLinkList.length === 0) {
                    alert('没有链接可以显示,API链接不要全部选中文件夹!');
                    return;
                }
                dialog.open({title: '批量链接', type: 'batch', list: batchLinkList, tip: tip, showcopy: true});
            } else if (id.indexOf('api') != -1) {
                batchLinkList = getAPIBatchLink(linkType);
                tip = '直接复制链接无效,请安装 IDM 及浏览器扩展后使用(<a href="https://github.com/syhyz1990/baiduyun/wiki/脚本使用说明" target="_blank">脚本使用说明</a>)';
                if (batchLinkList.length === 0) {
                    alert('没有链接可以显示,API链接不要全部选中文件夹!');
                    return;
                }
                dialog.open({title: '批量链接', type: 'batch', list: batchLinkList, tip: tip, showcopy: true});
            } else if (id.indexOf('outerlink') != -1) {
                getOuterlinkBatchLinkAll(function (batchLinkListAll) {
                    batchLinkList = getOuterlinkBatchLinkFirst(batchLinkListAll);
                    tip = '左键点击调用IDM下载,推荐all开头的地址(<b>复制链接无效</b>)';
                    if (batchLinkList.length === 0) {
                        alert('没有链接可以显示,API链接不要全部选中文件夹!');
                        return;
                    }

                    dialog.open({
                        title: '批量链接',
                        type: 'GMbatch',
                        list: batchLinkList,
                        tip: tip,
                        showcopy: true,
                        alllist: batchLinkListAll,
                        showall: true
                    });
                });
            }
        }

        function getDirectBatchLink(linkType) {
            var list = [];
            $.each(selectFileList, function (index, element) {
                var downloadType, downloadLink, result;
                if (element.isdir == 0)
                    downloadType = 'dlink';
                else
                    downloadType = 'batch';
                fid_list = getFidList([element]);
                result = getDownloadLinkWithPanAPI(downloadType);
                if (result.errno == 0) {
                    if (downloadType == 'dlink')
                        downloadLink = result.dlink[0].dlink;
                    else if (downloadType == 'batch')
                        downloadLink = result.dlink;
                    downloadLink = downloadLink.replace(/^([A-Za-z]+):/, linkType);
                } else {
                    downloadLink = 'error';
                }
                list.push({filename: element.filename, downloadlink: downloadLink});
            });
            return list;
        }

        function getAPIBatchLink(linkType) {
            var list = [];
            $.each(selectFileList, function (index, element) {
                if (element.isdir == 1)
                    return;
                var downloadLink;
                downloadLink = getDownloadLinkWithRESTAPIBaidu(element.path);
                downloadLink = downloadLink.replace(/^([A-Za-z]+):/, linkType);
                list.push({filename: element.filename, downloadlink: downloadLink});
            });
            return list;
        }

        function getOuterlinkBatchLinkAll(cb) {
            $.each(selectFileList, function (index, element) {
                if (element.isdir == 1)
                    return;
                getDownloadLinkWithClientAPI(element.path, function (result) {
                    var list = [];
                    if (result.errno == 0) {
                        list.push({filename: element.filename, links: result.urls});
                    } else {
                        list.push({filename: element.filename, links: [{rank: 1, url: 'error'}]});
                    }
                    cb(list)
                });
            });
        }

        function getOuterlinkBatchLinkFirst(list) {
            var result = [];
            $.each(list, function (index, element) {
                result.push({filename: element.filename, downloadlink: element.links[0].url});
            });
            return result;
        }

        function getSign() {
            var signFnc;
            try {
                signFnc = new Function("return " + yunData.sign2)();
            } catch (e) {
                throw new Error(e.message);
            }
            return base64Encode(signFnc(yunData.sign5, yunData.sign1));
        }

        //获取当前目录
        function getPath() {
            var hash = location.hash;
            var regx = new RegExp("path=([^&]*)(&|$)", 'i');
            var result = hash.match(regx);
            //console.log(result);
            return decodeURIComponent(result[1]);
        }

        //获取分类显示的类别,即地址栏中的type
        function getCategory() {
            var hash = location.hash;
            var regx = new RegExp("type=([^&]*)(&|$)", 'i');
            var result = hash.match(regx);
            return decodeURIComponent(result[1]);
        }

        function getSearchKey() {
            var hash = location.hash;
            var regx = new RegExp("key=([^&]*)(&|$)", 'i');
            var result = hash.match(regx);
            return decodeURIComponent(result[1]);
        }

        //获取当前页面(all或者category或search)
        function getCurrentPage() {
            var hash = location.hash;
            return hash.substring(hash.indexOf('#') + 2, hash.indexOf('?'));
        }

        //获取文件列表
        function getFileList() {
            var filelist = [];
            var listUrl = panAPIUrl + "list";
            var path = getPath();
            logid = getLogID();
            var params = {
                dir: path,
                bdstoken: bdstoken,
                logid: logid,
                order: 'size',
                desc: 0,
                clienttype: 0,
                showempty: 0,
                web: 1,
                channel: 'chunlei',
                appid: secretCode
            };

            $.ajax({
                url: listUrl,
                async: false,
                method: 'GET',
                data: params,
                success: function (response) {
                    filelist = 0 === response.errno ? response.list : [];
                }
            });
            return filelist;
        }

        //获取分类页面下的文件列表
        function getCategoryFileList() {
            var filelist = [];
            var listUrl = panAPIUrl + "categorylist";
            var category = getCategory();
            logid = getLogID();
            var params = {
                category: category,
                bdstoken: bdstoken,
                logid: logid,
                order: 'size',
                desc: 0,
                clienttype: 0,
                showempty: 0,
                web: 1,
                channel: 'chunlei',
                appid: secretCode
            };
            $.ajax({
                url: listUrl,
                async: false,
                method: 'GET',
                data: params,
                success: function (response) {
                    filelist = 0 === response.errno ? response.info : [];
                }
            });
            return filelist;
        }

        function getSearchFileList() {
            var filelist = [];
            var listUrl = panAPIUrl + 'search';
            logid = getLogID();
            searchKey = getSearchKey();
            var params = {
                recursion: 1,
                order: 'time',
                desc: 1,
                showempty: 0,
                web: 1,
                page: 1,
                num: 100,
                key: searchKey,
                channel: 'chunlei',
                app_id: 250258,
                bdstoken: bdstoken,
                logid: logid,
                clienttype: 0
            };
            $.ajax({
                url: listUrl,
                async: false,
                method: 'GET',
                data: params,
                success: function (response) {
                    filelist = 0 === response.errno ? response.list : [];
                }
            });
            return filelist;
        }

        //生成下载时的fid_list参数
        function getFidList(list) {
            var fidlist = null;
            if (list.length === 0)
                return null;
            var fileidlist = [];
            $.each(list, function (index, element) {
                fileidlist.push(element.fs_id);
            });
            fidlist = '[' + fileidlist + ']';
            return fidlist;
        }

        function getTimestamp() {
            return yunData.timestamp;
        }

        function getBDStoken() {
            return yunData.MYBDSTOKEN;
        }

        //获取直接下载地址
        //这个地址不是直接下载地址,访问这个地址会返回302,response header中的location才是真实下载地址
        //暂时没有找到提取方法
        function getDownloadLinkWithPanAPI(type) {
            var downloadUrl = panAPIUrl + "download";
            var result;
            logid = getLogID();
            var params = {
                sign: sign,
                timestamp: timestamp,
                fidlist: fid_list,
                type: type,
                channel: 'chunlei',
                web: 1,
                app_id: secretCode,
                bdstoken: bdstoken,
                logid: logid,
                clienttype: 0
            };
            $.ajax({
                url: downloadUrl,
                async: false,
                method: 'GET',
                data: params,
                success: function (response) {
                    result = response;
                }
            });
            return result;
        }

        function getDownloadLinkWithRESTAPIBaidu(path) {
            var link = restAPIUrl + 'file?method=download&path=' + encodeURIComponent(path) + '&random=' + Math.random() + '&app_id=' + secretCode;
            return link;
        }

        function getDownloadLinkWithClientAPI(path, cb) {
            var result;
            var url = clientAPIUrl + 'file?method=locatedownload&app_id='+secretCode+'&ver=4.0&path=' + encodeURIComponent(path);

            GM_xmlhttpRequest({
                method: "POST",
                url: url,
                headers: {
                    "User-Agent": "netdisk;6.7.1.9;PC;PC-Windows;10.0.17763;WindowsBaiduYunGuanJia",
                },
                onload: function (res) {
                    if (res.status === 200) {
                        result = JSON.parse(res.responseText);
                        if (result.error_code == undefined) {
                            if (result.urls == undefined) {
                                result.errno = 2;
                            } else {
                                $.each(result.urls, function (index, element) {
                                    result.urls[index].url = element.url.replace('\\', '');
                                });
                                result.errno = 0;
                            }
                        } else if (result.error_code == 31066) {
                            result.errno = 1;
                        } else {
                            result.errno = -1;
                        }
                    } else {
                        result = {};
                        result.errno = -1;
                    }
                    cb(result)
                }
            });
        }

        function execDownload(link) {
            slog("下载链接:" + link);
            $('#helperdownloadiframe').attr('src', link);
        }

        function createIframe() {
            var $div = $('<div class="helper-hide" style="padding:0;margin:0;display:block"></div>');
            var $iframe = $('<iframe src="javascript:void(0)" id="helperdownloadiframe" style="display:none"></iframe>');
            $div.append($iframe);
            $('body').append($div);

        }
    }

    //分享页面的下载助手
    function PanShareHelper() {
        var yunData, sign, timestamp, bdstoken, channel, clienttype, web, app_id, logid, encrypt, product, uk,
            primaryid, fid_list, extra, shareid;
        var vcode;
        var shareType, buttonTarget, currentPath, list_grid_status, observer, dialog, vcodeDialog;
        var fileList = [], selectFileList = [];
        var panAPIUrl = location.protocol + "//" + location.host + "/api/";
        var shareListUrl = location.protocol + "//" + location.host + "/share/list";

        this.init = function () {
            yunData = unsafeWindow.yunData;
            slog('yunData:', yunData);
            if (yunData === undefined || yunData.FILEINFO == null) {
                slog('页面未正常加载,或者百度已经更新!');
                return;
            }
            initParams();
            addButton();
            dialog = new Dialog({addCopy: false});
            vcodeDialog = new VCodeDialog(refreshVCode, confirmClick);
            createIframe();

            if (!isSingleShare()) {
                registerEventListener();
                createObserver();
            }

            slog('分享助手加载成功!');
        };

        function initParams() {
            shareType = getShareType();
            sign = yunData.SIGN;
            timestamp = yunData.TIMESTAMP;
            bdstoken = yunData.MYBDSTOKEN;
            channel = 'chunlei';
            clienttype = 0;
            web = 1;
            app_id = secretCode;
            logid = getLogID();
            encrypt = 0;
            product = 'share';
            primaryid = yunData.SHARE_ID;
            uk = yunData.SHARE_UK;

            if (shareType == 'secret') {
                extra = getExtra();
            }
            if (isSingleShare()) {
                var obj = {};
                if (yunData.CATEGORY == 2) {
                    obj.filename = yunData.FILENAME;
                    obj.path = yunData.PATH;
                    obj.fs_id = yunData.FS_ID;
                    obj.isdir = 0;
                } else {
                    obj.filename = yunData.FILEINFO[0].server_filename,
                        obj.path = yunData.FILEINFO[0].path,
                        obj.fs_id = yunData.FILEINFO[0].fs_id,
                        obj.isdir = yunData.FILEINFO[0].isdir
                }
                selectFileList.push(obj);
            } else {
                shareid = yunData.SHARE_ID;
                currentPath = getPath();
                list_grid_status = getListGridStatus();
                fileList = getFileList();
            }
        }

        //判断分享类型(public或者secret)
        function getShareType() {
            return yunData.SHARE_PUBLIC === 1 ? 'public' : 'secret';
        }

        //判断是单个文件分享还是文件夹或者多文件分享
        function isSingleShare() {
            return yunData.getContext === undefined ? true : false;
        }

        //判断是否为自己的分享链接
        function isSelfShare() {
            return yunData.MYSELF == 1 ? true : false;
        }

        function getExtra() {
            var seKey = decodeURIComponent(getCookie('BDCLND'));
            return '{' + '"sekey":"' + seKey + '"' + "}";
        }

        //获取当前目录
        function getPath() {
            var hash = location.hash;
            var regx = new RegExp("path=([^&]*)(&|$)", 'i');
            var result = hash.match(regx);
            return decodeURIComponent(result[1]);
        }

        //获取当前的视图模式
        function getListGridStatus() {
            var status = 'list';
            if ($('.list-switched-on').length > 0) {
                status = 'list';
            } else if ($('.grid-switched-on').length > 0) {
                status = 'grid';
            }
            return status;
        }

        //添加下载助手按钮
        function addButton() {
            if (isSingleShare()) {
                $('div.slide-show-right').css('width', '500px');
                $('div.frame-main').css('width', '96%');
                $('div.share-file-viewer').css('width', '740px').css('margin-left', 'auto').css('margin-right', 'auto');
            } else
                $('div.slide-show-right').css('width', '500px');
            var $dropdownbutton = $('<span class="g-dropdown-button"></span>');
            var $dropdownbutton_a = $('<a class="g-button g-button-blue" data-button-id="b200" data-button-index="200" href="javascript:void(0);"></a>');
            var $dropdownbutton_a_span = $('<span class="g-button-right"><em class="icon icon-speed" title="百度网盘下载助手"></em><span class="text" style="width: 60px;">下载助手</span></span>');
            var $dropdownbutton_span = $('<span class="menu" style="width:auto;z-index:41"></span>');

            var $downloadButton = $('<a data-menu-id="b-menu207" class="g-button-menu" href="javascript:void(0);">直接下载</a>');
            var $linkButton = $('<a data-menu-id="b-menu208" class="g-button-menu" href="javascript:void(0);">显示链接</a>');

            var $github = $('<iframe src="https://ghbtns.com/github-btn.html?user=syhyz1990&repo=baiduyun&type=star&count=true" frameborder="0" scrolling="0" style="height: 20px;max-width: 108px;padding: 0 5px;box-sizing: border-box;margin-top: 5px;"></iframe>');

            $dropdownbutton_span.append($downloadButton).append($linkButton).append($github);
            $dropdownbutton_a.append($dropdownbutton_a_span);
            $dropdownbutton.append($dropdownbutton_a).append($dropdownbutton_span);

            $dropdownbutton.hover(function () {
                $dropdownbutton.toggleClass('button-open');
            });

            $downloadButton.click(function () {
                alert('温馨提示 : 百度接口限制, 请先保存到自己网盘 , 去网盘中使用下载助手!!!')
            });
            $linkButton.click(function () {
                alert('温馨提示 : 百度接口限制, 请先保存到自己网盘 , 去网盘中使用下载助手!!!')
            });
            //$downloadButton.click(downloadButtonClick);
            //$linkButton.click(linkButtonClick);

            $('div.module-share-top-bar div.bar div.x-button-box').append($dropdownbutton);
        }

        function createIframe() {
            var $div = $('<div class="helper-hide" style="padding:0;margin:0;display:block"></div>');
            var $iframe = $('<iframe src="javascript:void(0)" id="helperdownloadiframe" style="display:none"></iframe>');
            $div.append($iframe);
            $('body').append($div);
        }

        function registerEventListener() {
            registerHashChange();
            registerListGridStatus();
            registerCheckbox();
            registerAllCheckbox();
            registerFileSelect();
        }

        //监视地址栏#标签变化
        function registerHashChange() {
            window.addEventListener('hashchange', function (e) {
                list_grid_status = getListGridStatus();
                if (currentPath == getPath()) {

                } else {
                    currentPath = getPath();
                    refreshFileList();
                    refreshSelectFileList();
                }
            });
        }

        function refreshFileList() {
            fileList = getFileList();
        }

        function refreshSelectFileList() {
            selectFileList = [];
        }

        //监视视图变化
        function registerListGridStatus() {
            var $a_list = $('a[data-type=list]');
            $a_list.click(function () {
                list_grid_status = 'list';
            });

            var $a_grid = $('a[data-type=grid]');
            $a_grid.click(function () {
                list_grid_status = 'grid';
            });
        }

        //监视文件选择框
        function registerCheckbox() {
            var $checkbox = $('span.' + classMap['checkbox']);
            if (list_grid_status == 'grid') {
                $checkbox = $('.' + classMap['chekbox-grid']);
            }
            $checkbox.each(function (index, element) {
                $(element).bind('click', function (e) {
                    var $parent = $(this).parent();
                    var filename;
                    var isActive;

                    if (list_grid_status == 'list') {
                        filename = $('div.file-name div.text a', $parent).attr('title');
                        isActive = $(this).parents('dd').hasClass('JS-item-active')
                    } else if (list_grid_status == 'grid') {
                        filename = $('div.file-name a', $(this)).attr('title');
                        isActive = !$(this).hasClass('JS-item-active')
                    }

                    if (isActive) {
                        slog('取消选中文件:' + filename);
                        for (var i = 0; i < selectFileList.length; i++) {
                            if (selectFileList[i].filename == filename) {
                                selectFileList.splice(i, 1);
                            }
                        }
                    } else {
                        slog('选中文件: ' + filename);
                        $.each(fileList, function (index, element) {
                            if (element.server_filename == filename) {
                                var obj = {
                                    filename: element.server_filename,
                                    path: element.path,
                                    fs_id: element.fs_id,
                                    isdir: element.isdir
                                };
                                selectFileList.push(obj);
                            }
                        });
                    }
                });
            });
        }

        function unregisterCheckbox() {
            var $checkbox = $('span.' + classMap['checkbox']);
            $checkbox.each(function (index, element) {
                $(element).unbind('click');
            });
        }

        //监视全选框
        function registerAllCheckbox() {
            var $checkbox = $('div.' + classMap['col-item'] + '.' + classMap['check']);
            $checkbox.each(function (index, element) {
                $(element).bind('click', function (e) {
                    var $parent = $(this).parent();
                    if ($parent.hasClass(classMap['checked'])) {
                        slog('取消全选');
                        selectFileList = [];
                    } else {
                        slog('全部选中');
                        selectFileList = [];
                        $.each(fileList, function (index, element) {
                            var obj = {
                                filename: element.server_filename,
                                path: element.path,
                                fs_id: element.fs_id,
                                isdir: element.isdir
                            };
                            selectFileList.push(obj);
                        });
                    }
                });
            });
        }

        function unregisterAllCheckbox() {
            var $checkbox = $('div.' + classMap['col-item'] + '.' + classMap['check']);
            $checkbox.each(function (index, element) {
                $(element).unbind('click');
            });
        }

        //监视单个文件选中
        function registerFileSelect() {
            var $dd = $('div.' + classMap['list-view'] + ' dd');
            $dd.each(function (index, element) {
                $(element).bind('click', function (e) {
                    var nodeName = e.target.nodeName.toLowerCase();
                    if (nodeName != 'span' && nodeName != 'a' && nodeName != 'em') {
                        selectFileList = [];
                        var filename = $('div.file-name div.text a', $(this)).attr('title');
                        slog('选中文件:' + filename);
                        $.each(fileList, function (index, element) {
                            if (element.server_filename == filename) {
                                var obj = {
                                    filename: element.server_filename,
                                    path: element.path,
                                    fs_id: element.fs_id,
                                    isdir: element.isdir
                                };
                                selectFileList.push(obj);
                            }
                        });
                    }
                });
            });
        }

        function unregisterFileSelect() {
            var $dd = $('div.' + classMap['list-view'] + ' dd');
            $dd.each(function (index, element) {
                $(element).unbind('click');
            });
        }

        //监视文件列表显示变化
        function createObserver() {
            var MutationObserver = window.MutationObserver;
            var options = {
                'childList': true
            };
            observer = new MutationObserver(function (mutations) {
                unregisterCheckbox();
                unregisterAllCheckbox();
                unregisterFileSelect();
                registerCheckbox();
                registerAllCheckbox();
                registerFileSelect();
            });

            var list_view = document.querySelector('.' + classMap['list-view']);
            var grid_view = document.querySelector('.' + classMap['grid-view']);

            observer.observe(list_view, options);
            observer.observe(grid_view, options);
        }

        //获取文件信息列表
        function getFileList() {
            var result = [];
            if (getPath() == '/') {
                result = yunData.FILEINFO;
            } else {
                logid = getLogID();
                var params = {
                    uk: uk,
                    shareid: shareid,
                    order: 'other',
                    desc: 1,
                    showempty: 0,
                    web: web,
                    dir: getPath(),
                    t: Math.random(),
                    bdstoken: bdstoken,
                    channel: channel,
                    clienttype: clienttype,
                    app_id: app_id,
                    logid: logid
                };
                $.ajax({
                    url: shareListUrl,
                    method: 'GET',
                    async: false,
                    data: params,
                    success: function (response) {
                        if (response.errno === 0) {
                            result = response.list;
                        }
                    }
                });
            }
            return result;
        }

        function downloadButtonClick() {
            slog('选中文件列表:', selectFileList);
            if (selectFileList.length === 0) {
                alert(errorMsg.unselected);
                return;
            }
            if (selectFileList.length > 1) {
                return alert(errorMsg.morethan2);
            }

            if (selectFileList[0].isdir == 1) {
                return alert(errorMsg.dir);
            }
            buttonTarget = 'download';
            var downloadLink = getDownloadLink();

            if (downloadLink === undefined) return;

            if (downloadLink.errno == -20) {
                vcode = getVCode();
                if (vcode.errno !== 0) {
                    alert('获取验证码失败!');
                    return;
                }
                vcodeDialog.open(vcode);
            } else if (downloadLink.errno == 112) {
                alert('页面过期,请刷新重试');

            } else if (downloadLink.errno === 0) {
                var link = downloadLink.list[0].dlink;
                execDownload(link);
            } else {
                alert(errorMsg.fail);

            }
        }

        //获取验证码
        function getVCode() {
            var url = panAPIUrl + 'getvcode';
            var result;
            logid = getLogID();
            var params = {
                prod: 'pan',
                t: Math.random(),
                bdstoken: bdstoken,
                channel: channel,
                clienttype: clienttype,
                web: web,
                app_id: app_id,
                logid: logid
            };
            $.ajax({
                url: url,
                method: 'GET',
                async: false,
                data: params,
                success: function (response) {
                    result = response;
                }
            });
            return result;
        }

        //刷新验证码
        function refreshVCode() {
            vcode = getVCode();
            $('#dialog-img').attr('src', vcode.img);
        }

        //验证码确认提交
        function confirmClick() {
            var val = $('#dialog-input').val();
            if (val.length === 0) {
                $('#dialog-err').text('请输入验证码');
                return;
            } else if (val.length < 4) {
                $('#dialog-err').text('验证码输入错误,请重新输入');
                return;
            }
            var result = getDownloadLinkWithVCode(val);
            if (result.errno == -20) {
                vcodeDialog.close();
                $('#dialog-err').text('验证码输入错误,请重新输入');
                refreshVCode();
                if (!vcode || vcode.errno !== 0) {
                    alert('获取验证码失败!');
                    return;
                }
                vcodeDialog.open();
            } else if (result.errno === 0) {
                vcodeDialog.close();
                if (buttonTarget == 'download') {
                    if (result.list.length > 1 || result.list[0].isdir == 1) {
                        return alert(errorMsg.morethan2);
                    }
                    var link = result.list[0].dlink;
                    execDownload(link);
                } else if (buttonTarget == 'link') {
                    var tip = '直接复制链接无效,请安装 IDM 及浏览器扩展后使用(<a href="https://github.com/syhyz1990/baiduyun/wiki/脚本使用说明" target="_blank">脚本使用说明</a>)';
                    dialog.open({title: '下载链接(仅显示文件链接)', type: 'shareLink', list: result.list, tip: tip});
                }
            } else {
                alert('发生错误!');

            }
        }

        //生成下载用的fid_list参数
        function getFidList() {
            var fidlist = [];
            $.each(selectFileList, function (index, element) {
                fidlist.push(element.fs_id);
            });
            return '[' + fidlist + ']';
        }

        function linkButtonClick() {
            slog('选中文件列表:', selectFileList);
            if (selectFileList.length === 0) {
                return alert(errorMsg.unselected);
            }
            if (selectFileList[0].isdir == 1) {
                return alert(errorMsg.dir);
            }

            buttonTarget = 'link';
            var downloadLink = getDownloadLink();

            if (downloadLink === undefined) return;

            if (downloadLink.errno == -20) {
                vcode = getVCode();
                if (!vcode || vcode.errno !== 0) {
                    return alert('获取验证码失败!');
                }
                vcodeDialog.open(vcode);
            } else if (downloadLink.errno == 112) {
                return alert('页面过期,请刷新重试');
            } else if (downloadLink.errno === 0) {
                var tip = "显示获取的链接,可以使用右键迅雷或IDM下载,复制无用,需要传递cookie";
                dialog.open({title: '下载链接(仅显示文件链接)', type: 'shareLink', list: downloadLink.list, tip: tip});
            } else {
                alert(errorMsg.fail);
            }
        }

        //获取下载链接
        function getDownloadLink() {
            if (bdstoken === null) {
                alert(errorMsg.unlogin);
                return '';
            } else {
                var result;
                if (isSingleShare) {
                    fid_list = getFidList();
                    logid = getLogID();
                    var url = panAPIUrl + 'sharedownload?sign=' + sign + '&timestamp=' + timestamp + '&bdstoken=' + bdstoken + '&channel=' + channel + '&clienttype=' + clienttype + '&web=' + web + '&app_id=' + app_id + '&logid=' + logid;
                    var params = {
                        encrypt: encrypt,
                        product: product,
                        uk: uk,
                        primaryid: primaryid,
                        fid_list: fid_list
                    };
                    if (shareType == 'secret') {
                        params.extra = extra;
                    }
                    /*if (selectFileList[0].isdir == 1 || selectFileList.length > 1) {
                      params.type = 'batch';
                    }*/
                    $.ajax({
                        url: url,
                        method: 'POST',
                        async: false,
                        data: params,
                        success: function (response) {
                            result = response;
                        }
                    });
                }
                return result;
            }
        }

        //有验证码输入时获取下载链接
        function getDownloadLinkWithVCode(vcodeInput) {
            var result;
            if (isSingleShare) {
                fid_list = getFidList();
                var url = panAPIUrl + 'sharedownload?sign=' + sign + '&timestamp=' + timestamp + '&bdstoken=' + bdstoken + '&channel=' + channel + '&clienttype=' + clienttype + '&web=' + web + '&app_id=' + app_id + '&logid=' + logid;
                var params = {
                    encrypt: encrypt,
                    product: product,
                    vcode_input: vcodeInput,
                    vcode_str: vcode.vcode,
                    uk: uk,
                    primaryid: primaryid,
                    fid_list: fid_list
                };
                if (shareType == 'secret') {
                    params.extra = extra;
                }
                /*if (selectFileList[0].isdir == 1 || selectFileList.length > 1) {
                  params.type = 'batch';
                }*/
                $.ajax({
                    url: url,
                    method: 'POST',
                    async: false,
                    data: params,
                    success: function (response) {
                        result = response;
                    }
                });
            }
            return result;
        }

        function execDownload(link) {
            slog('下载链接:' + link);
            $('#helperdownloadiframe').attr('src', link);
        }
    }

    function base64Encode(t) {
        var a, r, e, n, i, s, o = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
        for (e = t.length, r = 0, a = ""; e > r;) {
            if (n = 255 & t.charCodeAt(r++), r == e) {
                a += o.charAt(n >> 2);
                a += o.charAt((3 & n) << 4);
                a += "==";
                break;
            }
            if (i = t.charCodeAt(r++), r == e) {
                a += o.charAt(n >> 2);
                a += o.charAt((3 & n) << 4 | (240 & i) >> 4);
                a += o.charAt((15 & i) << 2);
                a += "=";
                break;
            }
            s = t.charCodeAt(r++);
            a += o.charAt(n >> 2);
            a += o.charAt((3 & n) << 4 | (240 & i) >> 4);
            a += o.charAt((15 & i) << 2 | (192 & s) >> 6);
            a += o.charAt(63 & s);
        }
        return a;
    }

    function detectPage() {
        var regx = /[\/].+[\/]/g;
        var page = location.pathname.match(regx);
        return page[0].replace(/\//g, '');
    }

    function getCookie(e) {
        var o, t;
        var n = document, c = decodeURI;
        return n.cookie.length > 0 && (o = n.cookie.indexOf(e + "="), -1 != o) ? (o = o + e.length + 1, t = n.cookie.indexOf(";", o), -1 == t && (t = n.cookie.length), c(n.cookie.substring(o, t))) : "";
    }

    function getLogID() {
        var name = "BAIDUID";
        var u = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/~!@#¥%……&";
        var d = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g;
        var f = String.fromCharCode;

        function l(e) {
            if (e.length < 2) {
                var n = e.charCodeAt(0);
                return 128 > n ? e : 2048 > n ? f(192 | n >>> 6) + f(128 | 63 & n) : f(224 | n >>> 12 & 15) + f(128 | n >>> 6 & 63) + f(128 | 63 & n);
            }
            var n = 65536 + 1024 * (e.charCodeAt(0) - 55296) + (e.charCodeAt(1) - 56320);
            return f(240 | n >>> 18 & 7) + f(128 | n >>> 12 & 63) + f(128 | n >>> 6 & 63) + f(128 | 63 & n);
        }

        function g(e) {
            return (e + "" + Math.random()).replace(d, l);
        }

        function m(e) {
            var n = [0, 2, 1][e.length % 3];
            var t = e.charCodeAt(0) << 16 | (e.length > 1 ? e.charCodeAt(1) : 0) << 8 | (e.length > 2 ? e.charCodeAt(2) : 0);
            var o = [u.charAt(t >>> 18), u.charAt(t >>> 12 & 63), n >= 2 ? "=" : u.charAt(t >>> 6 & 63), n >= 1 ? "=" : u.charAt(63 & t)];
            return o.join("");
        }

        function h(e) {
            return e.replace(/[\s\S]{1,3}/g, m);
        }

        function p() {
            return h(g((new Date()).getTime()));
        }

        function w(e, n) {
            return n ? p(String(e)).replace(/[+\/]/g, function (e) {
                return "+" == e ? "-" : "_";
            }).replace(/=/g, "") : p(String(e));
        }

        return w(getCookie(name));
    }

    function Dialog() {
        var linkList = [];
        var showParams;
        var dialog, shadow;

        function createDialog() {
            var screenWidth = document.body.clientWidth;
            var dialogLeft = screenWidth > 800 ? (screenWidth - 800) / 2 : 0;
            var $dialog_div = $('<div class="dialog" style="width: 800px; top: 0px; bottom: auto; left: ' + dialogLeft + 'px; right: auto; display: hidden; visibility: visible; z-index: 52;"></div>');
            var $dialog_header = $('<div class="dialog-header"><h3><span class="dialog-title" style="display:inline-block;width:740px;white-space:nowrap;overflow-x:hidden;text-overflow:ellipsis"></span></h3></div>');
            var $dialog_control = $('<div class="dialog-control"><span class="dialog-icon dialog-close">×</span></div>');
            var $dialog_body = $('<div class="dialog-body" style="max-height:450px;overflow-y:auto;padding:0 20px;"></div>');
            var $dialog_tip = $('<div class="dialog-tip" style="padding-left:20px;background-color:#fff;border-top: 1px solid #c4dbfe;color: #dc373c;"><p></p></div>');

            $dialog_div.append($dialog_header.append($dialog_control)).append($dialog_body);

            //var $dialog_textarea = $('<textarea class="dialog-textarea" style="display:none;width"></textarea>');
            var $dialog_radio_div = $('<div class="dialog-radio" style="display:none;width:760px;padding-left:20px;padding-right:20px"></div>');
            var $dialog_radio_multi = $('<input type="radio" name="showmode" checked="checked" value="multi"><span>多行</span>');
            var $dialog_radio_single = $('<input type="radio" name="showmode" value="single"><span>单行</span>');
            $dialog_radio_div.append($dialog_radio_multi).append($dialog_radio_single);
            $dialog_div.append($dialog_radio_div);
            $('input[type=radio][name=showmode]', $dialog_radio_div).change(function () {
                var value = this.value;
                var $textarea = $('div.dialog-body textarea[name=dialog-textarea]', dialog);
                var content = $textarea.val();
                if (value == 'multi') {
                    content = content.replace(/\s+/g, '\n');
                    $textarea.css('height', '300px');
                } else if (value == 'single') {
                    content = content.replace(/\n+/g, ' ');
                    $textarea.css('height', '');
                }
                $textarea.val(content);
            });

            var $dialog_button = $('<div class="dialog-button" style="display:none"></div>');
            var $dialog_button_div = $('<div style="display:table;margin:auto"></div>');
            var $dialog_copy_button = $('<button id="dialog-copy-button" style="display:none;width: 100px; margin: 5px 0 10px 0; cursor: pointer; background: #cc3235; border: none; height: 30px; color: #fff; border-radius: 3px;">直接复制无效</button>');
            var $dialog_edit_button = $('<button id="dialog-edit-button" style="display:none">编辑</button>');
            var $dialog_exit_button = $('<button id="dialog-exit-button" style="display:none">退出</button>');

            $dialog_button_div.append($dialog_copy_button).append($dialog_edit_button).append($dialog_exit_button);
            $dialog_button.append($dialog_button_div);
            $dialog_div.append($dialog_button);

            $dialog_copy_button.click(function () {
                var content = '';
                if (showParams.type == 'batch') {
                    $.each(linkList, function (index, element) {
                        if (element.downloadlink == 'error')
                            return;
                        if (index == linkList.length - 1)
                            content = content + element.downloadlink;
                        else
                            content = content + element.downloadlink + '\n';
                    });
                } else if (showParams.type == 'link') {
                    $.each(linkList, function (index, element) {
                        if (element.url == 'error')
                            return;
                        if (index == linkList.length - 1)
                            content = content + element.url;
                        else
                            content = content + element.url + '\n';
                    });
                }
                GM_setClipboard(content, 'text');
                alert('已将链接复制到剪贴板!');
            });

            $dialog_edit_button.click(function () {
                var $dialog_textarea = $('div.dialog-body textarea[name=dialog-textarea]', dialog);
                var $dialog_item = $('div.dialog-body div', dialog);
                $dialog_item.hide();
                $dialog_copy_button.hide();
                $dialog_edit_button.hide();
                $dialog_textarea.show();
                $dialog_radio_div.show();
                $dialog_exit_button.show();
            });

            $dialog_exit_button.click(function () {
                var $dialog_textarea = $('div.dialog-body textarea[name=dialog-textarea]', dialog);
                var $dialog_item = $('div.dialog-body div', dialog);
                $dialog_textarea.hide();
                $dialog_radio_div.hide();
                $dialog_item.show();
                $dialog_exit_button.hide();
                $dialog_copy_button.show();
                $dialog_edit_button.show();
            });

            $dialog_div.append($dialog_tip);
            $('body').append($dialog_div);
            $dialog_div.dialogDrag();
            $dialog_control.click(dialogControl);
            return $dialog_div;
        }

        function createShadow() {
            var $shadow = $('<div class="dialog-shadow" style="position: fixed; left: 0px; top: 0px; z-index: 50; background: rgb(0, 0, 0) none repeat scroll 0% 0%; opacity: 0.5; width: 100%; height: 100%; display: none;"></div>');
            $('body').append($shadow);
            return $shadow;
        }

        this.open = function (params) {
            $('body').on('click', '.GMlink', function (event) {
                event.preventDefault();
                var link = $(this)[0].innerText;
                GM_download({
                    url: link,
                    name: '非IDM下载请自己改后缀名.zip',
                    headers: {
                        "User-Agent": "netdisk;6.7.1.9;PC;PC-Windows;10.0.17763;WindowsBaiduYunGuanJia",
                    }
                });

                return false;
            });

            showParams = params;
            linkList = [];
            if (params.type == 'link' || params.type == 'GMlink') {
                linkList = params.list.urls;
                $('div.dialog-header h3 span.dialog-title', dialog).text(params.title + ":" + params.list.filename);
                $.each(params.list.urls, function (index, element) {
                    if (params.type == 'GMlink') {
                        var $div = $('<div><div style="width:30px;float:left">' + element.rank + ':</div><div style="white-space:nowrap;overflow:hidden;text-overflow:ellipsis"><a class="GMlink" href="' + element.url + '">' + element.url + '</a></div></div>');
                    } else {
                        var $div = $('<div><div style="width:30px;float:left">' + element.rank + ':</div><div style="white-space:nowrap;overflow:hidden;text-overflow:ellipsis"><a href="' + element.url + '">' + element.url + '</a></div></div>');
                    }

                    $('div.dialog-body', dialog).append($div);
                });
            }
            if (params.type == 'batch' || params.type == 'GMbatch') {
                linkList = params.list;
                $('div.dialog-header h3 span.dialog-title', dialog).text(params.title);
                if (params.showall) {
                    $.each(params.list, function (index, element) {
                        var $item_div = $('<div class="item-container" style="overflow:hidden;text-overflow:ellipsis;white-space:nowrap"></div>');
                        var $item_name = $('<div style="width:100px;float:left;overflow:hidden;text-overflow:ellipsis" title="' + element.filename + '">' + element.filename + '</div>');
                        var $item_sep = $('<div style="width:12px;float:left"><span>:</span></div>');
                        var $item_link_div = $('<div class="item-link" style="float:left;width:618px;"></div>');
                        var $item_first = $('<div class="item-first" style="overflow:hidden;text-overflow:ellipsis"><a href="' + element.downloadlink + '">' + element.downloadlink + '</a></div>');
                        $item_link_div.append($item_first);
                        $.each(params.alllist[index].links, function (n, item) {
                            if (element.downloadlink == item.url)
                                return;
                            if (params.type == 'GMbatch') {
                                var $item = $('<div class="item-ex" style="display:none;overflow:hidden;text-overflow:ellipsis"><a class="GMlink" href="' + item.url + '">' + item.url + '</a></div>');
                            } else {
                                var $item = $('<div class="item-ex" style="display:none;overflow:hidden;text-overflow:ellipsis"><a href="' + item.url + '">' + item.url + '</a></div>');
                            }

                            $item_link_div.append($item);
                        });
                        var $item_ex = $('<div style="width:15px;float:left;cursor:pointer;text-align:center;font-size:16px"><span>+</span></div>');
                        $item_div.append($item_name).append($item_sep).append($item_link_div).append($item_ex);
                        $item_ex.click(function () {
                            var $parent = $(this).parent();
                            $parent.toggleClass('showall');
                            if ($parent.hasClass('showall')) {
                                $(this).text('-');
                                $('div.item-link div.item-ex', $parent).show();
                            } else {
                                $(this).text('+');
                                $('div.item-link div.item-ex', $parent).hide();
                            }
                        });
                        $('div.dialog-body', dialog).append($item_div);
                    });
                } else {
                    $.each(params.list, function (index, element) {
                        var $div = $('<div style="overflow:hidden;text-overflow:ellipsis;white-space:nowrap"><div style="width:100px;float:left;overflow:hidden;text-overflow:ellipsis" title="' + element.filename + '">' + element.filename + '</div><span>:</span><a href="' + element.downloadlink + '">' + element.downloadlink + '</a></div>');
                        $('div.dialog-body', dialog).append($div);
                    });
                }
            }
            if (params.type == 'shareLink') {
                linkList = params.list;
                $('div.dialog-header h3 span.dialog-title', dialog).text(params.title);
                $.each(params.list, function (index, element) {
                    if (element.isdir == 1) return;
                    var $div = $('<div style="overflow:hidden;text-overflow:ellipsis;white-space:nowrap"><div style="width:100px;float:left;overflow:hidden;text-overflow:ellipsis" title="' + element.server_filename + '">' + element.server_filename + '</div><span>:</span><a href="' + element.dlink + '">' + element.dlink + '</a></div>');
                    $('div.dialog-body', dialog).append($div);
                });
            }

            if (params.tip) {
                $('div.dialog-tip p', dialog).html(params.tip);
            }

            if (params.showcopy) {
                $('div.dialog-button', dialog).show();
                $('div.dialog-button button#dialog-copy-button', dialog).show();
            }
            if (params.showedit) {
                $('div.dialog-button', dialog).show();
                $('div.dialog-button button#dialog-edit-button', dialog).show();
                var $dialog_textarea = $('<textarea name="dialog-textarea" style="display:none;resize:none;width:758px;height:300px;white-space:pre;word-wrap:normal;overflow-x:scroll"></textarea>');
                var content = '';
                if (showParams.type == 'batch') {
                    $.each(linkList, function (index, element) {
                        if (element.downloadlink == 'error')
                            return;
                        if (index == linkList.length - 1)
                            content = content + element.downloadlink;
                        else
                            content = content + element.downloadlink + '\n';
                    });
                } else if (showParams.type == 'link') {
                    $.each(linkList, function (index, element) {
                        if (element.url == 'error')
                            return;
                        if (index == linkList.length - 1)
                            content = content + element.url;
                        else
                            content = content + element.url + '\n';
                    });
                }
                $dialog_textarea.val(content);
                $('div.dialog-body', dialog).append($dialog_textarea);
            }

            shadow.show();
            dialog.show();
        };

        this.close = function () {
            dialogControl();
        };

        function dialogControl() {
            $('div.dialog-body', dialog).children().remove();
            $('div.dialog-header h3 span.dialog-title', dialog).text('');
            $('div.dialog-tip p', dialog).text('');
            $('div.dialog-button', dialog).hide();
            $('div.dialog-radio input[type=radio][name=showmode][value=multi]', dialog).prop('checked', true);
            $('div.dialog-radio', dialog).hide();
            $('div.dialog-button button#dialog-copy-button', dialog).hide();
            $('div.dialog-button button#dialog-edit-button', dialog).hide();
            $('div.dialog-button button#dialog-exit-button', dialog).hide();
            dialog.hide();
            shadow.hide();
        }

        dialog = createDialog();
        shadow = createShadow();
    }

    function VCodeDialog(refreshVCode, confirmClick) {
        var dialog, shadow;

        function createDialog() {
            var screenWidth = document.body.clientWidth;
            var dialogLeft = screenWidth > 520 ? (screenWidth - 520) / 2 : 0;
            var $dialog_div = $('<div class="dialog" id="dialog-vcode" style="width:520px;top:0px;bottom:auto;left:' + dialogLeft + 'px;right:auto;display:none;visibility:visible;z-index:52"></div>');
            var $dialog_header = $('<div class="dialog-header"><h3><span class="dialog-header-title"><em class="select-text">提示</em></span></h3></div>');
            var $dialog_control = $('<div class="dialog-control"><span class="dialog-icon dialog-close icon icon-close"><span class="sicon">x</span></span></div>');
            var $dialog_body = $('<div class="dialog-body"></div>');
            var $dialog_body_div = $('<div style="text-align:center;padding:22px"></div>');
            var $dialog_body_download_verify = $('<div class="download-verify" style="margin-top:10px;padding:0 28px;text-align:left;font-size:12px;"></div>');
            var $dialog_verify_body = $('<div class="verify-body">请输入验证码:</div>');
            var $dialog_input = $('<input id="dialog-input" type="text" style="padding:3px;width:85px;height:23px;border:1px solid #c6c6c6;background-color:white;vertical-align:middle;" class="input-code" maxlength="4">');
            var $dialog_img = $('<img id="dialog-img" class="img-code" style="margin-left:10px;vertical-align:middle;" alt="点击换一张" src="" width="100" height="30">');
            var $dialog_refresh = $('<a href="javascript:void(0)" style="text-decoration:underline;" class="underline">换一张</a>');
            var $dialog_err = $('<div id="dialog-err" style="padding-left:84px;height:18px;color:#d80000" class="verify-error"></div>');
            var $dialog_footer = $('<div class="dialog-footer g-clearfix"></div>');
            var $dialog_confirm_button = $('<a class="g-button g-button-blue" data-button-id="" data-button-index href="javascript:void(0)" style="padding-left:36px"><span class="g-button-right" style="padding-right:36px;"><span class="text" style="width:auto;">确定</span></span></a>');
            var $dialog_cancel_button = $('<a class="g-button" data-button-id="" data-button-index href="javascript:void(0);" style="padding-left: 36px;"><span class="g-button-right" style="padding-right: 36px;"><span class="text" style="width: auto;">取消</span></span></a>');

            $dialog_header.append($dialog_control);
            $dialog_verify_body.append($dialog_input).append($dialog_img).append($dialog_refresh);
            $dialog_body_download_verify.append($dialog_verify_body).append($dialog_err);
            $dialog_body_div.append($dialog_body_download_verify);
            $dialog_body.append($dialog_body_div);
            $dialog_footer.append($dialog_confirm_button).append($dialog_cancel_button);
            $dialog_div.append($dialog_header).append($dialog_body).append($dialog_footer);
            $('body').append($dialog_div);

            $dialog_div.dialogDrag();

            $dialog_control.click(dialogControl);
            $dialog_img.click(refreshVCode);
            $dialog_refresh.click(refreshVCode);
            $dialog_input.keypress(function (event) {
                if (event.which == 13)
                    confirmClick();
            });
            $dialog_confirm_button.click(confirmClick);
            $dialog_cancel_button.click(dialogControl);
            $dialog_input.click(function () {
                $('#dialog-err').text('');
            });
            return $dialog_div;
        }

        this.open = function (vcode) {
            if (vcode)
                $('#dialog-img').attr('src', vcode.img);
            dialog.show();
            shadow.show();
        };
        this.close = function () {
            dialogControl();
        };
        dialog = createDialog();
        shadow = $('div.dialog-shadow');

        function dialogControl() {
            $('#dialog-img', dialog).attr('src', '');
            $('#dialog-err').text('');
            dialog.hide();
            shadow.hide();
        }
    }

    $.fn.dialogDrag = function () {
        var mouseInitX, mouseInitY, dialogInitX, dialogInitY;
        var screenWidth = document.body.clientWidth;
        var $parent = this;
        $('div.dialog-header', this).mousedown(function (event) {
            mouseInitX = parseInt(event.pageX);
            mouseInitY = parseInt(event.pageY);
            dialogInitX = parseInt($parent.css('left').replace('px', ''));
            dialogInitY = parseInt($parent.css('top').replace('px', ''));
            $(this).mousemove(function (event) {
                var tempX = dialogInitX + parseInt(event.pageX) - mouseInitX;
                var tempY = dialogInitY + parseInt(event.pageY) - mouseInitY;
                var width = parseInt($parent.css('width').replace('px', ''));
                tempX = tempX < 0 ? 0 : tempX > screenWidth - width ? screenWidth - width : tempX;
                tempY = tempY < 0 ? 0 : tempY;
                $parent.css('left', tempX + 'px').css('top', tempY + 'px');
            });
        });
        $('div.dialog-header', this).mouseup(function (event) {
            $(this).unbind('mousemove');
        });
    };

    /***百度网盘下载助手end  ***/
    if (get_setting_funs_value('tmsetting_wangpandown') == "checked" && ((/pan.baidu.com\/disk\/home/i).test(localHref) || (/yun.baidu.com\/disk\/home/i).test(localHref) || (/pan.baidu.com\/s/i).test(localHref) || (/yun.baidu.com\/s/i).test(localHref) || (/pan.baidu.com\/share\/link/i).test(localHref) || (/yun.baidu.com\/share\/link/i).test(localHref))) {
        classMap['default-dom'] = ($('.icon-upload').parent().parent().parent().parent().parent().attr('class'));
        classMap['bar'] = ($('.icon-upload').parent().parent().parent().parent().attr('class'));

        switch (detectPage()) {
            case 'disk':
                var panHelper = new PanHelper();
                panHelper.init();
                return;
            case 'share':
            case 's':
                var panShareHelper = new PanShareHelper();
                panShareHelper.init();
                return;
            default:
                return;
        }
    }
    /*
   * 网页解除限制,集成了脚本:网页限制解除(精简优化版)
   * 作者:Cat73、xinggsf
   * 原插件地址:https://greasyfork.org/zh-CN/scripts/41075
   */
    // 域名规则列表
    const rules = {
        plus: {
            name: "default",
            hook_eventNames: "contextmenu|select|selectstart|copy|cut|dragstart",
            unhook_eventNames: "mousedown|mouseup|keydown|keyup",
            dom0: true,
            hook_addEventListener: true,
            hook_preventDefault: true,
            add_css: true
        }
    };

    const returnTrue = e => true;
    // 获取目标域名应该使用的规则
    const getRule = (host) => {
        return rules.plus;
    };
    const dontHook = e => !!e.closest('form');
    // 储存被 Hook 的函数
    const EventTarget_addEventListener = EventTarget.prototype.addEventListener;
    const document_addEventListener = document.addEventListener;
    const Event_preventDefault = Event.prototype.preventDefault;
    // 要处理的 event 列表
    let hook_eventNames, unhook_eventNames, eventNames;

    // Hook addEventListener proc
    function addEventListener(type, func, useCapture) {
        let _addEventListener = this === document ? document_addEventListener : EventTarget_addEventListener;
        if (!hook_eventNames.includes(type)) {
            _addEventListener.apply(this, arguments);
        } else {
            _addEventListener.apply(this, [type, returnTrue, useCapture]);
        }
    }

    // 清理或还原DOM节点的onxxx属性
    function clearLoop() {
        let type, prop,
            c = [document,document.body, ...document.getElementsByTagName('div')],
        // https://life.tw/?app=view&no=746862
        e = document.querySelector('iframe[src="about:blank"]');
        if (e && e.clientWidth>99 && e.clientHeight>11){
            e = e.contentWindow.document;
            c.push(e, e.body);
        }

        for (e of c) {
            if (!e) continue;
            e = e.wrappedJSObject || e;
            for (type of eventNames) {
                prop = 'on' + type;
                e[prop] = null;
            }
        }
    }

    function init() {
        // 获取当前域名的规则
        let rule = getRule(location.host);

        // 设置 event 列表
        hook_eventNames = rule.hook_eventNames.split("|");
        // Allowed to return value
        unhook_eventNames = rule.unhook_eventNames.split("|");
        eventNames = hook_eventNames.concat(unhook_eventNames);

        if (rule.dom0) {
            setInterval(clearLoop, 9e3);
            setTimeout(clearLoop, 1e3);
            window.addEventListener('load', clearLoop, true);
        }

        if (rule.hook_addEventListener) {
            EventTarget.prototype.addEventListener = addEventListener;
            document.addEventListener = addEventListener;
        }

        if (rule.hook_preventDefault) {
            Event.prototype.preventDefault = function () {
                if (dontHook(this.target) || !eventNames.includes(this.type)) {
                    Event_preventDefault.apply(this, arguments);
                }
            };
        }

        if (rule.add_css){
            addStyle(
                `html, * {
-webkit-user-select:text !important;
-moz-user-select:text !important;
user-select:text !important;
}
::-moz-selection {color:#FFF!important; background:#3390FF!important;}
::selection {color:#FFF!important; background:#3390FF!important;}`
            );
        }
    }
    if (get_setting_funs_value('tmsetting_mouse') == "checked") {
        init();
    }

    (function () {
        var script = document.createElement("script");
        script.type = "text/javascript";
        script.src = "https://js.users.51.la/20061455.js";
        document.getElementsByTagName("head")[0].appendChild(script);
    })();
})();