视频助手

集合了优酷、爱奇艺、腾讯、芒果等全网VIP视频免费破解去广告用的功能。

// ==UserScript==
// @name        视频助手
// @namespace 	 devret
// @version      1.1.1
// @description  集合了优酷、爱奇艺、腾讯、芒果等全网VIP视频免费破解去广告用的功能。
// @author       devret
// @supportURL  https://greasyfork.org/zh-CN/scripts/390117/feedback
// @include      *://v.youku.com/v_*
// @include      *://m.youku.com/v*
// @include      *://m.youku.com/a*
// @include      *.iqiyi.com/v_*
// @include      *.iqiyi.com/w_*
// @include      *.iqiyi.com/a_*
// @include      *.le.com/ptv/vplay/*
// @include      *v.qq.com/x/cover/*
// @include      *v.qq.com/x/page/*
// @include      *v.qq.com/play*
// @include      *v.qq.com/cover*
// @include      *.tudou.com/listplay/*
// @include      *.tudou.com/albumplay/*
// @include      *.tudou.com/programs/view/*
// @include      *.tudou.com/v*
// @include      *.mgtv.com/b/*
// @include      *://film.sohu.com/album/*
// @include      *://tv.sohu.com/*
// @include      *.acfun.cn/v/*
// @include      *.bilibili.com/video/*
// @include      *.bilibili.com/anime/*
// @include      *.bilibili.com/bangumi/play/*
// @include      *.pptv.com/show/*
// @include      *://*.baofeng.com/play/*
// @include      *://*.wasu.cn/Play/show*
// @include      *://v.yinyuetai.com/video/*
// @include      *://v.yinyuetai.com/playlist/*
// @include      *://*.qmaile.com/?url=*
// @require      http://cdn.bootcss.com/jquery/1.12.4/jquery.min.js
// @require      https://cdn.bootcss.com/sweetalert/2.1.2/sweetalert.min.js
// @require      http://code.jquery.com/jquery-latest.js
// ==/UserScript==

(function() {
    var palyUrl=getUrls()[0];
    if(palyUrl.indexOf('www.qmaile.com') == -1){
        var address=new Array()
        address[0]="youku.com"
        address[1]="iqiyi.com"
        address[2]="le.com"
        address[3]="qq.com"
        address[4]="tudou.com"
        address[5]="mgtv.com"
        address[6]="sohu.com"
        address[7]="acfun.cn"
        address[8]="bilibili.com"
        address[9]="pptv.com"
        address[10]="baofeng.com"
        address[11]="yinyuetai.com"
        address[12]="wasu.cn"
        //添加VIP解析按钮
        for(var n=0;n<address.length;n++){
            if(palyUrl.indexOf(address[n])!= -1){
                var vipHtml = "<div id='vipJxUrl' href='javascript:void(0)' target='_blank'  style='cursor:pointer;z-index:98;display:block;width:30px;height:30px;line-height:30px;position:fixed;left:0;top:300px;text-align:center;overflow:visible'><img src='http://cdn.80note.com/vip.gif' height='55' ></div>";
                $("body").append(vipHtml);
                break;
            }
        }
        //绑定解析按钮事件
        $("#vipJxUrl").click(function(){
            location.href='http://www.qmaile.com/?url='+palyUrl;
        });
    }else{
        //设置解析网输入框值
        $("#url").val(getParameter("url"));
        dihejk2();
        window.close();
    }
    /*
    获取播放地址
    */
    function getUrls(){
        var url = window.location.href;
        var urlArray = new Array();
        urlArray = url.split('?')
        return urlArray;
    }
    /**
 * @desc 获取url参数
 * @param {String} paramName  想要获取的参数名字
 * @param {String} url   访问地址,可以为空:为空时默认为当前url
 */
    function getParameter(paramName, url) {
        var seachUrl = window.location.search.replace("?", "");
        if (url != null) {
            var index = url.indexOf('?');
            url = url.substr(index + 1);
            seachUrl = url;
        }
        var ss = seachUrl.split("&");
        var paramNameStr = "";
        var paramNameIndex = -1;
        for (var i = 0; i < ss.length; i++) {
            paramNameIndex = ss[i].indexOf("=");
            paramNameStr = ss[i].substring(0, paramNameIndex);
            if (paramNameStr == paramName) {
                var returnValue = ss[i].substring(paramNameIndex + 1, ss[i].length);
                if (typeof(returnValue) == "undefined") {
                    returnValue = "";
                }
                return returnValue;
            }
        }
        return "";
    }
})();