// ==UserScript==
// @name 一键领取淘宝、天猫、京东、拼多多、唯品会、抖音隐藏优惠券!全网查券!【免费领取淘宝京东超级红包、外卖红包、出行红包】
// @namespace http://lctnq.yhzu.cn
// @version 1.3.8
// @description 1查询商家设置的隐藏优惠券,省钱开心购物,直接领取优惠券购买,免费领取淘宝京东超级红包、外卖红包、公交地铁红包;2、不好用了请反馈给我更新(QQ群:668600818)。
// @author 赤练丶风
// @match *://s.taobao.com/*
// @match *://ai.taobao.com/search/*
// @match *://list.tmall.com/*
// @match *://item.taobao.com/*
// @match *://detail.tmall.com/*
// @match *://detail.tmall.hk/*
// @match *://chaoshi.detail.tmall.com/*
// @match *://detail.liangxinyao.com/*
// @match *://*.jd.com/*
// @match *://*.jd.hk/*
// @match *://*.yiyaojd.com/*
// @match *://*.jd.com/*
// @match *://*.vip.com/*
// @match *://*.vipglobal.hk/*
// @exclude *://login.taobao.com/*
// @exclude *://login.tmall.com/*
// @exclude *://uland.taobao.com/*
// @exclude *://pages.tmall.com/*
// @exclude *://wq.jd.com/*
// @require https://cdn.bootcss.com/jquery/2.2.4/jquery.min.js
// @antifeature referral-link 【应GreasyFork代码规范要求:含有优惠券查询功能的脚本必须添加此提示!脚本使用过程中无任何强制跳转等行为,代码可查,请大家放心!在此感谢大家的理解...】
// @grant GM_openInTab
// @grant GM_registerMenuCommand
// @license AGPL
// @require https://greasyfork.org/scripts/456558-myconstant/code/myConstant.js
// ==/UserScript==
(function() {
GM_registerMenuCommand("首选全网查券地址",
function() {
window.open("https://4kma.cn/mQ3Fr", "_blank");
});
GM_registerMenuCommand("备用淘宝查券地址",
function() {
window.open("http://lctnq.yhzu.cn", "_blank");
});
GM_registerMenuCommand("外卖出行生活红包(微信扫一扫)",
function() {
window.open("https://yijllnji.jutuike.cn/#/?code=YIJLLNji", "_blank");
});
})();
(function () {
'use strict';
var TBCoupon = "https://hdkcmsd36.kuaizhan.com/?cid=wdnT9E6#/search?keyword=";
var JDCoupon = "https://hdkcmsd36.kuaizhan.com/?cid=wdnT9E6#/detail?platform=2&super=1&id="
var VipCoupon = "https://hdkcmsd36.kuaizhan.com/?cid=wdnT9E6#/detail?platform=5&itemid="
var TBSearch = "https://hdkcmsd36.kuaizhan.com/?cid=wdnT9E6#/search?keyword=";
var JDSearch = "https://hdkcmsd36.kuaizhan.com/?cid=wdnT9E6#/search?pt=2&keyword="
var VipSearch = "https://hdkcmsd36.kuaizhan.com/?cid=wdnT9E6#/search?pt=5&keyword="
var NewAct = "https://docs.qq.com/doc/DSUltSVBSdFp4d1NT";
var Clabel = "领取商品优惠券";
var AllSearch = "全网搜索";
var Rlabel = "找券机器人|最新活动";
var WMPacket = "https://yijllnji.jutuike.cn/#/?code=YIJLLNji";
var VQPacket = "https://kurl03.cn/6ysaN";
var WMlabel = "外卖出行生活红包";
var VQlabel = "双12活动线报群";
var WMtitle = "外卖出行生活红包(微信扫一扫)";
var VQtitle = "双12活动线报群";
var TBPacket = "https://m.tb.cn/h.5lnXOvH";
var JDPacket = "https://t.vip.com/SiYeoW286q6";
var VipPacket = "https://t.vip.com/SiYeoW286q6";
var TBlabel = "双12淘宝红包";
var JDlabel = "双12唯品会红包";
var Viplabel = "唯品会红包";
var TBtitle = "每天可拆1次,12月08日-12月12日";
var JDtitle = "每天可拆3次,10月30日-12月14日";
var Viptitle = "每天可拆3次,10月30日-12月14日";
var ButtonSwitch = 1;
$(document).ready(function () {
var host = window.location.host;
var pid = '';
var pname = '';
var cssSelector = '';
pid = location.href;
if (host.indexOf('taobao.com') > 0) {
pid = pid.split("id=")[1];
pid = pid.split("&")[0];
pname = $.trim($('.tb-main-title').text());
pid=pname;
cssSelector = '.tb-action';
} else if (host == 'chaoshi.detail.tmall.com') {
pid = pid.split("id=")[1];
pid = pid.split("&")[0];
setTimeout(function(){pname = document.title;pname = pname.split("-tmall.com天猫")[0]; pid=pname;},1000);
cssSelector = '.Actions--root--hwEujgc';
} else if (host.indexOf('tmall.hk') > 0) {
pid = pid.split("id=")[1];
pid = pid.split("&")[0];
setTimeout(function(){pname = document.title;pname = pname.split("-tmall.com天猫")[0]; pid=pname;},1000);
cssSelector = '.Actions--root--hwEujgc';
} else if (host.indexOf('tmall.com') > 0) {
pid = pid.split("id=")[1];
pid = pid.split("&")[0];
setTimeout(function(){pname = document.title;pname = pname.split("-tmall.com天猫")[0]; pid=pname;},1000);
cssSelector = '.Actions--root--hwEujgc';
} else if (host.indexOf('jd.com') > 0) {
pid = window.location.pathname;
pid = pid.split("/")[1];
pid = pid.split(".html")[0];
pname = $.trim($('.sku-name').text());
cssSelector = '#choose-btns';
} else if (host.indexOf('vip.com') > 0) {
function addGlobalStyle(css) {
var head, style;
head = document.getElementsByTagName('head')[0];
if (!head) { return; }
style = document.createElement('style');
style.type = 'text/css';
style.innerHTML = css;
head.appendChild(style);
}
addGlobalStyle(`
.comparePricess {
display: block;
margin-top: 6px;
font-size: 16px;
color: #fff;
text-align: center;
}`);
pid = window.location.pathname;
pid = pid.split("-")[2];
pid = pid.split(".html")[0];
cssSelector = 'div#J_detail_buy';
setTimeout(() => {
pname = document.getElementsByTagName('title')[0].innerHTML;
$(cssSelector).after(obtainAppendHtml(host,pid,pname));
},
2000);
}
setTimeout(function(){
$(cssSelector).append(obtainAppendHtml(host,pid,pname));},1200);
//,Viptitle,Clabel,NewAct,Rlabel,AllSearch,WMlabel,VQlabel,WMPacket,VQPacket,WMtitle,VQtitle,ButtonSwitch
});
function obtainAppendHtml(host,pid,pname) {
var pubStyle='background: linear-gradient(90deg, rgb(255, 100, 34), rgb(255, 0, 64)); box-shadow: rgba(255, 100, 34, 0.2) 0px 9px 13px 0px; vertical-align: top;';
var fontStyle='display: inline; font-size: 16px; font-weight: bold; color: rgb(255, 255, 255);';
var tmallStyle='background: linear-gradient(90deg, rgb(255, 203, 0), rgb(255, 148, 2)); box-shadow: rgba(255, 203, 0, 0.2) 0px 9px 13px 0px; vertical-align: top;';
var hkStyle='background: linear-gradient(90deg, rgb(157, 111, 250), rgb(139, 36, 220)); box-shadow: rgba(157, 111, 250, 0.2) 0px 9px 13px 0px; vertical-align: top;';
var divClass='Actions--leftButtons--1M3KkF7';
var buyClass='Actions--btn--3islUTb Actions--leftBtn--3kx8kg8 Actions--primaryBtn--1UPmwd4';
var addClass='Actions--btn--3islUTb Actions--rightBtn--3Ma6IDT Actions--primaryBtn--1UPmwd4';
var tbuyClass='<div class="div-inline"><div class="tb-btn-buy" style="padding-top:11px;">'
var taddClass='<div class="div-inline"><div class="tb-btn-add" style="padding-top:11px;">'
if (host.indexOf('taobao.com') > 0) {
if(ButtonSwitch==1){
return tbuyClass+'<a href="' + TBCoupon + pid + '" target="_blank">' + Clabel + '</a></div></div>'
+taddClass+'<a href="' + TBSearch + encodeURI(pname) + '" target="_blank">' + AllSearch + '</a></div></div>'
+tbuyClass+'<a href="http://lctnq.yhzu.cn" target="_blank">备用查券地址</a></div></div>'
+taddClass+'<a href="' + NewAct + '" target="_blank">' + Rlabel + '</a></div></div>'
+tbuyClass+'<a href="' + WMPacket + ' " title="' + WMtitle + '" target="_blank">' + WMlabel + '</a></div></div>'
+taddClass+'<a href="' + VQPacket + '" title="' + VQtitle + '" target="_blank">' + VQlabel + '</a></div></div>'
+tbuyClass+'<a href="' + TBPacket + ' " title="' + TBtitle + '" target="_blank">' + TBlabel + '</a></div></div>'
+taddClass+'<a href="' + JDPacket + '" title="' + JDtitle + '" target="_blank">' + JDlabel + '</a></div></div>';
}else{
return tbuyClass+'<a href="' + TBCoupon + pid + '" target="_blank">' + Clabel + '</a></div></div>'
+taddClass+'<a href="' + TBSearch + encodeURI(pname) + '" target="_blank">' + AllSearch + '</a></div></div>'
+tbuyClass+'<a href="http://lctnq.yhzu.cn" target="_blank">备用查券地址</a></div></div>'
+taddClass+'<a href="' + NewAct + '" target="_blank">' + Rlabel + '</a></div></div>'
+tbuyClass+'<a href="' + WMPacket + ' " title="' + WMtitle + '" target="_blank">' + WMlabel + '</a></div></div>'
+taddClass+'<a href="' + VQPacket + '" title="' + VQtitle + '" target="_blank">' + VQlabel + '</a></div></div>';
}
} else if (host == 'chaoshi.detail.tmall.com') {
if(ButtonSwitch==1){
return '<br/><div class="'+divClass+'" style="padding-top:3px;"><button class="'+buyClass+'" style="'+pubStyle+'"><a href="' + TBCoupon + pid + '" target="_blank" style="'+fontStyle+'">' + Clabel + '</a></button>'
+'<button class="'+addClass+'" style="'+tmallStyle+'"><a href="' + TBSearch + encodeURI(pname) + '" target="_blank" style="'+fontStyle+'">' + AllSearch + '</a></button></div>'
+'<div class="'+divClass+'" style="padding-top:3px;"><button class="'+buyClass+'" style="'+pubStyle+'"><a href="http://lctnq.yhzu.cn" target="_blank" style="'+fontStyle+'">备用查券地址</a></button>'
+'<button class="'+addClass+'" style="'+tmallStyle+'"><a href="' + NewAct + '" target="_blank" style="'+fontStyle+'">' + Rlabel + '</a></button></div>'
+'<div class="'+divClass+'" style="padding-top:3px;"><button class="'+buyClass+'" style="'+pubStyle+'"><a href="' + WMPacket + '" title="' + WMtitle + '" target="_blank" style="'+fontStyle+'">' + WMlabel + '</a></button>'
+'<button class="'+addClass+'" style="'+tmallStyle+'"><a href="' + VQPacket + '" title="' + VQtitle + '" target="_blank" style="'+fontStyle+'">' + VQlabel + '</a></button></div>'
+'<div class="'+divClass+'" style="padding-top:3px;"><button class="'+buyClass+'" style="'+pubStyle+'"><a href="' + TBPacket + '" title="' + TBtitle + '" target="_blank" style="'+fontStyle+'">' + TBlabel + '</a></button>'
+'<button class="'+addClass+'" style="'+tmallStyle+'"><a href="' + JDPacket + '" title="' + JDtitle + '" target="_blank" style="'+fontStyle+'">' + JDlabel + '</a></button></div>'
}else{
return'<br/><div class="'+divClass+'" style="padding-top:3px;"><button class="'+buyClass+'" style="'+pubStyle+'"><a href="' + TBCoupon + pid + '" target="_blank" style="'+fontStyle+'">' + Clabel + '</a></button>'
+'<button class="'+addClass+'" style="'+tmallStyle+'"><a href="' + TBSearch + encodeURI(pname) + '" target="_blank" style="'+fontStyle+'">' + AllSearch + '</a></button></div>'
+'<div class="'+divClass+'" style="padding-top:3px;"><button class="'+buyClass+'" style="'+pubStyle+'"><a href="http://lctnq.yhzu.cn" target="_blank" style="'+fontStyle+'">备用查券地址</a></button>'
+'<button class="'+addClass+'" style="'+tmallStyle+'"><a href="' + NewAct + '" target="_blank" style="'+fontStyle+'">' + Rlabel + '</a></button></div>'
+'<div class="'+divClass+'" style="padding-top:3px;"><button class="'+buyClass+'" style="'+pubStyle+'"><a href="' + WMPacket + '" title="' + WMtitle + '" target="_blank" style="'+fontStyle+'">' + WMlabel + '</a></button>'
+'<button class="'+addClass+'" style="'+tmallStyle+'"><a href="' + VQPacket + '" title="' + VQtitle + '" target="_blank" style="'+fontStyle+'">' + VQlabel + '</a></button></div>'
}
} else if (host.indexOf('tmall.hk') > 0) {
if(ButtonSwitch==1){
return '<div class="'+divClass+'" style="padding-top:3px;"><button class="'+buyClass+'" style="'+pubStyle+'"><a href="' + TBCoupon + pid + '" target="_blank" style="'+fontStyle+'">' + Clabel + '</a></button>'
+'<button class="'+addClass+'" style="'+hkStyle+'"><a href="' + TBSearch + encodeURI(pname) + '" target="_blank" style="'+fontStyle+'">' + AllSearch + '</a></button></div>'
+'<div class="'+divClass+'" style="padding-top:3px;"><button class="'+buyClass+'" style="'+pubStyle+'"><a href="http://lctnq.yhzu.cn" target="_blank" style="'+fontStyle+'">备用查券地址</a></button>'
+'<button class="'+addClass+'" style="'+hkStyle+'"><a href="' + NewAct + '" target="_blank" style="'+fontStyle+'">' + Rlabel + '</a></button></div>'
+'<div class="'+divClass+'" style="padding-top:3px;"><button class="'+buyClass+'" style="'+pubStyle+'"><a href="' + WMPacket + '" title="' + WMtitle + '" target="_blank" style="'+fontStyle+'">' + WMlabel + '</a></button>'
+'<button class="'+addClass+'" style="'+hkStyle+'"><a href="' + VQPacket + '" title="' + VQtitle + '" target="_blank" style="'+fontStyle+'">' + VQlabel + '</a></button></div>'
+'<div class="'+divClass+'" style="padding-top:3px;"><button class="'+buyClass+'" style="'+pubStyle+'"><a href="' + TBPacket + '" title="' + TBtitle + '" target="_blank" style="'+fontStyle+'">' + JDlabel + '</a></button>'
+'<button class="'+addClass+'" style="'+hkStyle+'"><a href="' + JDPacket + '" title="' + JDtitle + '" target="_blank" style="'+fontStyle+'">' + JDlabel + '</a></button></div>'
}else{
return '<div class="'+divClass+'" style="padding-top:3px;"><button class="'+buyClass+'" style="'+pubStyle+'"><a href="' + TBCoupon + pid + '" target="_blank" style="'+fontStyle+'">' + Clabel + '</a></button>'
+'<button class="'+addClass+'" style="'+hkStyle+'"><a href="' + TBSearch + encodeURI(pname) + '" target="_blank" style="'+fontStyle+'">' + AllSearch + '</a></button></div>'
+'<div class="'+divClass+'" style="padding-top:3px;"><button class="'+buyClass+'" style="'+pubStyle+'"><a href="http://lctnq.yhzu.cn" target="_blank" style="'+fontStyle+'">备用查券地址</a></button>'
+'<button class="'+addClass+'" style="'+hkStyle+'"><a href="' + NewAct + '" target="_blank" style="'+fontStyle+'">' + Rlabel + '</a></button></div>'
+'<div class="'+divClass+'" style="padding-top:3px;"><button class="'+buyClass+'" style="'+pubStyle+'"><a href="' + WMPacket + '" title="' + WMtitle + '" target="_blank" style="'+fontStyle+'">' + WMlabel + '</a></button>'
+'<button class="'+addClass+'" style="'+hkStyle+'"><a href="' + VQPacket + '" title="' + VQtitle + '" target="_blank" style="'+fontStyle+'">' + VQlabel + '</a></button></div>'
}
} else if (host.indexOf('tmall.com') > 0) {
if(ButtonSwitch==1){
return '<div class="'+divClass+'" style="padding-top:3px;"><button class="'+buyClass+'" style="'+pubStyle+'"><a href="' + TBCoupon + pid + '" target="_blank" style="'+fontStyle+'">' + Clabel + '</a></button>'
+'<button class="'+addClass+'" style="'+tmallStyle+'"><a href="' + TBSearch + encodeURI(pname) + '" target="_blank" style="'+fontStyle+'">' + AllSearch + '</a></button></div>'
+'<div class="'+divClass+'" style="padding-top:3px;"><button class="'+buyClass+'" style="'+pubStyle+'"><a href="http://lctnq.yhzu.cn" target="_blank" style="'+fontStyle+'">备用查券地址</a></button>'
+'<button class="'+addClass+'" style="'+tmallStyle+'"><a href="' + NewAct + '" target="_blank" style="'+fontStyle+'">' + Rlabel + '</a></button></div>'
+'<div class="'+divClass+'" style="padding-top:3px;"><button class="'+buyClass+'" style="'+pubStyle+'"><a href="' + WMPacket + '" title="' + WMtitle + '" target="_blank" style="'+fontStyle+'">' + WMlabel + '</a></button>'
+'<button class="'+addClass+'" style="'+tmallStyle+'"><a href="' + VQPacket + '" title="' + VQtitle + '" target="_blank" style="'+fontStyle+'">' + VQlabel + '</a></button></div>'
+'<div class="'+divClass+'" style="padding-top:3px;"><button class="'+buyClass+'" style="'+pubStyle+'"><a href="' + TBPacket + '" title="' + TBtitle + '" target="_blank" style="'+fontStyle+'">' + TBlabel + '</a></button>'
+'<button class="'+addClass+'" style="'+tmallStyle+'"><a href="' + JDPacket + '" title="' + JDtitle + '" target="_blank" style="'+fontStyle+'">' + JDlabel + '</a></button></div>'
}else{
return '<div class="'+divClass+'" style="padding-top:3px;"><button class="'+buyClass+'" style="'+pubStyle+'"><a href="' + TBCoupon + pid + '" target="_blank" style="'+fontStyle+'">' + Clabel + '</a></button>'
+'<button class="'+addClass+'" style="'+tmallStyle+'"><a href="' + TBSearch + encodeURI(pname) + '" target="_blank" style="'+fontStyle+'">' + AllSearch + '</a></button></div>'
+'<div class="'+divClass+'" style="padding-top:3px;"><button class="'+buyClass+'" style="'+pubStyle+'"><a href="http://lctnq.yhzu.cn" target="_blank" style="'+fontStyle+'">备用查券地址</a></button>'
+'<button class="'+addClass+'" style="'+tmallStyle+'"><a href="' + NewAct + '" target="_blank" style="'+fontStyle+'">' + Rlabel + '</a></button></div>'
+'<div class="'+divClass+'" style="padding-top:3px;"><button class="'+buyClass+'" style="'+pubStyle+'"><a href="' + WMPacket + '" title="' + WMtitle + '" target="_blank" style="'+fontStyle+'">' + WMlabel + '</a></button>'
+'<button class="'+addClass+'" style="'+tmallStyle+'"><a href="' + VQPacket + '" title="' + VQtitle + '" target="_blank" style="'+fontStyle+'">' + VQlabel + '</a></button></div>'
}
} else if (host.indexOf('jd.com') > 0) {
if(ButtonSwitch==1){
return '<a href="' + JDCoupon + pid + '" target="_blank" class="btn-special1 btn-lg">' + Clabel + '</a>'
+'<br/><br/><br/><a href="' + JDSearch + encodeURI(pname) + '" target="_blank" class="btn-special1 btn-lg">' + AllSearch + '</a>'
+'<a href="' + NewAct + '" target="_blank" class="btn-special1 btn-lg">' + Rlabel + '</a>'
+'<a href="' + WMPacket + '" title="' + WMtitle + '" target="_blank" class="btn-special1 btn-lg">' + WMlabel + '</a>'
+'<a href="' + VQPacket + '" title="' + VQtitle + '" target="_blank" class="btn-special1 btn-lg">' + VQlabel + '</a>'
+'<a href="' + TBPacket + '" title="' + TBtitle + '" target="_blank" class="btn-special1 btn-lg">' + TBlabel + '</a>'
+'<a href="' + JDPacket + '" title="' + JDtitle + '" target="_blank" class="btn-special1 btn-lg">' + JDlabel + '</a>';
}else{
return '<a href="' + JDCoupon + pid + '" target="_blank" class="btn-special1 btn-lg">' + Clabel + '</a>'
+'<br/><br/><br/><a href="' + JDSearch + encodeURI(pname) + '" target="_blank" class="btn-special1 btn-lg">' + AllSearch + '</a>'
+'<a href="' + NewAct + '" target="_blank" class="btn-special1 btn-lg">' + Rlabel + '</a>'
+'<a href="' + WMPacket + '" title="' + WMtitle + '" target="_blank" class="btn-special1 btn-lg">' + WMlabel + '</a>'
+'<a href="' + VQPacket + '" title="' + VQtitle + '" target="_blank" class="btn-special1 btn-lg">' + VQlabel + '</a>';
}
} else if (host.indexOf('vip.com') > 0) {
return '<div id="J-button-box" class="button-box" style="margin-left:40px";><div class="ui-btn-loading-before clearfix J_cartAdd_Price">'
+ '<div class="hasComparePrice clearfix"><div class="comparePrice"><a class="comparePricess" href="' + VipCoupon + pid + '" target="_blank">' + Clabel + '</a></div>'
+ '<div class="finalPrice"><span class="finalPrice_price" ><a class="comparePricess" href="' + VipSearch + encodeURI(pname) + '" title="' + AllSearch + '" target="_blank">' + AllSearch + '</a></span></div>'
+ '<div class="hasComparePrice clearfix"><div class="comparePrice"><a class="comparePricess" href="' + VQPacket + '" title="' + VQtitle + '" target="_blank" >' + VQlabel + '</a></div>'
+ '<div class="finalPrice"><span class="finalPrice_price" ><a class="comparePricess" href="' + NewAct + '" title="' + Rlabel + '" target="_blank">最新活动</a></span></div>'
+ '</div></div>';
}
}
})();