Greasy Fork

Greasy Fork is available in English.

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

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

当前为 2020-06-18 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         淘宝天猫、京东优惠券一键领取,支持全网搜索,实实在在省钱。增加618超级红包领取
// @namespace    https://tk.xunhuo.vip
// @version      1.19
// @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      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>';
            $('.tb-action').append(taobao,taobao2);

		}
        //天猫商品
        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>';
			$('.tb-action').append(tmall,tmall2);

        }
             //天猫超市
        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>';
			$('div.itemInfo-wrap').append(jd,jd2,jd3);


        }
    });
})();