💯 懒人专用系列 ——— 简洁安全的增强购物省钱助手
// ==UserScript==
// @name 💯 懒人专用系列 ——— 简洁安全的增强购物省钱助手
// @namespace lr-toolbox-SPHelper
// @version 1.0.2
// @description ⭕自动显示淘宝、天猫、天猫超市、天猫国际、京东、京东国际的隐藏优惠券。⭕淘宝添加勾选仅显示淘宝商品不显示天猫商品等购物增强功能。❌拒绝任何干扰。❌拒绝强制跳转。⭕持续更新。
// @author lanhaha
// @icon data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAQ8ElEQVR4Xu1dCXQURRr+apIQT1wQw6EYBcSErCgKCoQowoocLirKeoAoLD5x2YDu+hTCPnddJeC5Ct6gIBtdlUMQxAPE95gMKkbhoWGCKMgpsPjUoEsIkNr3TadhMumeqe6ungRI8SBAV9fxf/Wf9VeXgIcipczy8PpR/aoQoszNBIWTl6SUvQAMAHAJgFbYsSsdH5e0wiclwMpVwK7dTpo7eupmNAO6dQa6dDJ+tsjYCGALgGIA7woh+FOpKAMi9+27GY0aDcSW7d3xyustECpJw2b22VBqUSCzNZB3yT6MuGkrmmcsR2XlIpGePk+FUkqAyG82/Bmnt7wWz868AC+92lSl4YY6ANIbAbfcsAt3DivBtu/ni3ZtpiWiS1xA5A8/dMe89wag7Vl98eDj52LnrhMTNdjw3IICzU8rx/33rMWGDYsxsO9icdppn9vRyRYQuXv3IKSkDMCkqT2x8IPTIZDeQGwPFJCyAgOv/A735S/FfrFQNP/NB1atWQIif947BPsrBmPUX7uj9OumEEjxMJSGV00KSHkAOe134sUnPkJqylzRuPH8WOLUAkTu23cjDsohGJGfizXhJg3U9IECHTvsxKynP0RaWpEQ4t3oHmoAIqW8DMBI5E/oh2XLT/VhKA1NmhS4uv92FI5/C8AMIcQhnVITkM8+fwjrN92EBx8/C0IEGqjnIwUoviYWhHFW65niwo5PmD0dAkTu+rkvUg/ehT6DL8X/9h3v41AamjYpcMLx5Xj/zSUQ8knRtGnEeTwMyML3/4HPVw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0XCnup9Y8Wa2SX9bjszM6aJTh/lmV7WOTMlnXhqHrduHYsF77QGR5ueYjtm2q+ReDLpqFVq3mCnuHD4tmg61Afn1104QabdhxOhBWBM+45glml8Tl7ICHbPX4tQmReLZR/8V243loUL5U0UfyMqhuP2uPlj7dXO/xnbMtUswcrLKIMRrYvb0R63mb3vKU5aXX4PUtMG4f3JPLFraXOuVesccEhFnby/6X1GGn8rfEC898bAdCeIeu5UVFQOQnt4fyz/uiX88ciZ2/PdEV1daHIsARM85o9kePHDvl1i/cY4YOaSWmIqrQ2JpJ6XsjA0beqNly1w8NzMb04syAHGiceehg2PUxyIovA5v1LAfcMewEmzbtUC0y3wxERmUKSr37++FJcEeyMnqiFmvZ2LFyibYuOVkCBwPiUYIIADJ31JUZ0BGt238nX9GMu+jjbzq/zBr13pu1q3xING86vZ5Zmsgt0sFbr1xM1q3CqKycrFIT5+nMihlQA6RZevWrpg+uwMymmRiUL+WCH6agc9WNcbKL47Dzt1pgEwFBMFJQQACVeBllQJEib8gq38TnMiXCg6DFemEzw8BVhtUlVk5r+OYDjW6aNEc6NoJ6HIh0PUioGXzCgCbUF4eROPGi4UQJapD8jYQ1V4a6ilT4P+GC5Ol+xIKnwAAAABJRU5ErkJggg==
// @match *://item.taobao.com/*
// @match *://chaoshi.detail.tmall.com/*
// @match *://detail.tmall.com/*
// @match *://detail.tmall.hk/*
// @match *://s.taobao.com/*
// @match *://item.jd.com/*
// @match *://*.yiyaojd.com/*
// @match *://npcitem.jd.hk/*
// @match *://*.liangxinyao.com/*
// @antifeature referral-link 此提示为GreasyFork代码规范要求含有查券功能的脚本必须添加,实际使用无任何强制跳转,代码可查,请知悉。
// @require https://lf9-cdn-tos.bytecdntp.com/cdn/expire-1-M/qrcodejs/1.0.0/qrcode.js
// @grant GM_registerMenuCommand
// @grant GM_setValue
// @grant GM_getValue
// @grant GM_deleteValue
// @grant GM_download
// @grant GM_setClipboard
// @grant GM_xmlhttpRequest
// ==/UserScript==
/*
***********************************************************
应Greasyfork.org网站规则要求,
懒人脚本将视频解析、音乐下载、视频下载等功能拆分为多个脚本:
https://greasyfork.org/zh-CN/scripts/467776
https://greasyfork.org/zh-CN/scripts/469604
https://greasyfork.org/zh-CN/scripts/469689
https://greasyfork.org/zh-CN/scripts/468015
https://greasyfork.org/zh-CN/scripts/469521
可自行分别安装。
***********************************************************
*/
(function() {
'use strict';
var Config ={
couponUrl:window.location.href,
couponHost:window.location.host,
isMobile:/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent),
taobaoCoupon:GM_getValue('taobaoCoupon',22),
jingdongCoupon:GM_getValue('jingdongCoupon',22),
showTaotaoGoods:GM_getValue('showTaotaoGoods',22),
}
var {couponUrl,
couponHost,
isMobile,
taobaoCoupon,
jingdongCoupon,
showTaotaoGoods
} = Config;
/*--lang--*/
var lang = {
coupon:'设置',
taobaoCoupon:'淘宝查券',
jingdongCoupon:'京东查券',
showTaotaoGoods:'仅显示淘宝商品',
};
GM_registerMenuCommand("设置", () =>menuSet());
function menuSet(){
var _this = this;
let menuSetStyle = `
.zhmMask{
z-index:999999999;
background-color:#000;
position: fixed;top: 0;right: 0;bottom: 0;left: 0;
opacity:0.8;
}
.wrap-box{
z-index:1000000000;
position:fixed;;top: 50%;left: 50%;transform: translate(-50%, -200px);
width: 300px;
color: #555;
background-color: #fff;
border-radius: 5px;
overflow:hidden;
font:16px numFont,PingFangSC-Regular,Tahoma,Microsoft Yahei,sans-serif !important;
font-weight:400 !important;
}
.setWrapHead{
background-color:#f24443;height:40px;color:#fff;text-align:center;line-height:40px;
}
.setWrapLi{
margin:0px;padding:0px;
}
.setWrapLi li{
background-color: #fff;
border-bottom:1px solid #eee;
margin:0px !important;
padding:12px 20px;
display: flex;
justify-content: space-between;align-items: center;
list-style: none;
}
.setWrapLiContent{
display: flex;justify-content: space-between;align-items: center;
}
.setWrapSave{
position:absolute;top:-2px;right:10px;font-size:24px;cursor:pointer
}
.iconSetFoot{
position:absolute;bottom:0px;padding:10px 20px;width:100%;
z-index:1000000009;background:#fef9ef;
}
.iconSetFootLi{
margin:0px;padding:0px;
}
.iconSetFootLi li{
display: inline-flex;
padding:0px 2px;
justify-content: space-between;align-items: center;
font-size: 12px;
}
.iconSetFootLi li a{
color:#555;
}
.iconSetFootLi a:hover {
color:#fe6d73;
}
.iconSetPage{
z-index:1000000001;
position:absolute;top:0px;left:300px;
background:#fff;
width:300px;
height:100%;
}
.iconSetUlHead{
padding:0px;
margin:0px;
}
.iconSetPageHead{
border-bottom:1px solid #ccc;
height:40px;
line-height:40px;
display: flex;
justify-content: space-between;
align-items: center;
background-color:#fe6d73;
color:#fff;
font-size: 15px;
}
.iconSetPageLi{
margin:0px;padding:0px;
}
.iconSetPageLi li{
list-style: none;
padding:8px 20px;
}
.zhihuSetPage{
z-index:1000000002;position:absolute;top:0px;left:300px;background:#fff;width:300px;height:100%;
}
.iconSetPageInput{
display: flex !important;justify-content: space-between;align-items: center;
}
.zhihuSetPageLi{
margin:0px;padding:0px;
}
.zhihuSetPageLi li{
border-bottom:1px solid #eee;padding:12px 20px;display:block;
}
.zhihuSetPageContent{
display: flex !important;justify-content: space-between;align-items: center;
}
li:last-child{
border-bottom:none;
}
.circular{
width: 40px;height: 20px;border-radius: 16px;transition: .3s;cursor: pointer;box-shadow: 0 0 3px #999 inset;
}
.round-button{
width: 20px;height: 20px;;border-radius: 50%;box-shadow: 0 1px 5px rgba(0,0,0,.5);transition: .3s;position: relative;
}
.back{
border: solid #FFF; border-width: 0 3px 3px 0; display: inline-block; padding: 3px;transform: rotate(135deg); -webkit-transform: rotate(135deg);margin-left:10px;cursor:pointer;
}
.to-right{
margin-left:20px; display: inline-block; padding: 3px;transform: rotate(-45deg); -webkit-transform: rotate(-45deg);cursor:pointer;
}
.iconSetSave{
font-size:24px;cursor:pointer;margin-right:5px;margin-bottom:4px;color:#FFF;
}
.zhm_set_page{
z-index:1000000003;
position:absolute;
top:0px;left:300px;
background:#fff;
width:300px;
height:100%;
}
.zhm_set_page_header{
border-bottom:1px solid #ccc;
height:40px;
line-height:40px;
display: flex;
justify-content: space-between;
align-items: center;
background-color:#fe6d73;
color:#fff;
font-size: 15px;
}
.zhm_set_page_content{
display: flex !important;justify-content: space-between;align-items: center;
}
.zhm_set_page_list{
margin:0px;padding:0px;
}
.zhm_set_page_list li{
/*border-bottom:1px solid #ccc;*/
padding:12px 20px;
display:block;
border-bottom:1px solid #eee;
}
/*-form-*/
:root {
--base-color: #434a56;
--white-color-primary: #f7f8f8;
--white-color-secondary: #fefefe;
--gray-color-primary: #c2c2c2;
--gray-color-secondary: #c2c2c2;
--gray-color-tertiary: #676f79;
--active-color: #227c9d;
--valid-color: #c2c2c2;
--invalid-color: #f72f47;
--invalid-icon: url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%3E%20%3Cpath%20d%3D%22M13.41%2012l4.3-4.29a1%201%200%201%200-1.42-1.42L12%2010.59l-4.29-4.3a1%201%200%200%200-1.42%201.42l4.3%204.29-4.3%204.29a1%201%200%200%200%200%201.42%201%201%200%200%200%201.42%200l4.29-4.3%204.29%204.3a1%201%200%200%200%201.42%200%201%201%200%200%200%200-1.42z%22%20fill%3D%22%23f72f47%22%20%2F%3E%3C%2Fsvg%3E");
}
.text-input {
font-size: 16px;
position: relative;
right:0px;
z-index: 0;
}
.text-input__body {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
background-color: transparent;
border: 1px solid var(--gray-color-primary);
border-radius: 3px;
height: 1.7em;
line-height: 1.7;
overflow: hidden;
padding: 2px 1em;
text-overflow: ellipsis;
transition: background-color 0.3s;
width:55%;
font-size:14px;
}
.text-input__body:-ms-input-placeholder {
color: var(--gray-color-secondary);
}
.text-input__body::-moz-placeholder {
color: var(--gray-color-secondary);
}
.text-input__body::placeholder {
color: var(--gray-color-secondary);
}
*, ::after, ::before {
box-sizing: initial !important;
}
.text-input__body[data-is-valid] {
padding-right: 1em;
}
.text-input__body[data-is-valid=true] {
border-color: var(--valid-color);
}
.text-input__body[data-is-valid=false] {
border-color: var(--invalid-color);
box-shadow: inset 0 0 0 1px var(--invalid-color);
}
.text-input__body:focus {
border-color: var(--active-color);
box-shadow: inset 0 0 0 1px var(--active-color);
outline: none;
}
.text-input__body:-webkit-autofill {
transition-delay: 9999s;
-webkit-transition-property: background-color;
transition-property: background-color;
}
.text-input__validator {
background-position: right 0.5em center;
background-repeat: no-repeat;
background-size: 1.5em;
display: inline-block;
height: 100%;
left: 0;
position: absolute;
top: 0;
width: 100%;
z-index: -1;
}
.text-input__body[data-is-valid=false] + .text-input__validator {
background-image: var(--invalid-icon);
}
.select-box {
box-sizing: inherit;
font-size: 16px;
position: relative;
transition: background-color 0.5s ease-out;
width:90px;
}
.select-box::after {
border-color: var(--gray-color-secondary) transparent transparent transparent;
border-style: solid;
border-width: 6px 4px 0;
bottom: 0;
content: "";
display: inline-block;
height: 0;
margin: auto 0;
pointer-events: none;
position: absolute;
right: -72px;
top: 0;
width: 0;
z-index: 1;
}
.select-box__body {
box-sizing: inherit;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
background-color: transparent;
border: 1px solid var(--gray-color-primary);
border-radius: 3px;
cursor: pointer;
height: 1.7em;
line-height: 1.7;
padding-left: 1em;
padding-right: calc(1em + 16px);
width: 140%;
font-size:14px;
padding-top:2px;
padding-bottom:2px;
}
.select-box__body[data-is-valid=true] {
border-color: var(--valid-color);
box-shadow: inset 0 0 0 1px var(--valid-color);
}
.select-box__body[data-is-valid=false] {
border-color: var(--invalid-color);
box-shadow: inset 0 0 0 1px var(--invalid-color);
}
.select-box__body.focus-visible {
border-color: var(--active-color);
box-shadow: inset 0 0 0 1px var(--active-color);
outline: none;
}
.select-box__body:-webkit-autofill {
transition-delay: 9999s;
-webkit-transition-property: background-color;
transition-property: background-color;
}
.textarea__body {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
background-color: transparent;
border: 1px solid var(--gray-color-primary);
border-radius: 0;
box-sizing: border-box;
font: inherit;
left: 0;
letter-spacing: inherit;
overflow: hidden;
padding: 1em;
position: absolute;
resize: none;
top: 0;
transition: background-color 0.5s ease-out;
width: 100%;
}
.textarea__body:only-child {
position: relative;
resize: vertical;
}
.textarea__body:focus {
border-color: var(--active-color);
box-shadow: inset 0 0 0 1px var(--active-color);
outline: none;
}
.textarea__body[data-is-valid=true] {
border-color: var(--valid-color);
box-shadow: inset 0 0 0 1px var(--valid-color);
}
.textarea__body[data-is-valid=false] {
border-color: var(--invalid-color);
box-shadow: inset 0 0 0 1px var(--invalid-color);
}
.textarea ._dummy-box {
border: 1px solid;
box-sizing: border-box;
min-height: 240px;
overflow: hidden;
overflow-wrap: break-word;
padding: 1em;
visibility: hidden;
white-space: pre-wrap;
word-wrap: break-word;
}
.toLeftMove{
nimation:moveToLeft 0.5s infinite;
-webkit-animation:moveToLeft 0.5s infinite; /*Safari and Chrome*/
animation-iteration-count:1;
animation-fill-mode: forwards;
}
@keyframes moveToLeft{
from {left:200px;}
to {left:0px;}
}
@-webkit-keyframes moveToLeft /*Safari and Chrome*/{
from {left:200px;}
to {left:0px;}
}
.toRightMove{
nimation:moveToRight 2s infinite;
-webkit-animation:moveToRight 2s infinite; /*Safari and Chrome*/
animation-iteration-count:1;
animation-fill-mode: forwards;
}
@keyframes moveToRight{
from {left:0px;}
to {left:2000px;}
}
@-webkit-keyframes moveToRight /*Safari and Chrome*/{
from {left:0px;}
to {left:200px;}
}
`;
domStyle .appendChild(document.createTextNode(menuSetStyle));
domHead.appendChild(domStyle);
var setListJson = [
{'optionName':lang.taobaoCoupon,'optionID':'taobaoCoupon','default':taobaoCoupon},
{'optionName':lang.jingdongCoupon,'optionID':'jingdongCoupon','default':jingdongCoupon},
{'optionName':lang.showTaotaoGoods,'optionID':'showTaotaoGoods','default':showTaotaoGoods},
];
var setHtml = "<div id='setMask' class='zhmMask'></div>";
setHtml +="<div class='wrap-box' id='setWrap'>";
setHtml +="<ul class='iconSetUlHead'><li class='iconSetPageHead'><span></span><span>"+lang.coupon+"</span><span class='iconSetSave'>×</span></li></ul>";
setHtml +="<ul class='setWrapLi'>";
for(var setN=0;setN<setListJson.length;setN++){
var listValue = GM_getValue(setListJson[setN].optionID,'22');
let backColor,arrowColor,switchBackCorlor;
if(listValue != 22){
backColor = '#fff';
arrowColor= '#EEE';
switchBackCorlor = '#FFF';
}else{
backColor = '#fe6d73';
arrowColor = '#CCC';
switchBackCorlor = '#FFE5E5';
}
if(setListJson[setN].optionID == ''){
arrowColor = '#EEE';
};
setHtml +="<li><span>"+setListJson[setN].optionName+"</span>";
setHtml +="<div class='setWrapLiContent'>";
setHtml +="<div class='circular' id='"+setListJson[setN].optionID+"' style='background-color: "+switchBackCorlor+";'><div class='round-button' style='background: "+backColor+";left: "+listValue+"px'></div></div>";
//setHtml +="<span class='to-right' data='"+setListJson[setN].optionID+"' style='border: solid "+arrowColor+"; border-width: 0 3px 3px 0;'></span></div></li>";
setHtml +="</div></li>";
}
setHtml +="</ul>";
setHtml +="<div style='height:40px;'></div>";
setHtml +="<div class='iconSetFoot' style=''>";
setHtml +="<ul class='iconSetFootLi'>";
setHtml +="<li></li>";
setHtml +='</ul>';
setHtml +='</div>';
setHtml += "</div>";
if(document.querySelector('#setMask')) return;
createElement('div','zhmMenu');
let zhmMenu = document.getElementById('zhmMenu');
zhmMenu.innerHTML = setHtml;
let timerZhmIcon = setInterval(function(){
if (document.querySelector('#zhmMenu')){
clearInterval(timerZhmIcon); // 取消定时器
let circular = document.querySelectorAll('.circular');
circular.forEach(function(item){
item.addEventListener('click', function(e){
let buttonStyle = item.children[0].style;
let left = buttonStyle.left;
left = parseInt(left);
let listLeftValue;
if(left==0){
buttonStyle.left = '22px';
buttonStyle.background = '#fe6d73';
item.style.background='#ffE5E5';
if(item.nextSibling && item.nextSibling.getAttribute('data')){
item.nextSibling.setAttribute('style','border: solid #ccc;border-width: 0 3px 3px 0;')
}
listLeftValue = 22;
}else{
buttonStyle.left = '0px';
buttonStyle.background = '#fff';
item.style.background='#fff';
if(item.nextSibling){
item.nextSibling.setAttribute('style','border: solid #EEE;border-width: 0 3px 3px 0;')
}
listLeftValue = 0;
}
let setListID = item.id;
GM_setValue(setListID,listLeftValue);
})
});
document.querySelector('.iconSetSave').addEventListener('click',()=>{
location.reload();
})
}
})
}
var domHead = document.getElementsByTagName('head')[0];
var domStyle = document.createElement('style');
domStyle.type = 'text/css';
domStyle.rel = 'stylesheet';
function getQueryString(e) {
var t = new RegExp("(^|&)" + e + "=([^&]*)(&|$)");
var a = window.location.search.substr(1).match(t);
if (a != null) return a[2];
return "";
}
function request(method,url,data,isCookie=''){
let request = new XMLHttpRequest();
return new Promise((resolve,reject)=>{
request.onreadystatechange=function(){
if(request.readyState==4){
if(request.status==200){
resolve(request.responseText);
}else{
reject(request.status);
}
}
}
request.open(method,url);
//request.withCredentials = true;
if(isCookie){
request.withCredentials = true;
}
request.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
request.send(data);
})
}
function createElement(dom,domId){
var rootElement = document.body;
var newElement = document.createElement(dom);
newElement.id = domId;
var newElementHtmlContent = document.createTextNode('');
rootElement.appendChild(newElement);
newElement.appendChild(newElementHtmlContent);
}
function getElement(css,all=''){
return new Promise((resolve,reject)=>{
let num = 0;
let timer = setInterval(function(){
num++
let dom;
if(all == false){
dom = document.querySelector(css);
if(dom){
clearInterval(timer);
resolve(dom);
}
}else{
dom = document.querySelectorAll(css);
if(dom.length>0){
clearInterval(timer);
resolve(dom);
}
}
if(num==20){
clearInterval(timer);
resolve(false);
}
},300)
})
}
function getCouponStyle(){
var couponStyle =`
html{
--right:100%;
--left:100%;
}
.zhm_coupon{
width:fit-content;
display: flex;
flex-direction:row;
justify-content: space-between;
align-items:flex-start;
font-size:14px;
position: relative;
margin:15px 0px 15px 0px;
}
.zhm_left{
display: flex;
flex-direction:row;
justify-content:flex-start;
align-items: center;
font-size:14px;
background: radial-gradient(circle at right top, transparent 8px,#fff 0) top left /var(--right) 51% no-repeat,
radial-gradient(circle at right bottom, transparent 8px, #fff 0) bottom left /var(--right) 51% no-repeat;
filter: drop-shadow(2px 2px 3px #888);
height:84px;
width:100%;
}
.zhm_img_icon{
padding:4px 0px 0px 5px;
margin-right:5px;
}
.zhm_img_icon img{
width:47px;
}
.zhm_content{
display: flex;
flex-direction:column;
margin-right: 18px;
}
.zhm_money{
display: flex;
flex-direction:row;
justify-content: flex-start;
align-items: center;
}
.zhm_amount_money{
display: flex;
align-items: flex-start;
}
.zhm_money_sign{
color:#f23030;
font-size: 20px;
font-family: Arial;
}
.zhm_money_num{
color:#f23030;
font-size:36px;
margin-left: 2px;
}
.zhm_condition{
color:#fb0f3a;
background-color: #fff4ec;
margin-top:5px;
margin-left: 5px;
padding:2px 5px;
font-size:12px;
}
.zhm_time{
display: flex;
flex-direction:row;
margin-top: -5px;
padding:2px 4px;
}
.zhm_term{
color:#fb0f3a;
border: 1px solid #fb0f3a;
border-radius:2px;
align-items: center;
padding:0px 4px;
font-size:12px;
height: 18px;
}
.zhm_date{
font-size: 14px;
font-weight: 500;
padding-left:8px;
}
.zhm_circle{
background: #fb0f3a url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAACXBIWXMAAAsSAAALEgHS3X78AAAAzUlEQVQYlS3NMUoDQRiG4Xcmu9lAXBQbq+1CCqucwsbOO3gAS29h4Qm8gRdIMKVglQVBFiSFjYKBqWZ2d/7PIvYPPE6SMCHvcD8HuLzBUsIKDyY8AN4RU+J9/8nH8oLYJ3wWchxBjJHtZkN1fsbp9omvhzv6ccDjQJLatlXXdZIk5awkKVzdKk9W8gBFUVDXNQA2jJTA7GSOmR2LpmkIIWA546spvO5wL29Qz3GSBBCHnnwIzO4f0fMaYoKy/Acm8A6+fxkX15ANqimY8QemCm920r1aUAAAAABJRU5ErkJggg==) repeat-y;
margin-top:10px;
width: 10px;
height:66px;
position: absolute;
right:97px;
z-index:2;
filter:none;
}
.zhm_link_coupon{
display: flex;
flex-direction:row;
align-items:center;
filter: drop-shadow(2px 2px 3px #888);
background: radial-gradient(circle at left top, transparent 8px, #fb053a 0) top right /var(--left) 50% no-repeat,
radial-gradient(circle at left bottom, transparent 8px, #fb053a 0) bottom right /var(--left) 50% no-repeat;
height: 84px;
padding:0px 6px 0px 4px;
}
.zhm_get_link_text{
cursor:pointer;
margin-top: 0px;
writing-mode:vertical-lr;
letter-spacing:0px;
color: #fff !important;
font-size:14px;
font-family:"Microsoft YaHei";
text-decoration:none;
background: radial-gradient(circle at left top, transparent 8px, #fb053a 0) top right /var(--left) 50% no-repeat,
radial-gradient(circle at left bottom, transparent 8px, #fb053a 0) bottom right /var(--left) 50% no-repeat;
}
.zhm_get_link_text:hover{
text-decoration:none;
font-weight:800;
font-family:"Microsoft YaHei";
}
.zhm_qrcode{
border:3px solid #fff;
}
`;
domStyle .appendChild(document.createTextNode(couponStyle));
domHead.appendChild(domStyle);
}
//run coupon
let couponWeb =[
{funcName:"taobao",node:"#J_juValid",match:/item\.taobao\.com/,isOpen:taobaoCoupon},
{funcName:"tmallCaoshi",node:"#J_LinkBuy",match:/^https?:\/\/chaoshi.detail.tmall.com\//,isOpen:taobaoCoupon},
{funcName:"tmallCaoshi",node:".Actions--leftButtons--1M3KkF7",match:/^https?:\/\/chaoshi.detail.tmall.com\//,isOpen:taobaoCoupon},
{funcName:"tmall",node:".BasicContent--actions--1co8sx8",match:/^https?:\/\/detail\.tmall\.com/,isOpen:taobaoCoupon},
{funcName:"tmall",node:"#J_LinkBuy",match:/^https?:\/\/detail\.tmall\.com/,isOpen:taobaoCoupon},
{funcName:"tmallOther",node:".tm-msg-box",match:/^https?:\/\/detail\.tmall\.com/,isOpen:taobaoCoupon},
{funcName:"tmall",node:".BasicContent--actions--1co8sx8",match:/^https?:\/\/detail\.tmall\.hk/,isOpen:taobaoCoupon},
{funcName:"jd",node:"#choose-btns",match:/item\.jd\.com/,isOpen:jingdongCoupon},
{funcName:"jd",node:"#choose-btns",match:/\.yiyaojd\.com/,isOpen:jingdongCoupon},
{funcName:"jd",node:"#choose-btns",match:/npcitem\.jd\.hk/,isOpen:jingdongCoupon},
{funcName:"showTaotaoGoods",node:"#root",match:/^https?:\/\/s\.taobao\.com\/search\.*/,isOpen:showTaotaoGoods},
];
var nowWeb=[];
couponWeb.forEach(function(item){
let result = location.href.match(item.match);
if(result && item.isOpen==22){
nowWeb.push(item);
}
})
let web = {};
if(nowWeb.length==0){
console.log('没有匹配该网站或该模块已关闭');return;
}else{
for(let i=0;i<nowWeb.length;i++){
if(document.querySelector(nowWeb[i].node)){
web = nowWeb[i];break;
}
}
}
if(!web.node){console.log('未获取节点');return;}
switch(web.funcName){
case 'tmall':
getTmallCoupon(web.node);
break;
case 'tmallCaoshi':
getTmallCaoshiCoupon(web.node);
break;
case 'taobao':
getTaobaoCoupon(web.node);
break;
case 'jd':
getJdCoupon(web.node);
break;
case 'showTaotaoGoods':
taobaoSearch();
break;
}
function getTaobaoCoupon(nodeCss){
getCouponStyle();
let node = document.querySelector(nodeCss);
node.style='overflow:inherit;'
let className = 'zhm_tab_taobao';
getTitleShop('.tb-main-title','.tb-shop-name > dl > dd > strong > a').then(function(resp){
getCouponInfo(node,className,resp.goodsTitle,resp.shopName);
});
}
function getTmallCoupon(nodeCss){
getCouponStyle();
let node = document.querySelector(nodeCss);
let className = 'zhm_tab_tmall';
getTitleShop('.ItemHeader--mainTitle--3CIjqW5','.ShopHeader--title--2qsBE1A').then(function(resp){
getCouponInfo(node,className,resp.goodsTitle,resp.shopName);
});
}
function getTmallCaoshiCoupon(nodeCss){
getCouponStyle();
let node = document.querySelector(nodeCss);
let className = 'zhm_tab_tmall';
getTitleShop('.ItemHeader--mainTitle--3CIjqW5','.ShopHeader--title--2qsBE1A').then(function(resp){
getCouponInfo(node,className,resp.goodsTitle,resp.shopName);
});
}
function tmallOther(nodeCss){
let node = document.querySelector(nodeCss);
let className = 'zhm_tab_tmall';
getTitleShop('.ItemHeader--mainTitle--3CIjqW5','.ShopHeader--title--2qsBE1A').then(function(resp){
getCouponInfo(node,className,resp.goodsTitle,resp.shopName);
});
//this.getCouponInfo(node,className);
}
function getTitleShop(title,shop){
async function resp(){
let goodsTitleDom = await getElement(title);
let shopNameDom = await getElement(shop);
//console.log(goodsTitleDom,shopNameDom);
let goodsTitle=goodsTitleDom?goodsTitleDom.innerText:'';
let shopName = shopNameDom?shopNameDom.innerText:'';
var data = {};
data.goodsTitle = goodsTitle;
data.shopName = shopName;
return data;
}
return resp();
}
function getCouponInfo(node,className,goodsTitle,shopName){
setTimeout(()=>{
let goods_id = getQueryString('id');
if(!goods_id){console.log('goods_id');return};
let divElement = document.createElement("div");
divElement.id='zhm_div_s';
node.before(divElement);
let url = `https://api.typechrome.com/getcoupon.php?goods_id=${goods_id}&goods_title=${encodeURIComponent(goodsTitle)}&shop_name=${encodeURIComponent(shopName)}`;
console.log(url);
request('get',url).then((result)=>{
let resp= JSON.parse(result);
if(resp.code==200){
let html =
`
<div class="zhm_coupon">
<div class="zhm_left">
<div class="zhm_img_icon">
<img src="data:image/gif;base64,R0lGODlhZABkAHj/ACH/C05FVFNDQVBFMi4wAwEAAAAh+QQJLAH/ACwAAAAAZABkAKf6BDn6BDn6BDn6BDn6BDn6BDn6BDn6BDn6BDn6BDn6BDr6BTr6BTr6BTr6BTr6BTr6BTr6Bjr6Bjr6Bjv6Bjv6Bjv6Bjv6Bzv6Bzv6CDz6CDz6CT36CT36CT36Cj76Cz76Cz/6Cz/6DD/6DED6DUD6DUD6DkH6DkH6DkH6D0L6EEL6EUP6EUT6EkT7E0X7FEX7FEb7FEb7FUb7FUf7FUf7Fkf7Fkf7F0j7F0j7F0j7F0j7GEj7GEn7GUr7Gkv7G0v7HEz7HU37H0/7IVD7I1H7JFL7JlT7J1T7KFb7KVb7Klf7K1j7Llr7MFz7Ml37NF/8NmD8OGL8OmT8PGX8P2f8QWn8Q2r8RGv8Rm38Rm38R278SG/8S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DhMYmwqBkR2RTJRaehU7Gssap9oHOYxnxIT81o0cMI8Cg1lRQavEMQtBhjWQkQ4ZhAx1YmWmwwonuaP0Ek1+z4UmBzAMdltpI7n6JyYj2jzQbuQdkuyoU3ID1GlgChmhHS9rSYqVK2gjohB4yWS25VlcuXf5tQgT72toWsqGyPUgkbeujY9wztwUZJG9dy0HgZjV0ujmGcpfL3OYew1NzXKpxB8LSupDjG+HIrna3m91vlCOU2ZDudP9R3a6cMTC5CO94EVLeviUFvepdr0Haq1eHcCW94p0uff123/jKlyD0Pa/o8mvc9m5DHkt0h4IXzOD8yKNneCMwcNt7IL9a+MIYXhChJJzbeoRyuCny739b9WEQ/1K1IxZIZkxspcikmCDlaCOLv4XFFw+kQtnw1DGuYVrShskm2qCpjclhrWPIizlFPrKNCfIyQkH1IGPjSzmXTOJmcaOJ9dgGalFM5YGUEqzZKAc+RnQPcvBYgD2lsjlW02UN5bY5xIhdMjr699po1LjLBxGHMrW0SzzjslhaUhQv/VwQdoA0RcCg6JQJHRtNKbNFHv1MQAAAIf4VTWFkZSB3aXRoIFNjcmVlblRvR2lmADs=" > </div>
<div class="zhm_content">
<div class="zhm_money">
<div class="zhm_amount_money">
<div class="zhm_money_sign">¥</div>
<div class="zhm_money_num">${resp.data.youhuiquan}</div>
</div>
<div class="zhm_condition">${resp.data.coupon_info}</div>
</div>
<div class="zhm_time">
<div class="zhm_term">有效期</div>
<div class="zhm_date">${resp.data.coupon_end_time}</div>
</div>
</div>
</div>
<div class="zhm_circle"></div>
<div class="zhm_link_coupon" style="margin-right:">
<a class="zhm_get_link_text" onclick="window.open('https://api.typechrome.com/code.php?link=${resp.data.code_url}')">点击领取</a>
<div id="tbqrcode" class="zhm_qrcode"></div>
</div>
</div>
`;
document.getElementById('zhm_div_s').innerHTML=html;
var qrcode = new QRCode("tbqrcode", {
width: 67,
height: 67,
colorDark : "#121212",
colorLight : "#ffffff",
correctLevel : QRCode.CorrectLevel.M
});
qrcode.makeCode(resp.data.code_url);
if(document.querySelector('.Actions--root--hwEujgc')){
document.querySelector('.Actions--root--hwEujgc').style="position:unset";
}
//new QRCode(document.getElementById("tbqrcode"), resp.code_url);
}else{
console.log(resp.message);
}
})
},300);
}
function getJdCoupon(nodeCss){
getCouponStyle();
setTimeout(()=>{
let jdGoodsId = location.href.match(/jd\.(hk|com)\/(\S*).html/);
let divElement = document.createElement("div");
divElement.id='zhm_div_s';
let node= document.querySelector(nodeCss);
node.before(divElement);
request('get',`https://api.typechrome.com/index_jd_new.php?goods_id=${jdGoodsId[2]}`).then((result)=>{
let resp= JSON.parse(result);
let html='';
resp.forEach(function(item){
html +=
`
<div class="zhm_coupon" style="margin-left:10px;">
<div class="zhm_left">
<div class="zhm_img_icon">
<img src="data:image/gif;base64,R0lGODlhZABkAHj/ACH/C05FVFNDQVBFMi4wAwEAAAAh+QQJLAH/ACwAAAAAZABkAKf6BDn6BDn6BDn6BDn6BDn6BDn6BDn6BDn6BDn6BDn6BDr6BTr6BTr6BTr6BTr6BTr6BTr6Bjr6Bjr6Bjv6Bjv6Bjv6Bjv6Bzv6Bzv6CDz6CDz6CT36CT36CT36Cj76Cz76Cz/6Cz/6DD/6DED6DUD6DUD6DkH6DkH6DkH6D0L6EEL6EUP6EUT6EkT7E0X7FEX7FEb7FEb7FUb7FUf7FUf7Fkf7Fkf7F0j7F0j7F0j7F0j7GEj7GEn7GUr7Gkv7G0v7HEz7HU37H0/7IVD7I1H7JFL7JlT7J1T7KFb7KVb7Klf7K1j7Llr7MFz7Ml37NF/8NmD8OGL8OmT8PGX8P2f8QWn8Q2r8RGv8Rm38Rm38R278SG/8SXD8SnD8THL8TnP8T3T8UHX8Unf8VHj8V3v8W378YIL8ZIX8aon8b438cY/7cI76bYv4a4n1aYfuZ4TjZH/UZHzHZnu8aXqtbHqib3qWc3qId3uAeHp5eXl6enp7e3t8fHx9fX1+fn5/f3+AgICBgYGCgoKDg4OEhISFhYWGhoaHh4eIiIiJiYmKioqLi4uMjIyNjY2Ojo6P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fL3OYew1NzXKpxB8LSupDjG+HIrna3m91vlCOU2ZDudP9R3a6cMTC5CO94EVLeviUFvepdr0Haq1eHcCW94p0uff123/jKlyD0Pa/o8mvc9m5DHkt0h4IXzOD8yKNneCMwcNt7IL9a+MIYXhChJJzbeoRyuCny739b9WEQ/1K1IxZIZkxspcikmCDlaCOLv4XFFw+kQtnw1DGuYVrShskm2qCpjclhrWPIizlFPrKNCfIyQkH1IGPjSzmXTOJmcaOJ9dgGalFM5YGUEqzZKAc+RnQPcvBYgD2lsjlW02UN5bY5xIhdMjr699po1LjLBxGHMrW0SzzjslhaUhQv/VwQdoA0RcCg6JQJHRtNKbNFHv1MQAAAIf4VTWFkZSB3aXRoIFNjcmVlblRvR2lmADs=" > </div>
<div class="zhm_content">
<div class="zhm_money" style='margin-top:7px;'>
<div class="zhm_amount_money">
<div class="zhm_money_sign" style='margin-top:-10px;'>¥</div>
<div class="zhm_money_num">${item.discount}</div>
</div>
<div class="zhm_condition">满${item.quota}元可用</div>
</div>
<div class="zhm_time" style='margin-top:10px;'>
<div class="zhm_term">有效期</div>
<div class="zhm_date">${item.endTime}</div>
</div>
</div>
</div>
<div class="zhm_circle" style="right:44px;"></div>
<div class="zhm_link_coupon" style="padding:0px 16px 0px 16px;">
<a class="zhm_get_link_text" style="letter-spacing: 10px;font-size:16px;margin-top:10px;" href="${item.coupon_link}" target='_blank' rel='noopener noreferrer nofollow' style="margin-left:16px;width:34px;">领取</a>
</div>
</div>
`
});
document.getElementById('zhm_div_s').innerHTML = html;
})
},300)
}
function taobaoSearch(item){
let timer = setInterval(function(){
let dom = document.querySelector('#selectTb');
if(!dom){
let selectsDom =document.querySelector('.next-checkbox-group');
if(selectsDom){
let labels = selectsDom.querySelectorAll('label');
labels.forEach(function(item){
let itemText = item.querySelector('span:last-child').innerText;
if(itemText=='天猫'){
let tbLabels = item.cloneNode(true);
tbLabels.setAttribute('id','selectTb');
let inputDom = tbLabels.querySelector('span:first-child > input');
inputDom.value='service:taobao';
tbLabels.querySelector('.next-checkbox-label').innerText='淘宝';
let insertDom = selectsDom.querySelector('label:nth-of-type(2)');
insertDom.before(tbLabels);
tbLabels.addEventListener('click',selectTaobao);
tbLabels.querySelector('.next-checkbox-label').addEventListener('click',function(e){
e.stopPropagation();
})
}
})
}
}else{
if(dom.className == 'next-checkbox-wrapper checked '){
showTbPage();
}
}
//clearInterval(timer);
})
function selectTaobao(e){
let parentDom = e.target.parentNode;
if(parentDom.className =='next-checkbox' && parentDom.parentNode.className == 'next-checkbox-wrapper '){
parentDom.parentNode.className='next-checkbox-wrapper checked ';
showTbPage();
return;
}else{
parentDom.parentNode.className='next-checkbox-wrapper ';
let items = document.querySelectorAll('.Content--contentInner--QVTcU0M > div > a');
items.forEach(function(item){
item.parentNode.style='display:block';
});
//location.reload();
}
}
function showTbPage(){
let items = document.querySelectorAll('.Content--contentInner--QVTcU0M > div > a');
items.forEach(function(item){
if(!item.href.match(/^https:\/\/item\.taobao\.com/)){
item.parentNode.style='display:none';
}
});
}
}
})();