Greasy Fork is available in English.

全网视频VIP免费+淘宝天猫内部大额优惠券一键领取 全网最省 20190328更新!

懒人专用,支持优酷、土豆、56、PPTV、bilibili、acfun、音悦台、乐视、腾讯、搜狐全网VIP视频免费放,关键词连接sohu、tencent、youku、tudou、taobao、Tmall!

// ==UserScript==
// @name         全网视频VIP免费+淘宝天猫内部大额优惠券一键领取 全网最省 20190328更新!
// @namespace    http://sheng.abangtv.top/
// @version      20190328
// @description  懒人专用,支持优酷、土豆、56、PPTV、bilibili、acfun、音悦台、乐视、腾讯、搜狐全网VIP视频免费放,关键词连接sohu、tencent、youku、tudou、taobao、Tmall!
// @author       省钱宝、无心
// @include      http*://item.taobao.com/*
// @include      http*://detail.tmall.com/*
// @include      http*://detail.tmall.hk/*
// @include      http*://list.tmall.com/*
// @include      http*://list.tmall.hk/*
// @include      http*://s.taobao.com/*
// @include      http*://ai.taobao.com/search/*
// @include      http*://ai.taobao.com/*
// @match        *://v.youku.com/v_show/*
// @match        *://*.iqiyi.com/v_*
// @match        *://*.iqiyi.com/w_*
// @match        *://*.iqiyi.com/a_*
// @match        *://*.iqiyi.com/dianying/*
// @match        *://*.le.com/ptv/vplay/*
// @match        *://v.qq.com/x/cover/*
// @match        *://v.qq.com/x/page/*
// @match        *://*.tudou.com/listplay/*
// @match        *://*.tudou.com/albumplay/*
// @match        *://*.tudou.com/programs/view/*
// @match        *://*.tudou.com/v/*
// @match        *://*.mgtv.com/b/*
// @match        *://film.sohu.com/album/*
// @match        *://*.acfun.cn/v/*
// @match        *://*.bilibili.com/video/*
// @match        *://*.bilibili.com/anime/*
// @match        *://*.bilibili.com/*
// @match        *://vip.pptv.com/show/*
// @match        *://v.pptv.com/show/*
// @match        *://v.yinyuetai.com/video/*
// @match        *://v.yinyuetai.com/playlist/*
// @match        *://*.wasu.cn/Play/show/*
// @grant        GM_xmlhttpRequest
// @grant        GM_info
// @grant        GM_getValue
// @grant        unsafeWindow
// @grant        GM_addStyle
// @grant        GM_setClipboard
// @require      https://cdn.bootcss.com/jquery/2.2.4/jquery.min.js
// @require      https://cdn.bootcss.com/babel-standalone/6.26.0/babel.min.js
// @require      https://cdn.bootcss.com/clipboard.js/1.5.16/clipboard.min.js
// @require      https://cdn.staticfile.org/jquery/1.12.4/jquery.min.js
// @require      https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js
// @run-at       document-end
// ==/UserScript==
(function() {

     'use strict';
    var curPlaySite = '';
    var curWords = '';
    var html='';
    var name='';
    var videoSite = window.location.href;
    var currentUrl = window.location.href;
    var reYk = /youku/i;
    var reAqy = /iqiyi/i;
    var reLS = /le/i;
    var reTX = /qq/i;
    var reTD = /tudou/i;
    var reMG = /mgtv/i;
    var reSH = /sohu/i;
    var reAF = /acfun/i;
    var reBL = /bilibili/i;
    var reYJ = /1905/i;
    var rePP = /pptv/i;
    var reYYT = /yinyuetai/i;
    var jkBtn1 = '<a id="jiekouBtn1" target="_blank" style="cursor:pointer;text-decoration:none;color:red;padding:0 3px;border:1px solid red;">一键解析</a>';
    var jkBtn2 = '<a id="jiekouBtn2" target="_blank" style="cursor:pointer;text-decoration:none;color:red;padding:0 3px;border:1px solid red;">网购省钱</a>';
	var jkBtn3 = '<a id="jiekouBtn3"  target="_blank" style="cursor:pointer;text-decoration:none;color:red;padding:0 3px;border:1px solid red;">网站解析</a>';
    if(reAqy.test(videoSite)||reLS.test(videoSite)||reTX.test(videoSite)||reTD.test(videoSite)||reMG.test(videoSite)||reSH.test(videoSite) ||reAF.test(videoSite)||reBL.test(videoSite)||rePP.test(videoSite)||reYk.test(videoSite)||reYYT.test(videoSite)){

        window.q = function(cssSelector) {return document.querySelector(cssSelector);};
        var intervalId=null;var ischeck=false;var queryyhq="";
        // 影视地址检测
        //if(WYYY_RE.test(videoSite)||QQYY_RE.test(videoSite)||KGYY_RE.test(videoSite)||KWYY_RE.test(videoSite)||XMYY_RE.test(videoSite)||BDYY_RE.test(videoSite)||QTYY_RE.test(videoSite)||LZYY_RE.test(videoSite)||MGYY_RE.test(videoSite)||XMLYYY_RE.test(videoSite)||YK_RE.test(videoSite)||AQY_RE.test(videoSite)||LS_RE.test(videoSite)||TX_RE.test(videoSite)||TD_RE.test(videoSite)||MG_RE.test(videoSite)||SH_RE.test(videoSite)||AF_RE.test(videoSite)||BL_RE.test(videoSite)||YJ_RE.test(videoSite)||PP_RE.test(videoSite)||YYT_RE.test(videoSite)){
        var sidenav = '<div class="aside-nav bounceInUp animated" id="aside-nav"><label for="" class="aside-menu" title="\u6309\u4f4f\u9f20\u6807\u79fb\u52a8">解析</label><a href="javascript:void(0)" title="\u70b9\u6b64\u8fdb\u884c\u7f51\u7ad9\u89e3\u6790" data-cat="search" class="menu-item menu-line menu-first">\u7f51\u7ad9<br>\u89e3\u6790</a><a href="javascript:void(0)" title="\u70b9\u51fb\u540e\u76f4\u63a5\u89e3\u6790\uff01" data-cat="process" class="menu-item menu-line menu-second">\u4e00\u952e<br>\u89e3\u6790</a><a href="javascript:void(0)" title="\u8fd9\u662f\u97f3\u4e50\u63a5\u53e3\uff0c\u4e13\u95e8\u7528\u4e8e\u89e3\u6790\u97f3\u4e50\uff01" data-cat="tb" class="menu-item menu-line menu-third">\u97f3\u4e50<br>\u63a5\u53e3</a><a href="javascript:void(0)" title="\u8fd9\u662f\u9886\u5238\u7f51\u5740\uff0c\u8d2d\u7269\u8d85\u7ea7\u4f18\u60e0\uff01" data-cat="music" class="menu-item menu-line menu-fourth">\u7f51\u8d2d<br>\u7701\u94b1</a><a href="javascript:void(0)" title="\u63d2\u4ef6\u66f4\u65b0\u5730\u5740\uff0c\u9700\u8981\u6cb9\u7334\u652f\u6301\uff01" data-cat="jingxuan" class="menu-item menu-line menu-fifth">\u63d2\u4ef6<br>\u4e0b\u8f7d</a><a href="javascript:void(0)" title="\u5148\u4fdd\u7559\uff0c\u529f\u80fd\u540e\u671f\u5f00\u53d1" data-cat="help" class="menu-item menu-line menu-sixth">\u529f\u80fd<br>\u7ef4\u62a4</a></div>';
		sidenav+='<section class="ch1 doudong"> <a href="javascript:void(0)" data-cat="tmall1111" target="_blank" title="free"></a></section>';
        $("body").append(sidenav).append($('<link rel="stylesheet" href="//dy.51yfx.com/static/css/videoparse.css?v=1.1">'));
        var ua = navigator.userAgent;
        /Safari|iPhone/i.test(ua) && 0 == /chrome/i.test(ua) && $("#aside-nav").addClass("no-filter");
        var drags = { down: !1, x: 0, y: 0, winWid: 0, winHei: 0, clientX: 0, clientY: 0 }, asideNav = $("#aside-nav")[0], getCss = function (a, e) { return a.currentStyle ? a.currentStyle[e] : document.defaultView.getComputedStyle(a, !1)[e] };
        $("#aside-nav").on("mousedown", function (a) {
            drags.down = !0, drags.clientX = a.clientX, drags.clientY = a.clientY, drags.x = getCss(this, "right"), drags.y = getCss(this, "top"), drags.winHei = $(window).height(), drags.winWid = $(window).width(), $(document).on("mousemove", function (a) {
                if (drags.winWid > 640 && (a.clientX < 120 || a.clientX > drags.winWid - 50))
                    return !1;
                if (a.clientY < 180 || a.clientY > drags.winHei - 120)
                    return !1;
                var e = a.clientX - drags.clientX,
                    t = a.clientY - drags.clientY;
                asideNav.style.top = parseInt(drags.y) + t + "px";
                asideNav.style.right = parseInt(drags.x) - e + "px";
            })
        }).on("mouseup", function () {
            drags.down = !1, $(document).off("mousemove")
        });
        //jx1
        $('body').on('click', '[data-cat=process]', function () {
            window.open('http://vip.abangtv.top/?url=' + videoSite);
        });
        //wangzhan
        $('body').on('click', '[data-cat=search]', function () {
            window.open('http://vip3.abangtv.top');
        });
        //jx2
        $('body').on('click', '[data-cat=tb]', function () {
            window.open('http://vip3.abangtv.top');
        });
        //jiaqun
        $('body').on('click', '[data-cat=music]', function () {
            window.open('http://sheng.abangtv.top');
        });
        //jx4
        $('body').on('click', '[data-cat=jingxuan]', function () {
            window.open('https://greasyfork.org/zh-CN/scripts/380358');
        });
        //jx3
        $('body').on('click', '[data-cat=help]', function () {
            window.open('http://vip4.abangtv.top');
        });
        //free
        $('body').on('click', '[data-cat=tmall1111]', function () {

            window.open('http://vip5.abangtv.top');
        });
        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 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 "";
            }
        }


        // 爱奇艺
        if(reAqy.test(videoSite)){
            $('.qy-player-tag').append(jkBtn2).append(jkBtn3).append(jkBtn1);
            $('#jiekouBtn3').css({'font-size':'10px','display':'inline-block','height':'20px','line-height':'20px','margin':'0 3px'});
            $('#jiekouBtn1').css({'font-size':'10px','display':'inline-block','height':'20px','line-height':'20px','margin':'0 3px'});
            $('#jiekouBtn2').css({'font-size':'10px','display':'inline-block','height':'20px','line-height':'20x','margin':'0 3px'});
            curPlaySite = window.location.href;
            $('#jiekouBtn1').attr('href','http://vip.abangtv.top/?url=' + curPlaySite);//jiekou
			$('#jiekouBtn3').attr('href','http://vip3.abangtv.top');//wangzhan
            $('#jiekouBtn2').attr('href','http://sheng.abangtv.top');//shengqian

        }
        // 乐视
        if(reLS.test(videoSite)){
            $('.briefIntro_tit').append(jkBtn1).append(jkBtn3).append(jkBtn2);
            $('#jiekouBtn3').css({'font-size':'10px','display':'inline-block','height':'20px','line-height':'20px','margin':'0 1px'});
            $('#jiekouBtn1').css({'font-size':'10px','display':'inline-block','height':'20px','line-height':'20px','margin':'0 1px'});
            $('#jiekouBtn2').css({'font-size':'10px','display':'inline-block','height':'20px','line-height':'20px','margin':'0 1px'});
            curPlaySite = window.location.href;
            $('#jiekouBtn1').attr('href','http://vip.abangtv.top/?url=' + curPlaySite);//jiekou
			$('#jiekouBtn3').attr('href','http://vip3.abangtv.top');//wangzhan
            $('#jiekouBtn2').attr('href','http://sheng.abangtv.top');//shengqian

        }
        // 腾讯
        if(reTX.test(videoSite)){
            var qqTitle = $('.mod_intro').find('.video_title');
            qqTitle.eq(0).after(jkBtn2).after(jkBtn3).after(jkBtn1);
            $('#jiekouBtn3').css({'font-size':'15px','display':'inline-block','height':'36px','line-height':'36px','margin':'0 3px'});
            $('#jiekouBtn1').css({'font-size':'15px','display':'inline-block','height':'36px','line-height':'36px','margin':'0 3px'});
            $('#jiekouBtn2').css({'font-size':'15px','display':'inline-block','height':'36px','line-height':'36px','margin':'0 3px'});
            curPlaySite = window.location.href;
            $('#jiekouBtn1').attr('href','http://vip.abangtv.top/?url=' + curPlaySite);//jiekou
			$('#jiekouBtn3').attr('href','http://vip3.abangtv.top');//wangzhan
            $('#jiekouBtn2').attr('href','http://sheng.abangtv.top');//shengqian
        }
        // 土豆
        if(reTD.test(videoSite)){
            $('.td-playbase').append(jkBtn3);
            $('#jiekouBtn3').css({'font-size':'18px','display':'inline-block','height':'22px','line-height':'22px','margin':'0 3px'});
                 curPlaySite = window.location.href;
			$('#jiekouBtn3').attr('href','http://vip3.abangtv.top');//wangzhan
        }
        // 芒果
        if(reMG.test(videoSite)){
            var mgTitle = $('.v-panel-title');
            mgTitle.after(jkBtn2).after(jkBtn3).after(jkBtn1);
            mgTitle.css({'float':'left','margin-right':'0'});
            $('#jiekouBtn3').css({'font-size':'20px','display':'inline-block','height':'30px','line-height':'30px','margin':'0 3px'});
            $('#jiekouBtn1').css({'font-size':'20px','display':'inline-block','height':'30px','line-height':'30px','margin':'0 3px'});
            $('#jiekouBtn2').css({'font-size':'20px','display':'inline-block','height':'30px','line-height':'30px','margin':'0 3px'});
            curPlaySite = window.location.href;
            $('#jiekouBtn1').attr('href','http://vip.abangtv.top/?url=' + curPlaySite);//jiekou
			$('#jiekouBtn3').attr('href','http://vip3.abangtv.top');//wangzhan
            $('#jiekouBtn2').attr('href','http://sheng.abangtv.top');//shengqian
        }
        // 搜狐
        if(reSH.test(videoSite)){
            var shTitle = $('.player-top-info-name');
            shTitle.after(jkBtn2).after(jkBtn3).after(jkBtn1);
            shTitle.find('h2').css({'float':'left'});
            $('#jiekouBtn3').css({'font-weight':'bold','font-size':'16px','display':'inline-block','height':'36px','line-height':'36px','margin':'0 3px'});
            $('#jiekouBtn1').css({'font-weight':'bold','font-size':'16px','display':'inline-block','height':'36px','line-height':'36px','margin':'0 3px'});
            $('#jiekouBtn2').css({'font-weight':'bold','font-size':'16px','display':'inline-block','height':'36px','line-height':'36px','margin':'0 3px'});
            curPlaySite = window.location.href;
            $('#jiekouBtn1').attr('href','http://vip.abangtv.top/?url=' + curPlaySite);//jiekou
			$('#jiekouBtn3').attr('href','http://vip3.abangtv.top');//wangzhan
            $('#jiekouBtn2').attr('href','http://sheng.abangtv.top');//shengqian
        }
        // acfun
        if(reAF.test(videoSite)){
            var acTitle = $('.head').find('.title');
            acTitle.append(jkBtn3);
            $('#jiekouBtn3').css({'font-weight':'bold','font-size':'16px','display':'inline-block','height':'20px','line-height':'20px','margin':'0 3px'});
            $('#jiekouBtn1').attr('href','http://vip.abangtv.top/?url=' + curPlaySite);//jiekou
			$('#jiekouBtn3').attr('href','http://vip3.abangtv.top');//wangzhan
            $('#jiekouBtn2').attr('href','http://sheng.abangtv.top');//shengqian
        }
        // bilibili
        if(reBL.test(videoSite)){
            var biliTitle = $('.v-title').find('h1');
            biliTitle.after(jkBtn3);
            biliTitle.css({'float':'left','margin-right':'0'});
            $('#jiekouBtn3').css({'font-weight':'bold','font-size':'16px','display':'inline-block','height':'36px','line-height':'36px','margin':'0 3px'});
			$('#jiekouBtn3').attr('href','http://vip3.abangtv.top');//wangzhan
        }
        // pptv
        if(rePP.test(videoSite)){
            var pptvTitle = $('.title_video').find('h3');
            pptvTitle.after(jkBtn2).after(jkBtn3).after(jkBtn1);
            $('#jiekouBtn3').css({'font-weight':'bold','font-size':'16px','display':'inline-block','height':'36px','line-height':'36px','margin':'0 3px'});
            $('#jiekouBtn1').css({'font-weight':'bold','font-size':'16px','display':'inline-block','height':'36px','line-height':'36px','margin':'0 3px'});
            $('#jiekouBtn2').css({'font-weight':'bold','font-size':'16px','display':'inline-block','height':'36px','line-height':'36px','margin':'0 3px'});

            curPlaySite = window.location.href;
            $('#jiekouBtn1').attr('href','http://vip.abangtv.top/?url=' + curPlaySite);//jiekou
			$('#jiekouBtn3').attr('href','http://vip3.abangtv.top');//wangzhan
            $('#jiekouBtn2').attr('href','http://sheng.abangtv.top');//shengqian
        }
        if(reYk.test(videoSite)){
            var youkuTitle = $('#subtitle');
            if(youkuTitle.length !== 0){
                youkuTitle.after(jkBtn2).after(jkBtn3).after(jkBtn1);
                $('#jiekouBtn1').css({'font-size':'10px','display':'inline-block','height':'22px','line-height':'22px','margin':'0 3px','vertical-align':'bottom'});
                $('#jiekouBtn3').css({'font-size':'10px','display':'inline-block','height':'22px','line-height':'22px','margin':'0 3px','vertical-align':'bottom'});
                $('#jiekouBtn2').css({'font-size':'10px','display':'inline-block','height':'22px','line-height':'22px','margin':'0 3px','vertical-align':'bottom'});

                curPlaySite = window.location.href;
            $('#jiekouBtn1').attr('href','http://vip.abangtv.top/?url=' + curPlaySite);//jiekou
			$('#jiekouBtn3').attr('href','http://vip3.abangtv.top');//wangzhan
            $('#jiekouBtn2').attr('href','http://sheng.abangtv.top');//shengqian
            }else{
                $('.title').after(jkBtn2).after(jkBtn3).after(jkBtn1);
                $('#jiekouBtn3').css({'font-size':'17px','display':'inline-block','height':'22px','line-height':'22px','margin':'0 3px','vertical-align':'bottom'});
                $('#jiekouBtn1').css({'font-size':'17px','display':'inline-block','height':'22px','line-height':'22px','margin':'0 3px','vertical-align':'bottom'});
                $('#jiekouBtn2').css({'font-size':'17px','display':'inline-block','height':'22px','line-height':'22px','margin':'0 3px','vertical-align':'bottom'});

                curPlaySite = window.location.href;
            $('#jiekouBtn1').attr('href','http://vip.abangtv.top/?url=' + curPlaySite);//jiekou
			$('#jiekouBtn3').attr('href','http://vip3.abangtv.top');//wangzhan
            $('#jiekouBtn2').attr('href','http://sheng.abangtv.top');//shengqian
            }
        }
        // 音悦台
        if(reYYT.test(videoSite)){
            var yytTitle = $('.videoName');
            yytTitle.append(jkBtn3);
            $('#jiekouBtn3').css({'font-weight':'bold','font-size':'14px','display':'inline-block','height':'32px','line-height':'32px','margin':'0 3px'});
            $('#jiekouBtn1').attr('href','http://vip.abangtv.top/?url=' + curPlaySite);//jiekou
			$('#jiekouBtn3').attr('href','http://vip3.abangtv.top');//wangzhan
            $('#jiekouBtn2').attr('href','http://sheng.abangtv.top');//shengqian
        }
    }

    $(document).ready(function() {
        var location = window.location.host;
        var name;
        var html
        if(location.indexOf("item.taobao.com")>=0){
            name = $('.tb-main-title').text();
            name = $.trim(name).substring(0,9); //取商品标题前10个字符
            html = '<div class="tb-btn-buy" style="padding-top:10px;"><a href="http://sheng.abangtv.top/index.php?r=l&kw='+ encodeURI(name) + '" target="_blank">领取商品优惠券</a></div><div class="tb-btn-add" style="padding-top:10px;"><a href="http://sheng.abangtv.top/" target="_blank">获取更多优惠产品</a></div>';
            $('.tb-action').append(html);
        }else if(location.indexOf("detail.tmall") >= 0){
            name = $('meta[name=keywords]').attr('content');
            name = $.trim(name).substring(0,9);
            html = '<div class="tb-btn-buy tb-btn-sku" style="padding-top:10px;"><a href="http://sheng.abangtv.top/index.php?r=l&kw='+ encodeURI(name) + '" target="_blank">领取商品优惠券</a></div><div class="tb-btn-basket tb-btn-sku" style="padding-top:10px;"><a href="http://sheng.abangtv.top/" target="_blank">获取更多优惠产品</a></div>';
            $('.tb-action').append(html);
        }else if(location.indexOf("s.taobao.com")>=0){
            $.each($(".pic"),function(index){
                if(index != -1){
                    var id = $(this).find("a").attr("data-nid");
                    name = $.trim($(this).parents(".item").find(".row-2").text());
                    name = $.trim(name).substring(0,9);
                    //alert(index + ":" + name);
                    $(this).parents(".item").find(".g_price").append('<a href="http://sheng.abangtv.top/index.php?r=l&kw=' + encodeURI(name) + ' " target="_blank"><em style="font-size:15px;color:red;border-style:solid;border-width:2px;padding:3px;"><strong>领取优惠券</strong></em></a>');
                }
             });
        }else if(location.indexOf("list.tmall.com")>=0){

            $(".productTitle").each(function(){
                name = $(this).children("a").attr("title");
                name = $.trim(name).substring(0,9);
                $(this).prev().append('<a href="http://sheng.abangtv.top/index.php?r=l&kw=' + encodeURI(name) + '" target="_blank" ><em style="font-size:12px;color:red;border-style:solid;border-width:1px;padding-bottom:6px;height:20px;"><strong>领取优惠券</strong></em></a>');
            });


        }else if(location.indexOf("ai.taobao.com")>=0){
            $(".title").each(function(){
                name = $(this).children("a:first").text();
                name = name.substring(0,9);
                $(this).after('<div style="margin-left:12px;"><a href="http://sheng.abangtv.top/index.php?r=l&kw=' + encodeURI(name.replace(/(^\s*)|(\s*$)/g, "")) + '" target="_blank" ><em style="font-size:12px;color:red;border-style:solid;border-width:1px;padding-bottom:6px;height:20px;"><strong>领取优惠券</strong></em></a><div>');
	    });
        }
    });

})();