全网视频VIP(自用开发中)
目前為
// ==UserScript==
// @name 全网视频VIP(开发中)
// @namespace http://www.zhihupe.com/
// @version 0.3
// @author zhihu
// @description 全网视频VIP(自用开发中)
// @icon https://www.zhihupe.com/favicon.ico
// @require https://cdn.staticfile.org/jquery/3.6.0/jquery.min.js
// @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/*
// @grant GM_xmlhttpRequest
// @grant GM_openInTab
// @grant GM_addStyle
// @grant GM_setValue
// @grant GM_getValue
// @grant GM_deleteValue
// @grant GM_setClipboard
// @grant unsafeWindow
// @run-at document-start
// @license AGPL
// ==/UserScript==
(function() {
'use strict';
var Insidehtml ="";
var Outsidehtml = "";
var qqselecthtml ="";
var iqiyiselecthtml="";
var youkuselecthtml ="";
var PlayID = "";
var jiexi;
var AutoPlay = 0;
var host = window.location.host;
const playList=[
{"id":"1","name":"高速/B站","category":1,"url":"https://api.okjx.cc:3389/jx.php?url=", "showType":3},
{"id":"2","name":"高速接口","category":1,"url":"https://jsap.attakids.com/?url=", "showType":3},
{"id":"3","name":"综合/B站","category":1,"url":"https://vip.parwix.com:4433/player/?url=", "showType":3},
{"id":"4","name":"OK解析","category":1,"url":"https://okjx.cc/?url=", "showType":3},
{"id":"5","name":"夜幕","category":1,"url":"https://www.yemu.xyz/?url=", "showType":3},
{"id":"6","name":"乐多资源","category":1,"url":"https://api.leduotv.com/wp-api/ifr.php?isDp=1&vid=", "showType":3},
{"id":"7","name":"爱豆","category":1,"url":"https://jx.aidouer.net/?url=", "showType":1},
{"id":"8","name":"虾米","category":1,"url":"https://jx.xmflv.com/?url=", "showType":1},
{"id":"9","name":"M3U8.TV","category":1,"url":"https://jx.m3u8.tv/jiexi/?url=", "showType":3},
{"id":"10","name":"人人迷","category":1,"url":"https://jx.blbo.cc:4433/?url=", "showType":3},
{"id":"11","name":"全民","category":1,"url":"https://jx.blbo.cc:4433/?url=", "showType":3},
{"id":"12","name":"七哥","category":1,"url":"https://jx.mmkv.cn/tv.php?url=", "showType":3},
{"id":"13","name":"冰豆","category":1,"url":"https://api.qianqi.net/vip/?url=", "showType":3},
{"id":"14","name":"迪奥","category":1,"url":"https://123.1dior.cn/?url=", "showType":1},
{"id":"15","name":"CK","category":1,"url":"https://www.ckplayer.vip/jiexi/?url=", "showType":1},
{"id":"16","name":"游艺","category":1,"url":"https://api.u1o.net/?url=", "showType":1},
{"id":"17","name":"LE","category":1,"url":"https://lecurl.cn/?url=", "showType":1},
{"id":"18","name":"ckmov","category":1,"url":"https://www.ckmov.vip/api.php?url=", "showType":1},
{"id":"19","name":"playerjy/B站","category":1,"url":"https://jx.playerjy.com/?url=", "showType":3},
{"id":"20","name":"ccyjjd","category":1,"url":"https://ckmov.ccyjjd.com/ckmov/?url=", "showType":1},
{"id":"21","name":"爱豆","category":1,"url":"https://jx.aidouer.net/?url=", "showType":1},
{"id":"22","name":"诺诺","category":1,"url":"https://www.ckmov.com/?url=", "showType":1},
{"id":"23","name":"H8","category":1,"url":"https://www.h8jx.com/jiexi.php?url=", "showType":1},
{"id":"24","name":"BL","category":1,"url":"https://vip.bljiex.com/?v=", "showType":1},
{"id":"25","name":"解析la","category":1,"url":"https://api.jiexi.la/?url=", "showType":1},
{"id":"26","name":"MUTV","category":1,"url":"https://jiexi.janan.net/jiexi/?url=", "showType":1},
{"id":"27","name":"MAO","category":1,"url":"https://www.mtosz.com/m3u8.php?url=", "showType":1},
{"id":"28","name":"老板","category":1,"url":"https://vip.laobandq.com/jiexi.php?url=", "showType":1},
{"id":"29","name":"盘古","category":1,"url":"https://www.pangujiexi.cc/jiexi.php?url=", "showType":1},
{"id":"30","name":"盖世","category":1,"url":"https://www.gai4.com/?url=", "showType":1},
{"id":"31","name":"小蒋","category":1,"url":"https://www.kpezp.cn/jlexi.php?url=", "showType":1},
{"id":"32","name":"YiTV","category":1,"url":"https://jiexi.us/?url=", "showType":1},
{"id":"33","name":"星空","category":1,"url":"http://60jx.com/?url=", "showType":1},
{"id":"34","name":"0523","category":1,"url":"https://go.yh0523.cn/y.cy?url=", "showType":1},
{"id":"35","name":"17云","category":1,"url":"https://www.1717yun.com/jx/ty.php?url=", "showType":1},
{"id":"36","name":"4K","category":1,"url":"https://jx.4kdv.com/?url=", "showType":1},
{"id":"37","name":"云析","category":1,"url":"https://jx.yparse.com/index.php?url=", "showType":1},
{"id":"38","name":"8090","category":1,"url":"https://www.8090g.cn/?url=", "showType":1},
{"id":"39","name":"江湖","category":1,"url":"https://api.jhdyw.vip/?url=", "showType":1},
{"id":"40","name":"诺讯","category":1,"url":"https://www.nxflv.com/?url=", "showType":1},
{"id":"41","name":"PM","category":1,"url":"https://www.playm3u8.cn/jiexi.php?url=", "showType":1},
{"id":"42","name":"奇米","category":1,"url":"https://qimihe.com/?url=", "showType":1},
{"id":"43","name":"思云","category":1,"url":"https://jx.ap2p.cn/?url=", "showType":1},
{"id":"44","name":"听乐","category":1,"url":"https://jx.dj6u.com/?url=", "showType":1},
{"id":"45","name":"aijx","category":1,"url":"https://jiexi.t7g.cn/?url=", "showType":1},
{"id":"46","name":"52","category":1,"url":"https://vip.52jiexi.top/?url=", "showType":1},
{"id":"47","name":"黑米","category":1,"url":"https://www.myxin.top/jx/api/?url=", "showType":1},
{"id":"48","name":"豪华啦","category":1,"url":"https://api.lhh.la/vip/?url=", "showType":1},
{"id":"49","name":"凉城","category":1,"url":"https://jx.mw0.cc/?url=", "showType":1},
{"id":"50","name":"33t","category":1,"url":"https://www.33tn.cn/?url=", "showType":1},
{"id":"51","name":"180","category":1,"url":"https://jx.000180.top/jx/?url=", "showType":1},
{"id":"52","name":"无名","category":1,"url":"https://www.administratorw.com/video.php?url=", "showType":1},
{"id":"53","name":"黑云","category":1,"url":"https://jiexi.380k.com/?url=", "showType":1},
{"id":"54","name":"九八","category":1,"url":"https://jx.youyitv.com/?url=", "showType":1},
{"id":"55","name":"纯净/B站","category":1,"url":"https://z1.m1907.cn/?jx=", "showType":3},
{"id":"56","name":"综合线路","category":2,"url":"https://laisoyiba.com/mov/s/?sv=3&url=", "showType":1},
{"id":"57","name":"纯净/B站","category":2,"url":"https://z1.m1907.cn/?jx=", "showType":1},
{"id":"58","name":"高速接口","category":2,"url":"https://jsap.attakids.com/?url=", "showType":1},
{"id":"59","name":"综合/B站1","category":2,"url":"https://vip.parwix.com:4433/player/?url=", "showType":1},
{"id":"60","name":"OK解析","category":2,"url":"https://okjx.cc/?url=", "showType":1},
{"id":"61","name":"夜幕","category":2,"url":"https://www.yemu.xyz/?url=", "showType":1},
{"id":"62","name":"虾米","category":2,"url":"https://jx.xmflv.com/?url=", "showType":1},
{"id":"63","name":"全民","category":2,"url":"https://jx.quanmingjiexi.com/?url=", "showType":1},
];
if(GM_getValue('AutoPlay') == 1){
autoplay()
console.log('已进入自动解析')
}
if(host.indexOf("v.qq.com") > -1){
PlayID = "#mod_player";
addbtn();
console.log('已进入腾讯');
setInterval(function(){
$("#mask_layer").hide();
$(".mod_vip_popup").hide();
},100);
}else if(host.indexOf("v.youku.com") > -1){
PlayID = "#player";
addbtn();
console.log('已进入优酷')
}else if(host.indexOf("www.iqiyi.com") > -1){
PlayID = "#flashbox";
addbtn();
console.log('已进入爱奇艺')
}
function GMaddStyle(css){
var addStyle = document.createElement('style');
addStyle.textContent = css;
var doc = document.head || document.documentElement;
doc.appendChild(addStyle);
};
function GMaddScript(js){
let script = document.createElement('script');
script.src = js;
var docu = document.head || document.documentElement;
docu.appendChild(script);
};
function GMaddlink(linkcss){
let mylink = document.createElement('link');
mylink.href = linkcss;
mylink.rel = 'stylesheet';
var docl = document.head || document.documentElement;
docl.appendChild(mylink);
};
function GMopenInTab(url, open_in_background){
if (typeof GM_openInTab === "function") {
GM_openInTab(url, open_in_background);
} else {
GM.openInTab(url, open_in_background);
}
};
function sleep(time) {
return new Promise(resolve => setTimeout(resolve, time));
}
GMaddScript("https://www.layuicdn.com/layui/layui.js");
GMaddScript("https://cdn.staticfile.org/jquery/3.6.0/jquery.min.js");
GMaddlink("https://www.layuicdn.com/layui/css/layui.css");
function Playlist(){
$.each(playList,function(index,data){
if(data.category == 1){
Insidehtml += "<span class='jiexi inside' id='Inside_"+data.id+"' title='"+data.name+"' data-index='"+index+"' data-url='"+data.url+"'>" + data.name + "</span>";
qqselecthtml +="<option value='"+data.id+"' name='qq' data-url='"+data.url+"'>" + data.name + "</option>"
youkuselecthtml +="<option value='"+data.id+"' name='youku' data-url='"+data.url+"'>" + data.name + "</option>"
iqiyiselecthtml +="<option value='"+data.id+"' name='iqiyi' data-url='"+data.url+"'>" + data.name + "</option>"
}
else{
Outsidehtml += "<span class='jiexi outside 'title='"+data.name+"' data-index='"+index+"' data-url='"+data.url+"'>" + data.name + "</span>";
}
});
console.log(Insidehtml);
console.log(Outsidehtml);
}
async function addbtn() {
await sleep(4000);
var btnhtml = '<div class="elevator"><a class="elevator-msg" id="PlayMain"><svg t="1651763850342" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2320" width="200" height="200"><path d="M661.333333 665.6l51.2 12.8 42.666667-72.533333-34.133333-38.4c4.266667-21.333333 4.266667-38.4 4.266666-55.466667s0-34.133333-4.266666-51.2l34.133333-38.4-42.666667-72.533333-51.2 12.8c-25.6-21.333333-55.466667-42.666667-89.6-51.2L554.666667 256h-85.333334l-17.066666 51.2c-34.133333 8.533333-64 25.6-89.6 51.2l-51.2-12.8-42.666667 72.533333 34.133333 38.4c-4.266667 21.333333-4.266667 38.4-4.266666 55.466667s0 34.133333 4.266666 51.2l-34.133333 38.4 42.666667 72.533333 51.2-12.8c25.6 21.333333 55.466667 42.666667 89.6 51.2L469.333333 768h85.333334l17.066666-51.2c34.133333-8.533333 64-25.6 89.6-51.2z m38.4 81.066667c-21.333333 17.066667-51.2 34.133333-76.8 42.666666L597.333333 853.333333h-170.666666l-25.6-64c-29.866667-12.8-55.466667-25.6-76.8-42.666666l-68.266667 12.8-85.333333-149.333334 42.666666-51.2V512c0-17.066667 0-29.866667 4.266667-42.666667l-42.666667-51.2 85.333334-149.333333 68.266666 12.8c21.333333-17.066667 51.2-34.133333 76.8-42.666667L426.666667 170.666667h170.666666l25.6 64c29.866667 12.8 55.466667 25.6 76.8 42.666666l68.266667-12.8 85.333333 149.333334-42.666666 51.2c4.266667 12.8 4.266667 29.866667 4.266666 42.666666s0 29.866667-4.266666 42.666667l42.666666 51.2-85.333333 149.333333-68.266667-4.266666zM512 554.666667c25.6 0 42.666667-17.066667 42.666667-42.666667s-17.066667-42.666667-42.666667-42.666667-42.666667 17.066667-42.666667 42.666667 17.066667 42.666667 42.666667 42.666667z m0 85.333333c-72.533333 0-128-55.466667-128-128s55.466667-128 128-128 128 55.466667 128 128-55.466667 128-128 128z" fill="#ffffff" p-id="2321"></path></svg><span class="">解析设置</span></a><a id="playing" class="elevator-faq" target="_blank"><svg t="1651762741797" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1235" width="200" height="200"><path d="M512 853.333333c-187.733333 0-341.333333-153.6-341.333333-341.333333s153.6-341.333333 341.333333-341.333333 341.333333 153.6 341.333333 341.333333-153.6 341.333333-341.333333 341.333333z m0-85.333333c140.8 0 256-115.2 256-256s-115.2-256-256-256-256 115.2-256 256 115.2 256 256 256z m128-256l-213.333333 128V384l213.333333 128z" fill="#ffffff" p-id="1236"></path></svg><span class="">解析播放</span></a></div>';
$("body").append(btnhtml);
console.log("加载成功");
var css = `body, html {
font: 14px/1.5 "PingFang SC","微软雅黑","Microsoft YaHei",Helvetica,"Helvetica Neue",Tahoma,Arial,sans-serif;
color: #1c1f21;
height: 100%;
}
.elevator {
position: fixed;
padding: 0 16px;
top: 55%;
margin-top: -140px;
left: 0;
z-index: 899;
background: rgb(134 134 134 / 40%);
box-shadow: 1px 1px 8px 1px rgb(98 99 99 / 34%);
border-radius: 0 8px 8px 0;
}
.elevator a {
position: relative;
display: block;
width: 26px;
height: 56px;
font-size: 22px;
line-height: 20px;
color: #b5b9bc;
box-sizing: border-box;
text-align: center;
}
.elevator a+a:after {
position: absolute;
top: 0;
left: 50%;
margin-left: -12px;
content: '';
width: 24px;
border: 1px solid #F3F5F7;
}
.elevator a:hover {
color: #14191e;
}
.elevator .icon {
font-size: 24px;
line-height: 56px;
color: #199b6d;
width: 28px;
height: 28px;
margin: 14px 0;
}
.elevator .icon:hover {
color: #14191e;
}
.elevator a span {
display: none;
padding: 14px 0;
font-size: 12px;
color: #fff;
line-height: 14px;
}
.elevator .elevator-msg:hover .icon,
.elevator .elevator-faq:hover .icon, {
display: none;
}
.elevator .elevator-msg:hover span,
.elevator .elevator-faq:hover span, {
display: inline-block;
}
.jiexi{
padding: 5px 10px;
background: #e5e5e5a3;
font-size: 12px;
border-radius: 4px;
margin:0 5px 10px 5px;
color: #505050;
display: inline-block;
width: 70px;
text-align: center;
}
.jiexiselect{
color: #fff;
background: #fc5531;
}
.scan{
width:164px;
display:inline-block;
text-align: center;
}
.scan img{
width: 140px;
margin: 0 5px 10px 5px;
}
.scan h1{
font-size: 18px;
font-weight: bold;
margin: 0px 0 20px 0;
}
.scan p{
margin: 0;
color: #666;
font-size: 14px;
}
`;
GMaddStyle(css);
Playlist();
GM_deleteValue('selectid')
$('#playing').on('click', function(){
autoplay()
});
$('#PlayMain').on('click', function(){
console.log("点击成功")
jiexi = GM_getValue('AutoPlay') == 1?"checked":"";
layer.tab({
area: ['560px', '400px'],
id:"sett2",
tab: [{
title: '内嵌播放',
content: '<div style="margin:20px 30px 20px 30px;display:flex"><div style="width:336px;display:inline-block;padding-right: 15px;height: 270px;overflow-y: scroll;" id="jiexilist">'+ Insidehtml +'</div><div class="scan" ><img src="http://cdn.wezhicms.com/uploads/allimg/20211215/1-21121500044Q94.jpg"><h1>智狐百宝箱</h1><p>微信扫描上方二维码</p><p>关注我</p><p>从此不迷路</p></div></div>'
}, {
title: '跳转播放',
content: '<div style="margin:20px 30px 20px 30px;display:flex"><div style="width:336px;display:inline-block;padding-right: 15px;height: 270px;overflow-y: scroll;" id="jiexilist">'+ Outsidehtml +'</div><div class="scan" ><img src="http://cdn.wezhicms.com/uploads/allimg/20211215/1-21121500044Q94.jpg"><h1>智狐百宝箱</h1><p>微信扫描上方二维码</p><p>关注我</p><p>从此不迷路</p></div></div>'
}, {
title: '解析设置',
content: '<script src="https://www.layuicdn.com/layui/layui.js"></script><div style="margin:20px 30px 20px 30px;display:flex"><div style="width:356px;display:inline-block;padding-right: 15px;height: 270px;" id="jiexilist"><form class="layui-form" action=""><div class="layui-form-item"><label class="layui-form-label">自动解析</label><div class="layui-input-block"><input type="checkbox" '+jiexi+' name="switch" lay-skin="switch" id="autoplay" lay-text="ON|OFF"></div></div><div class="layui-form-item"><div class="layui-inline"><label class="layui-form-label">腾讯接口</label><div class="layui-input-inline"><select name="qq" lay-verify="required" id ="qq"><option value="">直接选择或搜索选择</option>'+qqselecthtml+'</select></div></div></div><div class="layui-form-item"><div class="layui-inline"><label class="layui-form-label">优酷接口</label><div class="layui-input-inline"><select name="youku" lay-verify="required" id ="youku"><option value="">直接选择或搜索选择</option>'+youkuselecthtml+'</select></div></div></div><div class="layui-form-item"><div class="layui-inline"><label class="layui-form-label">爱奇艺接口</label><div class="layui-input-inline"><select name="iqiyi" lay-verify="required" id ="iqiyi"><option value="">直接选择或搜索选择</option>'+iqiyiselecthtml+'</select></div></div></div></form></div><div class="scan" style="width:144px;"><img src="http://cdn.wezhicms.com/uploads/allimg/20211215/1-21121500044Q94.jpg"><h1>智狐百宝箱</h1><p>微信扫描上方二维码</p><p>关注我</p><p>从此不迷路</p></div></div>'
}]
,cancel: function(index,layero){
$(layero[0]).find("option:selected").each(function(){
if($(this).attr("name")=="qq"){
let qqselectedid= $(this).attr("value");
let qqurl = $(this).attr("data-url");
GM_setValue('qqselectedid',qqselectedid);
GM_setValue('qqurl',qqurl);
console.log(GM_getValue('qqselectedid'));
}
if($(this).attr("name")=="youku"){
let youkuselectedid= $(this).attr("value");
let youkuurl = $(this).attr("data-url");
GM_setValue('youkuselectedid',youkuselectedid);
GM_setValue('youkuurl',youkuurl);
console.log(GM_getValue('youkuselectedid'));
}
if($(this).attr("name")=="iqiyi"){
let iqiyiselectedid= $(this).attr("value");
let iqiyiurl = $(this).attr("data-url");
GM_setValue('iqiyiselectedid',iqiyiselectedid);
GM_setValue('iqiyiurl',iqiyiurl);
console.log(GM_getValue('iqiyiselectedid'));
}
});
$(layero[0]).find("input").each(function(){
if($(this).attr("name")=="switch"){
let checked = $("#autoplay+div").is(".layui-form-onswitch");
console.log(checked);
if( checked == true){
AutoPlay = 1;
GM_setValue('AutoPlay',AutoPlay);
autoplay();
}else{
AutoPlay = 0;
GM_setValue('AutoPlay',AutoPlay);
}
}
});
layer.msg("保存成功!",{"icon":1});
}
});
$('#'+GM_getValue('selectid')).addClass("jiexiselect");
if(GM_getValue('qqselectedid')!= null){
$('#qq').val(GM_getValue('qqselectedid'));
}
if(GM_getValue('youkuselectedid')!= null){
$('#youku').val(GM_getValue('youkuselectedid'));
}
if(GM_getValue('iqiyiselectedid')!= null){
$('#iqiyi').val(GM_getValue('iqiyiselectedid'));
}
});
$('body').on('click', '.inside',function(){
var playObjecturl = $(this).attr("data-url");
var playid = $(this).attr("id");
console.log(playid);
GM_setValue('selectid',playid);
console.log(GM_getValue('selectid'));
$("#jiexilist span").removeClass("jiexiselect");
$(this).addClass("jiexiselect");
$('.layui-layer-tab').remove();
$('.layui-layer-shade').remove();
$("#zhihuplay").remove();
let url = playObjecturl + window.location.href;
console.log(url);
GoPlay(url);
});
$('body').on('click', '.outside',function(){
let playObjecturl = $(this).attr("data-url");
let Outsideurl = playObjecturl + window.location.href;
$('.layui-layer-tab').remove();
$('.layui-layer-shade').remove();
console.log(Outsideurl);
window.open(Outsideurl);
});
}
async function autoplay() {
await sleep(3000);
var f="";
var autoplayurl
if(host.indexOf("v.qq.com") > -1){
f = GM_getValue('qqurl')
}else if(host.indexOf("v.youku.com") > -1){
f = GM_getValue('youkuurl')
}else if(host.indexOf("www.iqiyi.com") > -1){
f = GM_getValue('iqiyiurl')
}
if(f != null){
autoplayurl = f + window.location.href;
}else{let defurl = playList[0].url;
autoplayurl = defurl + window.location.href;
}
GoPlay(autoplayurl);
}
function GoPlay(e){
let playurl = e;
var iframeDivCss = "width:100%;height:100%;z-index:10000000;"
var videoPlayer = "<div style='"+iframeDivCss+"' id='zhihuplay'><iframe id='iframe-player-99087lkj' src='"+playurl+"' frameborder='0' allowfullscreen='true' width='100%' height='100%'></iframe></div>";
$(PlayID).empty();
$(PlayID).html(videoPlayer);
}
// Your code here...
})();