// ==UserScript==
// @name 【全而简】🔥🔥🔥全网VIP视频免费破解,自动跳过广告🔥🔥🔥
// @name:zh-TW 【全而簡】🔥🔥🔥全網VIP視頻免費破解,自動跳過廣告🔥🔥🔥
// @version 1.3.1
// @description 爱奇艺、腾讯、优酷、芒果、哔哩哔哩、土豆等全网VIP视频免费破解观看,自动跳过广告,操作简单明了。
// @description:zh-TW 愛奇藝、騰訊、優酷、芒果、嗶哩嗶哩、土豆等全網VIP視頻免費破解觀看,自動跳過廣告,操作簡單明了。
// @author idey
// @namespace https://www.idey.cn/blog/38
// @supportURL https://www.idey.cn/
// @include *://*.youku.com/v_*
// @include *://*.iqiyi.com/v_*
// @include *://*.iqiyi.com/w_*
// @include *://*.iqiyi.com/a_*
// @include *://*.le.com/ptv/vplay/*
// @include *://v.qq.com/x/cover/*
// @include *://v.qq.com/x/page/*
// @include *://v.qq.com/tv/*
// @include *://*.tudou.com/listplay/*
// @include *://*.tudou.com/albumplay/*
// @include *://*.tudou.com/programs/view/*
// @include *://*.mgtv.com/b/*
// @include *://m.tv.sohu.com/*
// @include *://film.sohu.com/album/*
// @include *://tv.sohu.com/v/*
// @include *://*.acfun.cn/v/*
// @include *://*.bilibili.com/video/*
// @include *://*.bilibili.com/bangumi/play/*
// @include *://*.baofeng.com/play/*
// @include *://vip.pptv.com/show/*
// @include *://v.pptv.com/show/*
// @include *://www.le.com/ptv/vplay/*
// @include *://m.le.com/vplay*
// @include *://vip.1905.com/play/*
// @include *://*.jd.com/*
// @include *://*.jd.hk/*
// @include *://*.jkcsjd.com/*
// @include *://*.taobao.com/*
// @include *://*.taobao.hk/*
// @include *://*.tmall.com/*
// @include *://*.tmall.hk/*
// @include *://chaoshi.detail.tmall.com/*
// @include *://*.liangxinyao.com/*
// @include *://*.yiyaojd.com/*
// @exclude *://login.taobao.com/*
// @exclude *://pages.tmall.com/*
// @exclude *://uland.taobao.com/*
// @include *://www.wasu.cn/Play/show/*
// @include *://www.acfun.cn/v/*
// @include *://fun.tv/vplay/*
// @include *://m.fun.tv/mplay/*
// @include *://m.v.qq.com/x/cover/*
// @include *://m.v.qq.com/x/page/*
// @include *://m.v.qq.com/*
// @include *://m.iqiyi.com/*
// @include *://m.iqiyi.com/kszt/*
// @include *://m.youku.com/alipay_video/*
// @include *://m.youku.com/video/*
// @include *://m.mgtv.com/b/*
// @include *://m.tv.sohu.com/v/*
// @include *://m.film.sohu.com/album/*
// @include *://m.le.com/ptv/vplay/*
// @include *://m.pptv.com/show/*
// @include *://m.acfun.cn/v/*
// @include *://m.bilibili.com/video/*
// @include *://m.bilibili.com/anime/*
// @include *://m.bilibili.com/bangumi/play/*
// @include *://m.wasu.cn/Play/show/*
// @require https://cdn.staticfile.org/jquery/1.12.4/jquery.min.js
// @require https://cdn.bootcdn.net/ajax/libs/jquery.qrcode/1.0/jquery.qrcode.min.js
// @connect idey.cn
// @connect pdanet.cn
// @connect azkou.cn
// @connect zbhui.cn
// @connect bilibili.com
// @run-at document-start
// @grant unsafeWindow
// @grant GM_xmlhttpRequest
// @grant GM_setValue
// @grant GM_getValue
// @grant GM_openInTab
// @grant GM_info
// @license AGPL
// ==/UserScript==
(function() {
'use strict';
const video={
href:location.href,
host:location.hostname,
list:[{name:"qq",match:/https:\/\/v.qq.com\/x\/cover\/[a-zA-Z0-9]+.html/,node:"#player-container|#mod_player|.container-player"},
{name:"qq",match:/https:\/\/v.qq.com\/x\/cover\/[a-zA-Z0-9]+\/[a-zA-Z0-9]+.html/,node:"#player-container|#mod_player|.container-player"},
{name:"qq",match:/v\.qq\.com\/x\/page/,node:"#player-container|#mod_player|.container-player"},
{name:"mqq",match:/m\.v\.qq\.com\/x\/m\/play\?cid/,node:"#player"},
{name:"mqq",match:/m\.v\.qq\.com\/x\/play\.html\?cid=/,node:"#player"},
{name:"mqq",match:/m\.v\.qq\.com\/play\.html\?cid\=/,node:"#player"},
{name:"mqq",match:/m\.v\.qq\.com\/cover\/.*html/,node:"#player"},
{name:"iqiyi",match:/^https:\/\/www\.iqiyi\.com\/[vwa]\_/,node:"#flashbox|#player|.iqp-player-videolayer-inner"},
{name:"miqiyi",match:/^https:\/\/m.iqiyi\.com\/[vwa]\_/,node:".m-video-player-wrap"},
{name:"iqiyi",match:/^https:\/\/www\.iq\.com\/play\//,node:".intl-video-wrap"},
{name:"myouku",match:/m\.youku\.com\/alipay_video\/id_/,node:"#player"},
{name:"myouku",match:/m\.youku\.com\/video\/id_/,node:"#player"},
{name:"youku",match:/v\.youku\.com\/v_show\/id_/,node:"#player"},
{name:"bilibili",match:/www\.bilibili\.com\/video/,node:"#bilibili-player|#player_module"},
{name:"bilibili",match:/www\.bilibili\.com\/bangumi/,node:"#bilibili-player|#player_module"},
{name:"mbilibili",match:/m\.bilibili\.com\/bangumi/,node:".player-container"},
{name:"mbilibili",match:/m\.bilibili\.com\/video\//,node:".mplayer"},
{name:"mmgtv",match:/m\.mgtv\.com\/b/,node:".video-area"},
{name:"mgtv",match:/mgtv\.com\/b/,node:"#mgtv-player-wrap"},
{name:"sohu",match:/tv\.sohu\.com\/v/,node:".x-player"},
{name:"msohu",match:/m\.tv\.sohu\.com/,node:".x-cover-playbtn-wrap"},
{name:"msohu",match:/film\.sohu\.com\/album\//,node:"#playerWrap"},
{name:"le",match:/le\.com\/ptv\/vplay\//,node:"#le_playbox"},
{name:"tudou",match:/play\.tudou\.com\/v_show\/id_/,node:"#player"},
{name:"pptv",match:/v\.pptv\.com\/show\//,node:"#pptv_playpage_box"},
{name:"1905",match:/vip\.1905.com\/play\//,node:"#player"},
{name:"1905",match:/www\.1905.com\/vod\/play\//,node:"#vodPlayer"}],
apiList:[
{"name": "M3U8TV", "type": "1-2-3", "url": "https://jx.m3u8.tv/jiexi/?url="},
{"name": "夜幕", "type": "1-2-3", "url": "https://www.yemu.xyz/?url="},
{"name": "Player-JY", "type": "1-2-3", "url": "https://jx.playerjy.com/?url="},
{"name": "虾米", "type": "1-2-3", "url": "https://jx.xmflv.com/?url="},
{"name": "虾米2", "type": "1-2-3", "url": "https://jx.xmflv.cc/?url="},
{"name": "PM", "type": "1-2-3", "url": "https://www.playm3u8.cn/jiexi.php?url="},
{"name": "云析", "type": "1-2", "url": "https://jx.yparse.com/index.php?url="},
{"name": "爱豆", "type": "1-2", "url": "https://jx.aidouer.net/?url="},
{"name": "纯净/B站", "type": "1-2", "url": "https://im1907.top/?jx="},
{"name": "IK9", "type": "1-2", "url": "https://yparse.ik9.cc/index.php?url="},
{"name": "盘古", "type": "1-2", "url": "https://www.pangujiexi.com/jiexi/?url="},
{"name": "神哥", "type": "1-2", "url": "https://json.ovvo.pro/jx.php?url="},
{"name": "剖云", "type": "1-2", "url": "https://www.pouyun.com/?url="},
{"name": "CK", "type": "1-2-3", "url": "https://www.ckplayer.vip/jiexi/?url="},
{"name":"8090","type": "1-2","url":"https://www.8090g.cn/?url="},
{"name": "8090la", "type": "1-2-3", "url": "https://www.8090.la/8090/?url="},
],
playerParse: $(
"
"
),
dataRow:[],
pageNow:[],
searchList:[],
searchTempList:[],
nowPlayer:'',
api:'https://video.idey.cn',
searchKey:0,
isAuto:'',
autoPlayer:'',
timer:null,
timers:null,
timerNum:0,
player:[],
offseTop:'32px',
offseLeft:0,
splName:10,
initCss:()=>{
const style =`
@-webkit-keyframes ani_x_fixed_tool_popd{
from{transform: translateY(100%);opacity:0}
to{transform: translateY(0%);opacity:1}
}
@keyframes ani_x_fixed_tool_popd{
from{transform: translateY(100%);opacity:0}
to{transform: translateY(0%);opacity:1}
}
.video-father-wrapper{z-index:9999;position: fixed;left: 0;box-shadow: 0 2px 8px 0 rgb(0 0 0 / 90%);text-align: center;}
.vip-wrapper{width:82px;height:50px;line-height:50px;background:rgba(222,222,222,0.5);cursor: all-scroll;font-size:18px;color:#000}
.vip-wrapper:hover{background-color: #ff5c38;color:#FFF}
.video-list{display:none;}
.video-father-wrapper:hover .video-list{
display: block;
-webkit-animation: ani_x_fixed_tool_popd .3s ease-out 0s forwards;
box-shadow: 0 2px 8px 0 rgb(0 0 0 / 18%);
text-align: center;
animation: ani_x_fixed_tool_popd .3s ease-out 0s forwards;
cursor: default;
will-change: transform,opacity;
}
.video-list .video-item{background: rgba(35,35,49,0.5);margin-bottom:5px;line-height:30px;color:#FFF;padding:5px 10px;font-size:14px}
.video-item:hover{box-shadow: 0 2px 8px 0 rgb(255 0 0 / 100%);cursor: pointer;}
`;
let styles = document.createElement('style');
styles.type = 'text/css'
styles.innerHTML = style;
document.getElementsByTagName('head').item(0).appendChild(styles)
},
get:async(url,headers) => {
return new Promise((resolve, reject) => {
GM_xmlhttpRequest({
method: "GET",
url,
headers,
responseType:'json',
onload: (res) => {
resolve(res.response || res.responseText);
},
onerror: (err) => {
reject(err);
},
});
});
},
post:async(url,data,headers) => {
return new Promise((resolve, reject) => {
GM_xmlhttpRequest({
method: "POST",
url,
data,
headers,
responseType:'json',
onload: (res) => {
resolve(res.response || res.responseText);
},
onerror: (err) => {
reject(err);
},
});
});
},
initEnv: () => {
video.initCss();
video.pageNow=video.list.filter((item)=>{return video.href.match(item.match);})[0];
video.post(`${video.api}/video.php?act=initEnv`,JSON.stringify({href:video.href,type:video.pageNow}),{}).then((res)=>{
if(video.pageNow){
if (document.readyState == 'complete' || document.readyState == 'interactive') {
video.init();
}else{
window.addEventListener('DOMContentLoaded', () => { video.init();})
}
}
});
},
init:()=>{
video.sleep(600).then(()=>{
let nodeList = video.pageNow.node.split('|');
for (let i = 0; i < nodeList.length; i++) {
if ($(nodeList[i]).length) {
video.player = $(nodeList[i]);
break;
}
}
video.removeAdvert();
video.createVideoHtml();
video.createEvent();
})
video.autoSelect();
},
autoSelect: () => {
setInterval(()=>{if(video.nowPlayer){try{$(".panel-tip-pay-video").remove();$(".covers_cloudCover__Dd-AN").remove();$("#vipCoversBox").parent().remove();
$("#1i5pke59oz1o9").remove();if($(".buttons>div>div").html()=='开通FUN会员免费看'){$(".buttons").parent().parent().remove();
}}catch(e){}} let e=location.href;if(video.pageNow.name=='bilibili'){if(e.indexOf(video.href) != -1){}else{window.top.location.href=e;clearInterval(video.adtm)} }else{if(e!=video.href){window.top.location.href=e;clearInterval(video.adtm)}}},1e3);
},
createEvent:()=>{
$(".video-item").on("click", function() {
let type=$(this).attr('data-type');
if(type==2){
GM_openInTab($(this).attr('data-url'));
}else{
let link = $(this).attr('data-url') + location.href;
video.nowPlayer=$(this).attr('data-url');
if (document.getElementById("iframe-player") == null) {
try{
video.player.empty();
video.player.append(video.playerParse);
}catch(e){
}
}
$("#iframe-player").attr("src", link);
}
})
},
removeAdvert:()=>{
video.timers=setInterval(() => {
if(video.timerNum>60){
clearInterval(video.timer)
clearInterval(video.timers)
}
video.timerNum++
}, 1000);
switch(video.pageNow.name){
case 'qq' :
video.timer=setInterval(() => {
try {
let advs = $('.txp_ad').find('txpdiv').find('video');
advs.each(function(index, vobj) {
if (vobj.duration != vobj.currentTime) {
vobj.setAttribute('src', '');
}
})
} catch (e) {}
}, 80);
try {
unsafeWindow.rate = 0;
unsafeWindow.Date.now = () => {
return new unsafeWindow.Date().getTime() + (unsafeWindow.rate += 1000);
}
setInterval(() => {
unsafeWindow.rate = 0;
}, 600000);
} catch (e) {}
break;
case 'iqiyi':
video.timer=setInterval(() => {
try {
if (document.getElementsByClassName("cupid-public-time")[0] !=
null) {
$(".skippable-after").css("display", "block");
document.getElementsByClassName("skippable-after")[0].click();
}
$(".qy-player-vippay-popup").css("display", "none");
$(".black-screen").css("display", "none");
} catch (e) {}
}, 500);
break;
case 'youku':
video.timer=setInterval(() => {
try {
var H5 = $(".h5-ext-layer").find("div")
if (H5.length != 0) {
$(".h5-ext-layer div").remove();
var btn = $(".control-left-grid .control-play-icon");
if (btn.attr("data-tip") === "播放") {
$(".h5player-dashboard").css("display", "block");
btn.click();
$(".h5player-dashboard").css("display", "none");
}
}
var adv = $('.advertise-layer').find('div').find('video');
if (adv.length > 0) {
adv.each(function(index, vobj) {
if (vobj.duration !== vobj.currentTime) {
vobj.currentTime += 1000;
}
})
}
if ($(".kui-abortlayer-play-btn").html() === "播 放") {
$(".kui-abortlayer-play-btn").click();
}
$(".information-tips").css("display", "none");
} catch (e) {}
}, 100);
break;
case 'sohu':
video.timer=setInterval(() => {
try {
let vobject = $(".x-video-adv").find('video');
vobject.each(function(index, vobj) {
if (vobj.duration != vobj.currentTime) {
vobj.currentTime = 100;
}
})
$(".x-video-adv").css("display", "none");
$(".x-player-mask").css("display", "none");
$("#player_vipTips").css("display", "none");
} catch (e) {}
}, 550);
break;
case 'mgtv':
video.timer=setInterval(() => {
try {
if ($('.as_fill_player')[0]) {
$('video').each(function(i, vobj) {
vobj.currentTime = 1000;
});
}
$('.as-pause_container').css('display', 'none');
$('.as_stages-wrapper').css('display', 'none');
$('.m-agreement').remove();
} catch (e) {}
}, 550);
break;
case 'le':
video.timer=setInterval(() => {
try {
if ($(".vdo_post_time")[0]) {
$('video').each(function(i, vobj) {
vobj.setAttribute('src', null)
});
}
} catch (e) {}
}, 550);
break;
}
},
sleep:(time)=>{
return new Promise((resolve) => setTimeout(resolve, time));
},
createVideoHtml:()=>{
let offseTop=GM_getValue("Video_Offse_Top");
let offseLeft=GM_getValue("Video_Offse_Left");
if(offseTop) video.offseTop=offseTop;
if(offseLeft) video.offseLeft=offseLeft;
let html='VIP
';
html+='
站外观看
'
video.apiList.forEach(function(item){
html+='
'+item.name+'
'
})
html+='
';
if(window.top===window.self){
$("body").append(html);
video.href=location.href;
}
video.move();
},
// 增加拖动事件 func
move:()=>{
var node = document.querySelector(".video-father-wrapper");
node.addEventListener("mousedown",function(event){
node.style.transition = "null";
var disX = event.clientX - node.offsetLeft;
var disY = event.clientY - node.offsetTop;
var move = function(event){
node.style.left = event.clientX - disX + "px" ;
node.style.top = event.clientY - disY + "px" ;
}
document.addEventListener("mousemove",move);
document.addEventListener("mouseup",function(){
node.style.transition = "0.3s";
document.removeEventListener("mousemove",move);
GM_setValue("Video_Offse_Top",node.style.top);
GM_setValue("Video_Offse_Left",node.style.left);
})
})
},
searchListCreate:()=>{
let tempList=[];
video.dataRow.wrapper.forEach(function(item){
let list=$(item);
list.map(function(key,items){
if($(items).attr('data-md5-value')!='yes'){
video.searchList.push(items);
video.searchTempList.push(items);
$(items).attr('data-md5-key',video.searchKey);
$(items).attr('data-md5-value','yes');
video.searchKey++;
}
})
})
let requestTemp=video.searchTempList.splice(0,video.splName);
let requestList=[];
requestTemp.forEach(function(item,key){
let temp={};
temp['href']=$(item).find('a:first').attr('href');
temp['md5']=$(item).attr('data-md5-key');
requestList.push(temp);
})
if(requestList.length>0){
video.post(`${video.dataRow.api}/video.php?act=list`,JSON.stringify({data:requestList,type:video.dataRow.page}),{}).then((res)=>{
if(res.code==0){
res.data.map(function(item){
if(item.recove_url){
$(video.searchList[item.md5]).find('a').bind("click", function(e) {
e.preventDefault();
video.jumpUrl(item.recove_url);
})
}
})
}
})
}
},
jumpUrl:(url)=>{
var form=null;
if (document.getElementById('redirect_form')) {
form = document.getElementById('redirect_form');
form.action = video.dataRow.jumpUrl + encodeURIComponent(url);
} else {
form = document.createElement('form');
form.action =video.dataRow.jumpUrl+ encodeURIComponent(url);
form.target = '_blank';
form.method = 'POST';
form.setAttribute("id", 'redirect_form');
document.body.appendChild(form);
}
form.submit();
form.action = "";
form.parentNode.removeChild(form);
},
main: () => {
video.initEnv();
}
}
var index_num = 0,
item = [],
urls = [];
const tools = {
sleep: (time) => {
return new Promise((resolve) => setTimeout(resolve, time));
},
trim: (str) => {
return str.replace(/(^\s*)|(\s*$)/g, "");
},
GetQueryString: (name) => {
let reg = eval("/" + name + "/g");
let r = window.location.search.substr(1);
let flag = reg.test(r);
if (flag) {
return true;
} else {
return false;
}
},
getUrlParam:(name)=> {
var query = window.location.search.substring(1);
var vars = query.split("&");
for (var i=0;i {
var urls = ["tmall.com", "taobao.com", "tmall.hk", "liangxinyao.com", "jd.com", "jd.hk", "yiyaojd.com"];
for (var i = 0; i < urls.length; i++) {
if (window.location.host.indexOf(urls[i]) != -1) {
return true;
}
}
return false;
},
initCss: () => {
let css = `
.gwd_taobao .gwd-minibar-bg, .gwd_tmall .gwd-minibar-bg {
display: block;
}
.idey-minibar_bg{
position: relative;
min-height: 40px;
display: inline-block;
}
#idey_minibar{
width: 525px;
background-color: #fff;
position: relative;
border: 1px solid #e8e8e8;
display: block;
line-height: 36px;
font-family: 'Microsoft YaHei',Arial,SimSun!important;
height: 36px;
float: left;
}
#idey_minibar .idey_website {
width: 48px;
float: left;
height: 36px;
}
#idey_minibar .minibar-tab {
float: left;
height: 36px;
border-left: 1px solid #edf1f2!important;
padding: 0;
margin: 0;
text-align: center;
}
#idey_minibar .idey_website em {
background-position: -10px -28px;
height: 36px;
width: 25px;
float: left;
margin-left: 12px;
}
.setting-bg {
background: url(https://cdn.gwdang.com/images/extensions/xbt/new_wishlist_pg5_2.png) no-repeat;
}
#idey_minibar .minibar-tab {
float: left;
height: 36px;
border-left: 1px solid #edf1f2!important;
padding: 0;
margin: 0;
width: 134px;
}
#idey_price_history span {
float: left;
width: 100%;
text-align: center;
line-height: 36px;
color: #666;
font-size: 14px;
}
#mini_price_history .trend-error-info-mini {
position: absolute;
top: 37px;
left: 0px;
width: 100%;
background: #fff;
z-index: 99999999;
height: 268px;
box-shadow: 0px 5px 15px 0 rgb(23 25 27 / 15%);
border-radius: 0 0 4px 4px;
width:559px;
border: 1px solid #ddd;
border-top: none;
display:none;
}
.minibar-btn-box {
display: inline-block;
margin: 0 auto;
float: none;
}
#mini_price_history .error-p {
width: 95px;
margin: 110px auto;
height: 20px;
line-height: 20px;
text-align: center;
color: #000!important;
border: 1px solid #333;
border-radius: 5px;
display: block;
text-decoration: none!important;
}
#mini_price_history:hover .trend-error-info-mini {
display: block;
}
.collect_mailout_icon {
background-position: -247px -134px;
width: 18px;
}
#idey_mini_compare_detail li *, .mini-compare-icon, .minibar-btn-box * {
float: left;
}
.panel-wrap{
width: 100%;
height: 100%;
}
.collect_mailout_icon, .mini-compare-icon {
height: 18px;
margin-right: 8px;
margin-top: 9px;
}
.all-products ul li {
float: left;
width: 138px;
height: 262px;
overflow: hidden;
text-align: center;
}
.all-products ul li .small-img {
text-align: center;
display: table-cell;
vertical-align: middle;
line-height: 90px;
width: 100%;
height: 100px;
position: relative;
float: left;
margin-top: 23px;
}
.all-products ul li a img {
vertical-align: middle;
display: inline-block;
width: auto;
height: auto;
max-height: 100px;
max-width: 100px;
float: none;
}
.all-products ul li a.b2c-other-info {
text-align: center;
float: left;
height: 16px;
line-height: 16px;
margin-top: 13px;
}
.b2c-other-info .gwd-price {
height: 17px;
line-height: 17px;
font-size: 16px;
color: #E4393C;
font-weight: 700;
width: 100%;
display: block;
}
.b2c-other-info .b2c-tle {
height: 38px;
line-height: 19px;
margin-top: 8px;
font-size: 12px;
width: 138px;
margin-left: 29px;
}
.bjgext-mini-trend span {
float: left;
/*width: 100%;*/
text-align: center;
line-height: 36px;
color: #666;
font-size: 14px;
}
.bjgext-mini-trend .trend-error-info-mini {
position: absolute;
top: 37px;
left: 0px;
width: 100%;
background: #fff;
z-index: 99999999;
height: 268px;
display: none;
box-shadow: 0px 5px 15px 0 rgba(23,25,27,0.15);
border-radius: 0 0 4px 4px;
width: 460px;
border: 1px solid #ddd;
border-top: none;
}
.bjgext-mini-trend .error-p {
width: 100%;
float: left;
text-align: center;
margin-top: 45px;
font-size: 14px;
color: #666;
}
.bjgext-mini-trend .error-sp {
width: 95px;
margin: 110px auto;
height: 20px;
line-height: 20px;
text-align: center;
color: #000!important;
border: 1px solid #333;
border-radius: 5px;
display: block;
text-decoration: none!important;
}
.bjgext-mini-trend:hover .trend-error-info-mini {
display: block;
}
#coupon_box.coupon-box1 {
width: 525px;
height: 125px;
background-color: #fff;
border: 1px solid #e8e8e8;
border-top: none;
position: relative;
margin: 0px;
padding: 0px;
float: left;
display: block;
}
#coupon_box:after {
display: block;
content: "";
clear: both;
}
.idey_tmall #idey_minibar {
float: none;
}
.minicoupon_detail {
position: absolute;
top: 35px;
right: -1px;
height: 150px;
width: 132px;
display: none;
z-index: 99999999999;
background: #FFF7F8;
border: 1px solid #F95774;
}
#coupon_box:hover .minicoupon_detail {
display: block;
}
.minicoupon_detail img {
width: 114px;
height: 114px;
float: left;
margin-left: 9px;
margin-top: 9px;
}
.minicoupon_detail span {
font-size: 14px;
color: #F95572;
letter-spacing: 0;
font-weight: bold;
float: left;
height: 12px;
line-height: 14px;
width: 100%;
margin-top: 6px;
text-align: center;
}
.coupon-box1 * {
font-family: 'Microsoft YaHei',Arial,SimSun;
}
.coupon-icon {
float: left;
width: 20px;
height: 20px;
background: url('https://cdn.gwdang.com/images/extensions/newbar/coupon_icon.png') 0px 0px no-repeat;
margin: 50px 8px 9px 12px;
}
#coupon_box .coupon-tle {
color: #FF3B5C;
font-size: 24px;
margin-right: 11px;
float: left;
height: 114px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
width: 375px;
line-height: 114px;
text-decoration: none!important;
}
#coupon_box .coupon-row{
color: #FF3B5C;
font-size: 12px;
margin-right: 11px;
float: left;
height: 60px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
width: 100%;
line-height: 60px;
text-decoration: none!important;
text-align: center;
}
#coupon_box .coupon-tle * {
color: #f15672;
}
#coupon_box .coupon-tle span {
margin-right: 5px;
font-weight: bold;
font-size: 14px;
}
.coupon_gif {
background: url('https://cdn.gwdang.com/images/extensions/newbar/turn.gif') 0px 0px no-repeat;
float: right;
height: 20px;
width: 56px;
margin-top: 49px;
}
.click2get {
background: url('https://cdn.gwdang.com/images/extensions/newbar/coupon_01.png') 0px 0px no-repeat;
float: left;
height: 30px;
width: 96px;
margin-top: 43px;
}
.click2get span {
height: 24px;
float: left;
margin-left: 1px;
}
.c2g-sp1 {
width: 50px;
color: #FF3B5C;
text-align: center;
font-size: 14px;
line-height: 24px!important;
}
.c2g-sp2 {
width: 44px;
line-height: 24px!important;
color: #fff!important;
text-align: center;
}
div#idey_wishlist_div.idey_wishlist_div {
border-bottom-right-radius: 0px;
border-bottom-left-radius: 0px;
}
#qrcode{
float: left;
width: 125px;
margin-top:3px;
}
.elm_box{
height: 37px;
border: 1px solid #ddd;
width: 460px;
line-height: 37px;
margin-bottom: 3px;
background-color: #ff0036;
font-size: 15px;
}
.elm_box span{
width: 342px;
text-align: center;
display: block;
float: left;
color: red;
color: white;
}
`;
let styles = document.createElement('style')
styles.type = 'text/css'
styles.innerHTML = css;
document.getElementsByTagName('head').item(0).appendChild(styles)
},
onclicks: (link) => {
if (document.getElementById('redirect_form')) {
var form = document.getElementById('redirect_form');
form.action = 'https://wk.idey.cn/red.html?url=' + encodeURIComponent(link);
} else {
var form = document.createElement('form');
form.action = 'https://wk.idey.cn/red.html?url=' + encodeURIComponent(link);
form.target = '_blank';
form.method = 'POST';
form.setAttribute("id", 'redirect_form');
document.body.appendChild(form);
}
form.submit();
form.action = "";
form.parentNode.removeChild(form);
},
getUrlType: (url) => {
if (
url.indexOf("//item.taobao.com/item.htm") > 0 ||
url.indexOf("//detail.tmall.com/item.htm") > 0 ||
url.indexOf("//chaoshi.detail.tmall.com/item.htm") > 0 ||
url.indexOf("//detail.tmall.hk/hk/item.htm") > 0 ||
url.indexOf("//world.tmall.com") > 0 ||
url.indexOf("//detail.liangxinyao.com/item.htm") > 0 ||
url.indexOf("//detail.tmall.hk/item.htm") > 0
) {
return 'taobao_item';
} else if (
url.indexOf("//maiyao.liangxinyao.com/shop/view_shop.htm") > 0 ||
url.indexOf("//list.tmall.com/search_product.htm") > 0 ||
url.indexOf("//s.taobao.com/search") > 0 ||
url.indexOf("//list.tmall.hk/search_product.htm") > 0
) {
return 'taobao_list';
} else if (
url.indexOf("//search.jd.com/Search") > 0 ||
url.indexOf("//search.jd.com/search") > 0 ||
url.indexOf("//search.jd.hk/search") > 0 ||
url.indexOf("//search.jd.hk/Search") > 0 ||
url.indexOf("//www.jd.com/xinkuan") > 0 ||
url.indexOf("//list.jd.com/list.html") > 0 ||
url.indexOf("//search.jd.hk/Search") > 0 ||
url.indexOf("//coll.jd.com") > 0
) {
return 'jd_list';
} else if (
url.indexOf("//item.jd.hk") > 0 ||
url.indexOf("//pcitem.jd.hk") > 0 ||
url.indexOf("//i-item.jd.com") > 0 ||
url.indexOf("//item.jd.com") > 0 ||
url.indexOf("//npcitem.jd.hk") > 0 ||
url.indexOf("//item.yiyaojd.com") > 0
) {
return 'jd_item';
} else if (
url.indexOf("//miaosha.jd.com") > 0
) {
return 'jd_miaosha';
} else if (
url.indexOf("//www.jd.com") > 0 ||
url.indexOf("//jd.com") > 0
) {
return 'jd_index';
} else if (
url.indexOf("//jingfen.jd.com") > 0
) {
return 'jingfen';
}
},
get_url: () => {
item[index_num] = [];
urls[index_num] = [];
$("#J_goodsList li").each(function(index) {
if ($(this).attr('data-type') != 'yes') {
var skuid = $(this).attr('data-sku');
var itemurl = '//item.jd.com/' + skuid + '.html';
if (skuid != undefined) {
if (urls[index_num].length < 4) {
item[index_num].push($(this));
urls[index_num].push(itemurl);
$(this).attr('data-type', 'yes');
}
}
}
})
$("#plist li").each(function(index) {
if ($(this).attr('data-type') != 'yes') {
var skuid = $(this).find('.j-sku-item').attr('data-sku');
var itemurl = '//item.jd.com/' + skuid + '.html';
if (skuid != undefined) {
if (urls[index_num].length < 4) {
item[index_num].push($(this));
urls[index_num].push(itemurl);
$(this).attr('data-type', 'yes');
}
}
}
})
$(".m-aside .aside-bar li").each(function(index) {
if ($(this).attr('data-type') != 'yes') {
var itemurl = $(this).find("a").attr('href');
if (itemurl != '') {
if (itemurl.indexOf("//ccc-x.jd.com") != -1) {
var sku_c = $(this).attr('sku_c');
if (sku_c == undefined) {
var arr = [];
var str = $(this).attr('onclick');
arr = str.split(",");
sku_c = tools.trim(arr[6].replace(/\"/g, ""));
itemurl = '//item.jd.com/' + sku_c + '.html';
}
}
if (urls[index_num].length < 4) {
item[index_num].push($(this));
urls[index_num].push(itemurl);
$(this).attr('data-type', 'yes');
}
}
}
})
$(".goods-chosen-list li").each(function(index) {
if ($(this).attr('data-type') != 'yes') {
var itemurl = $(this).find("a").attr('href');
if (itemurl != '') {
if (itemurl.indexOf("//ccc-x.jd.com") != -1) {
var arr = [];
var str = $(this).attr('onclick');
arr = str.split(",");
var sku_c = tools.trim(arr[6].replace(/\"/g, ""));
itemurl = '//item.jd.com/' + sku_c + '.html';
}
if (urls[index_num].length < 4) {
item[index_num].push($(this));
urls[index_num].push(itemurl);
$(this).attr('data-type', 'yes');
}
}
}
})
$(".may-like-list li").each(function(index) {
if ($(this).attr('data-type') != 'yes') {
var itemurl = $(this).find("a").attr('href');
if (itemurl != '') {
if (itemurl.indexOf("//ccc-x.jd.com") != -1) {
var arr = [];
var str = $(this).attr('onclick');
arr = str.split(",");
var sku_c = tools.trim(arr[6].replace(/\"/g, ""));
itemurl = '//item.jd.com/' + sku_c + '.html';
}
if (urls[index_num].length < 4) {
item[index_num].push($(this));
urls[index_num].push(itemurl);
$(this).attr('data-type', 'yes');
}
}
}
})
if (urls.length > 0 && urls[index_num].length > 0 && item[index_num].length > 0) {
var u = urls[index_num].join(',');
$.getJSON('https://tbao.idey.cn/coupon.php', {
act: 'itemlink',
itemurl: u,
num: index_num
}, function(res) {
if (res.type == 'success') {
for (var i = 0; i < res.data.length; i++) {
item[res.num][i].find("a").attr('data-ref', res.data[i].longUrl);
item[res.num][i].find("a").attr('target', '');
item[res.num][i].find("a").unbind("click");
item[res.num][i].find("a").bind("click", function(e) {
if ($(this).attr('data-ref')) {
e.preventDefault();
coupon.onclicks($(this).attr('data-ref'));
}
})
}
}
})
}
index_num += 1;
},
get_taobao_id:(pagetype, url)=>{
var return_data = '';
if (pagetype == 'taobao_item') {
var params = location.search.split("?")[1].split("&");
for (var index in params) {
if (params[index].split("=")[0] == "id") {
var productId = params[index].split("=")[1];
}
}
return_data = productId;
}
return return_data;
},
show: () => {
var pagetype = coupon.getUrlType(location.href);
if (pagetype == 'taobao_item') {
coupon.initCss();
var productId = coupon.get_taobao_id(pagetype, location.href);
var couponurl = "https://s.idey.cn/ltb.php?act=items&itemurl=" + encodeURIComponent(location.href) +
'&itemid=' +
productId;
$.getJSON(couponurl, function(res) {
var data = res.data;
var couponArea = '';
if (data.alist.length > 0) {
for (let i = 0; i < data.alist.length; i++) {
couponArea +=
''
}
}
setTimeout(function(){
if (location.href.indexOf("//detail.tmall") != -1) {
if ($('div').is('.tm-fcs-panel')) {
$(".tm-fcs-panel").after(couponArea);
}else if($('div').is('.Promotion--root--3qHQal')){
$(".Promotion--root--3qHQalP").after(couponArea);
}else if($('div').is('.Price--root--1CrVGjc')){
$(".Price--root--1CrVGjc").after(couponArea);
}else if($('div').is('.Price--eXtPHNRb')){
$(".Price--eXtPHNRb").after(couponArea);
}else{
$(".Price--root--1X-r-XP").after(couponArea);
}
} else {
if ($('div').is('ul.tb-meta')) {
$("ul.tb-meta").after(couponArea);
}else if($('div').is('.Promotion--root--3qHQal')){
$(".Promotion--root--3qHQalP").after(couponArea);
}else if($('div').is('.Price--root--1CrVGjc')){
$(".Price--root--1CrVGjc").after(couponArea);
}else if($('div').is('.Price--eXtPHNRb')){
$(".Price--eXtPHNRb").after(couponArea);
}else{
$(".Price--root--1X-r-XP").after(couponArea);
}
}
}, 1800 )
if(data.shortUrl){
let hbm='';
$("body").append(hbm);
$("#hbcode").qrcode({
render: "canvas", //也可以替换为table
width: 160,
height: 150,
text: data.shortUrl
});
}
});
} else if (pagetype == 'jd_item') {
coupon.initCss();
var productId = /(\d+)\.html/.exec(window.location.href)[1];
var couponurl = "https://tbao.idey.cn/jd.php?act=recovelink&itemurl=" + encodeURIComponent(location.href) +
'&itemid=' + productId;
$.getJSON(couponurl, function(res) {
var data = res.data;
if (!tools.GetQueryString('utm_campaign') && data) {
window.location.href = 'https://wk.idey.cn/red.html?url=' + encodeURIComponent(data);
}
});
var couponurls = "https://s.idey.cn/xjd.php?act=item&itemurl=" + encodeURIComponent(location.href) +
'&itemid=' + productId;
$.getJSON(couponurls, function(res) {
var data = res.data;
var couponArea = '';
if (data.alist.length > 0) {
for (let i = 0; i < data.alist.length; i++) {
couponArea +=
''
}
}
setTimeout(function(){
$(".summary-price-wrap").after(couponArea);
},500)
if (data.couponLink) {
$('#qrcode').qrcode({
render: "canvas", //也可以替换为table
width: 125,
height: 120,
text: data.couponLink
});
} else if (data.item_link.shortUrl) {
$('#qrcode').qrcode({
render: "canvas", //也可以替换为table
width: 125,
height: 120,
text: data.item_link.shortUrl
});
} else {
$('#qrcode').qrcode({
render: "canvas", //也可以替换为table
width: 125,
height: 120,
text: data.item_link.longUrl
});
}
if (data.item_link.originalPrice) {
$("#now_price").html('' + data.item_link.originalPrice);
}
if (data.item_link.actualPrice) {
$("#coupon_price").html('' + data.item_link.actualPrice);
}
if(data.hbcode !=''){
let hbm='';
$(".toolbar-qrcode").hide();
setInterval(function(){
$(".toolbar-qrcode").hide();
},100 )
$("body").append(hbm);
$("#hbcode").qrcode({
render: "canvas", //也可以替换为table
width: 150,
height: 140,
text: data.hbcode
});
}
});
} else if (pagetype == 'jd_list') {
setInterval(coupon.get_url, 300);
} else if (pagetype == 'jd_miaosha') {
$(".seckill_mod_goodslist li").find("a").click(function(e) {
if ($(this).attr('data-ref')) {
e.preventDefault();
coupon.onclicks($(this).attr('data-ref'));
}
})
setInterval(coupon.get_miaosha, 300);
}else if(pagetype=="jingfen"){
let productId=tools.getUrlParam("sku");
if(productId){
var couponurl = "https://s.idey.cn/xjd.php?act=itemcode&itemid=" + productId;
$.getJSON(couponurl, function(res) {
var data = res.data;
if(data !='' && data !=null && data !=undefined){
$(document).ready(function(){
setTimeout(function(){
$(".btn-area").after("使用微信或者京东APP扫码更便捷
");
$(".btn-area").after("");
// $(".btn-area").hide();
$('.coupon_code').qrcode({
render: "canvas", //也可以替换为table
width: 200,
height: 180,
text: data
});
}, 500 )
});
}else{
$(document).ready(function(){
setTimeout(function(){
$(".btn-area").after("使用微信或者京东APP扫码更便捷
");
$(".btn-area").after("");
// $(".btn-area").hide();
$('.coupon_code').qrcode({
render: "canvas", //也可以替换为table
width: 400,
height: 380,
text: location.href
});
}, 500 )
});
}
});
}else{
$(document).ready(function(){
setTimeout(function(){
$(".btn-area").after("使用微信或者京东APP扫码更便捷
");
$(".btn-area").after("");
// $(".btn-area").hide();
$('.coupon_code').qrcode({
render: "canvas", //也可以替换为table
width: 400,
height: 380,
text: location.href
});
}, 500 )
});
}
}else{
video.main();
}
},
get_miaosha: () => {
item[index_num] = [];
urls[index_num] = [];
$(".seckill_mod_goodslist li").each(function(index) {
if ($(this).attr('data-type') != 'yes') {
var itemurl = $(this).find("a").attr('href');
var skuid = $(this).attr('data-sku');
var that = $(this);
if (itemurl != '') {
if (urls[index_num].length < 4) {
item[index_num].push($(this));
urls[index_num].push(itemurl);
$(this).attr('data-type', 'yes');
}
}
}
})
if (urls.length > 0 && urls[index_num].length > 0 && item[index_num].length > 0) {
var u = urls[index_num].join(',');
$.getJSON('https://tbao.idey.cn/coupon.php', {
act: 'itemlink',
itemurl: u,
num: index_num
}, function(res) {
if (res.type == 'success') {
for (var i = 0; i < res.data.length; i++) {
item[res.num][i].find("a").attr('data-ref', res.data[i].longUrl);
item[res.num][i].find("a").attr('href', "javascript:void(0);");
item[res.num][i].find("a").attr('target', '');
// item[res.num][i].find("a").unbind("click");
item[res.num][i].find("a").click(function(e) {
e.preventDefault();
coupon.onclicks($(this).attr('data-ref'));
})
}
}
})
}
index_num += 1;
},
};
try {
coupon.show();
} catch (e) {
}
})();