Greasy Fork is available in English.

淘宝天猫、京东优惠券、拼多多一键领取,支持全网搜索,实实在在省钱。增加618超级红包领取

淘宝天猫内部优惠券一键领取,在淘宝、淘宝商品页购买按钮下方可以直接领取相关商品优惠券,还支持按名称搜索全网相关商品,不满意的可以使用全网搜索功能搜索商品关键字,注意搜索词需要尽量简短,支持筛选。新增京东优惠券领取。添加拼多多领券

Verzia zo dňa 20.06.2020. Pozri najnovšiu verziu.

// ==UserScript==
// @name         淘宝天猫、京东优惠券、拼多多一键领取,支持全网搜索,实实在在省钱。增加618超级红包领取
// @namespace    https://tk.xunhuo.vip
// @version      1.20
// @description  淘宝天猫内部优惠券一键领取,在淘宝、淘宝商品页购买按钮下方可以直接领取相关商品优惠券,还支持按名称搜索全网相关商品,不满意的可以使用全网搜索功能搜索商品关键字,注意搜索词需要尽量简短,支持筛选。新增京东优惠券领取。添加拼多多领券
// @icon         https://tk.xunhuo.vip/favicon.ico
// @author       优惠券
// @connect      xunhuo.vip
// @include      *detail.tmall.com/*
// @include      *item.taobao.com/*
// @include      *list.tmall.com/*
// @include      *s.taobao.com/*
// @include      *chaoshi.detail.tmall.com/*
// @include      *detail.tmall.hk/*
// @include      *list.tmall.hk/*
// @include      *item.jd.com/*
// @include      *youhui.pinduoduo.com/*
// @include      https://tk.xunhuo.vip/api_gaoyong_url_m.aspx*
// @homepageURL       https://tk.xunhuo.vip/?id=24557
// @require      https://cdn.bootcss.com/jquery/1.6.4/jquery.min.js
// @match        https://tk.xunhuo.vip/api_gaoyong_url_m.aspx
// @grant        none
// ==/UserScript==
//https://cdn.bootcss.com/jquery/2.2.4/jquery.min.js
(function() {
    'use strict';
        $(document).ready(function() {
		var url = window.location.host;
        var name = '';//名称 $(document).attr('title');
        var id = '';
            //淘宝商品
		if (url == 'item.taobao.com') {
            id = $("link[rel=canonical]").attr("href");
            id = id.split("id=")[1];
            name = $('.tb-main-title').attr('data-title');
            var taobao = '<div class="tb-btn-buy" style="padding-top:10px;"><a href="https://tk.xunhuo.vip/api_gaoyong_url_m.aspx?id=24557&sid=&relationId=&code='+ encodeURI(id) +'&type=0&type2=0" title="请点击这里领券购买,部分商品可能没有优惠券或失效,进入链接后可直接点击优惠券上方图片购买或尝试用搜券搜索其他的商品。注意:有些商品商家没做推广所以会报错无视即可!" target="_blank">领取优惠券</a></div><div class="tb-btn-add" style="padding-top:10px;"><a href="https://tk.xunhuo.vip/m/item/list_s_super.aspx?id=24557&sid=&relationId=&keyword='+ encodeURI(name) +'  title="点这里可以搜索全部店铺相同名称的全部宝贝,如果想要搜索到更多商品,请修改搜索关键字,尽量简短,因为很多商家为了做优化添加了很多无用的词,造成无法搜索到更多商品。!" target="_blank">全网搜券</a></div>';
            var taobao2 = '<div class="tb-btn-buy" style="padding-top:10px;"><a href="https://m.tb.cn/h.VN0ZC0J"target="_blank">618超级红包领取</a></div><div class="tb-btn-add" style="padding-top:10px;"><a href="https://tk.xunhuo.vip/jingxuan.aspx?id=24557" target="_blank">每日精选</a></div>';
            var taobao3 = '<div class="tb-btn-buy" style="padding-top:10px;"><a href="http://jk.xunhuo.vip/?ah=total&kw=" target="_blank" title="搜索京东有优惠券的商品,请自行输入关键字,尽量简短。">京东搜索</a></div><div class="tb-btn-add" style="padding-top:10px;"><a href="https://youhui.pinduoduo.com/search/landing?keyword=&pid=1687692_15178080&cpsSign=CM_200617_1687692_15178080_73246e704c0b4a7cc45c9fbf914dc98c&duoduo_type=2" target="_blank" title="搜索拼多多有优惠券的商品,请自行输入关键字,尽量简短。">拼多多搜索</a></div>';

            $('.tb-action').append(taobao,taobao2,taobao3);

		}
        //天猫商品
        else if(url == 'detail.tmall.com'){
            id = $("link[rel=canonical]").attr("href");
            id = id.split("id=")[1];
            name = $('meta[name=keywords]').attr('content');

            var tmall =   '<div class="tb-btn-buy tb-btn-sku" style="padding-top:10px;"><a href="https://tk.xunhuo.vip/api_gaoyong_url_m.aspx?id=24557&sid=&relationId=&code='+ encodeURI(id) +'&type=0&type2=0" title="请点击这里领券购买,部分商品可能没有优惠券或失效,进入链接后可直接点击优惠券上方图片购买或尝试用搜券搜索其他的商品。注意:有些商品商家没做推广所以会报错无视即可!" target="_blank">获得优惠券</a></div><div class="tb-btn-basket tb-btn-sku" style="padding-top:10px;"><a href="https://tk.xunhuo.vip/m/item/list_s_super.aspx?id=24557&sid=&relationId=&keyword='+ encodeURI(name) +'" title="点这里可以搜索全部店铺相同名称的全部宝贝,如果想要搜索到更多商品,请修改搜索关键字,尽量简短,因为很多商家为了做优化添加了很多无用的词,造成无法搜索到更多商品。!" target="_blank">全网搜券</a></div>';
			var tmall2 =   '<div class="tb-btn-buy tb-btn-sku" style="padding-top:10px;"><a href="https://m.tb.cn/h.VN0ZC0J"target="_blank">618超级红包领取</a></div><div class="tb-btn-basket tb-btn-sku" style="padding-top:10px;"><a href="https://tk.xunhuo.vip/jingxuan.aspx?id=24557" target="_blank">每日精选</a></div>';
			var tmall3 =   '<div class="tb-btn-buy tb-btn-sku" style="padding-top:10px;"><a href="http://jk.xunhuo.vip/?ah=total&kw=" target="_blank" title="搜索京东有优惠券的商品,请自行输入关键字,尽量简短。">京东搜索</a></div><div class="tb-btn-basket tb-btn-sku" style="padding-top:10px;"><a href="https://youhui.pinduoduo.com/search/landing?keyword=&pid=1687692_15178080&cpsSign=CM_200617_1687692_15178080_73246e704c0b4a7cc45c9fbf914dc98c&duoduo_type=2" target="_blank" title="搜索拼多多有优惠券的商品,请自行输入关键字,尽量简短。">拼多多搜索</a></div>';

            $('.tb-action').append(tmall,tmall2,tmall3);

        }
             //天猫超市
        else if(url == 'chaoshi.detail.tmall.com'){
            id = $('a[id=J_AddFavorite]').attr('data-aldurl')
            id = id.split("id=")[1]
            name = $('input[name=title]').attr('value');
            var chaoshi = '<div class="tb-btn-buy tb-btn-sku" style="padding-top:10px;"><a href="https://tk.xunhuo.vip/api_gaoyong_url_m.aspx?id=24557&sid=&relationId=&code='+ encodeURI(id) +'&type=0&type2=0" title="请点击这里领券购买,部分商品可能没有优惠券或失效,进入链接后可直接点击优惠券上方图片购买或尝试用搜券搜索其他的商品。注意:有些商品商家没做推广所以会报错无视即可!" target="_blank">获得优惠券</a></div><div class="tb-btn-basket tb-btn-sku" style="padding-top:10px;"><a href="https://tk.xunhuo.vip/m/item/list_s_super.aspx?id=24557&sid=&relationId=&keyword='+ encodeURI(name) +'" title="点这里可以搜索全部店铺相同名称的全部宝贝,如果想要搜索到更多商品,请修改搜索关键字,尽量简短,因为很多商家为了做优化添加了很多无用的词,造成无法搜索到更多商品。!" target="_blank">全网搜券</a></div><br />';
             var chaoshi2 = '<div class="tb-btn-buy tb-btn-sku" style="padding-top:10px;"><a href="https://m.tb.cn/h.VN0ZC0J"target="_blank">618超级红包领取</a></div><div class="tb-btn-basket tb-btn-sku" style="padding-top:10px;"><a href="https://tk.xunhuo.vip/item/love.aspx?type=0&sort=0&type3=13&page=1&id=24557&sid=&relationId=" title="天猫超市单品包邮宝贝" target="_blank">天猫超市热销</a></div><br /><br />';
            $('.tb-sku').append(chaoshi,chaoshi2);

        }
        else if(url == 'detail.tmall.hk'){
            id = $("link[rel=canonical]").attr("href");
            id = id.split("id=")[1];
            name = $('meta[name=keywords]').attr('content');
            var tmall_hk =   '<div class="tb-btn-buy tb-btn-sku" style="padding-top:10px;"><a href="https://tk.xunhuo.vip/api_gaoyong_url_m.aspx?id=24557&sid=&relationId=&code='+ encodeURI(id) +'&type=0&type2=0" title="请点击这里领券购买,部分商品可能没有优惠券或失效,进入链接后可直接点击优惠券上方图片购买或尝试用搜券搜索其他的商品。注意:有些商品商家没做推广所以会报错无视即可!" target="_blank">获得优惠券</a></div><div class="tb-btn-basket tb-btn-sku" style="padding-top:10px;"><a href="https://tk.xunhuo.vip/m/item/list_s_super.aspx?id=24557&sid=&relationId=&keyword='+ encodeURI(name) +'" title="点这里可以搜索全部店铺相同名称的全部宝贝,如果想要搜索到更多商品,请修改搜索关键字,尽量简短,因为很多商家为了做优化添加了很多无用的词,造成无法搜索到更多商品。!" target="_blank">全网搜券</a></div><br />';
			$('.tb-sku').append(tmall_hk);
        }
//淘宝没有推广商品提示
             else if(url == 'tk.xunhuo.vip'){
            var tk =   '<p>抱歉这个商品没有推广,请尝试点击下方全网搜索搜寻下。</p><a href="https://tk.xunhuo.vip/m/item/list_s_super.aspx?id=24557&sid=&relationId=" target="_blank">全网搜索</a></div><br />';
			$('h2').append(tk);
        }
            //京东
             else if(url == 'item.jd.com'){
            id = $("link[rel=canonical]").attr("href");
            id = id.split(".com/")[1];
            id = id.split(".html")[0];
            name = $('meta[name=keywords]').attr('content');
            var jd =   '<a href="https://jk.xunhuo.vip/?ah=detail&id='+ encodeURI(id) +'" class="btn-special1 btn-lg" style="margin-right: 10px;" target="_blank">领取优惠券</a>';
           var jd2 =   '<a href="https://u.jd.com/UrPQvZ" class="btn-special1 btn-lg" style="margin-right: 10px;" target="_blank">618红包领取</a>';
                 var jd3 =   '<a href="http://jk.xunhuo.vip/?ah=total&kw=" class="btn-special1 btn-lg" style="margin-right: 10px;" title="搜索全网有优惠券的商品,请自行输入关键字,尽量简短。" target="_blank">京东全网搜索</a>';
                  var jd4 =   '<a href="https://tk.xunhuo.vip/m/index_super.aspx?id=24557&sid=&relationId=&relationId=" class="btn-special1 btn-lg" style="margin-right: 10px; margin-top: 10px;" title="搜索淘宝有优惠券的商品,请自行输入关键字,尽量简短。" target="_blank">淘宝搜索</a>';
                  var jd5 =   '<a href="https://youhui.pinduoduo.com/search/landing?keyword=&pid=1687692_15178080&cpsSign=CM_200617_1687692_15178080_73246e704c0b4a7cc45c9fbf914dc98c&duoduo_type=2" class="btn-special1 btn-lg" style="margin-right: 10px; margin-top: 10px;" title="搜索拼多多有优惠券的商品,请复制标题或自行输入关键字,尽量简短。" target="_blank">拼多多搜索</a>';
			$('div.itemInfo-wrap').append(jd,jd2,jd3,jd4,jd5);
        }

            //拼多多
             else if(url == 'youhui.pinduoduo.com'){

                 if(location.href.indexOf('?') ==-1){
        location.href=location.href+"?pid=1687692_15178080&cpsSign=CM_200617_1687692_15178080_73246e704c0b4a7cc45c9fbf914dc98c&duoduo_type=2";
    }
             id = window.location.href;
            id = id.split("goodsId=")[1];
            name = $('meta[name=keywords]').attr('content');
            var pdd =   '<style>.goods-detail-wrapper .top-wrapper {height: 100%; !important;}.goods-detail-wrapper .buy-btn {float: left; margin: 10px 0 0 10px;}</style>';
           var pdd2 =   '<a href="https://sapi.k780.com/?app=qr.get&data=https://p.pinduoduo.com/mnh9jLZZ" title="红包福利专享会场,超多大额优惠券发放中,一键立抢,点击后扫码获取。" class="buy-btn" style="background-color: #171616;" target="_blank">天天拆红包</a>';
                 var pdd3 =   '<a href="https://sapi.k780.com/?app=qr.get&data=https://p.pinduoduo.com/0sR9jgWK" title="【今日可领】点一下就能领15元现金,先到先得!,点击后扫码获取。" class="buy-btn" style="background-color: #171616;" target="_blank">现金刮刮卡</a>';
                 var pdd4 =   '<a href="https://youhui.pinduoduo.com/search/landing?keyword=&pid=1687692_15178080&cpsSign=CM_200617_1687692_15178080_73246e704c0b4a7cc45c9fbf914dc98c&duoduo_type=2" class="buy-btn" style="background-color: #171616;" target="_blank">拼多多全网搜索</a>';
                 var pdd5 =   '<a href="https://sapi.k780.com/?app=qr.get&data=https://p.pinduoduo.com/oLn9wGsH" title="今日爆款数量有限,更有超多大额优惠券发放中,一键立抢,点击后扫码获取。" class="buy-btn" style="background-color: #171616;" target="_blank">今日爆款</a>';
                  var pdd6 =   '<a href="https://tk.xunhuo.vip/m/index_super.aspx?id=24557&sid=&relationId=" title="请复制标题自行搜索相关关键字。" class="buy-btn" style="background-color: #171616;" target="_blank">淘宝搜索</a>';
                  var pdd7 =   '<a href="http://jk.xunhuo.vip/?ah=total&kw=" title="请复制标题自行搜索相关关键字。" class="buy-btn" style="background-color: #171616;" target="_blank">京东搜索</a>';
			$('div.top-right-wrapper').append(pdd,pdd2,pdd3,pdd5,pdd4,pdd6,pdd7);

                         //券链接
          url = 'https://pdd.xunhuo.vip/api/2.php?id='+ encodeURI(id) +'';
          $.getJSON(url, function(json){
        //$('.top-right-wrapper').append('<a href="https://sapi.k780.com/?app=qr.get&data='+ json.data.data +'" title="点击打开后请用拼多多app或微信扫码领取,可以使用浏览器等扫码。" class="buy-btn"  target="_blank">领取优惠券</a>');
});
                      }
    });
})();