GMsetValue(name, JSON.stringify(defaultValue))
/
function GMsetValue(name, defaultValue) {
if (typeof GM_setValue === 'function') {
GM_setValue(name, defaultValue);
} else {
GM.setValue(name, defaultValue);
}
}
function GMxmlhttpRequest(obj){
if (GM_xmlhttpRequest === "function") {
GM_xmlhttpRequest(obj);
} else{
GM.xmlhttpRequest(obj);
}
}
var replaceRaw, /是否嵌入当前页面/
episodes, /是否启用爱奇艺正确选集/
userApisOn; /是否加载自定义解析接口/
GMaddStyle(`
/*TMHY:TamperMonkeyHuanYan/
TMHYvideoContainer{z-index:999998;background:rgba(0,0,0,.7);position:fixed;top:7em;left:5em;height:65%;width:65%;resize:both;overflow:auto;box-shadow:2px 2px 5px 5px rgba(255,255,0,.8);}
/TMHYVideoContainer/
TMHYvideoContainer button{top:.1em;cursor:pointer;visibility:hidden;font-size:3em;color:#fff;background:transparent;border:0;}
TMHYvideoContainer:hover button{visibility:visible;}
TMHYvideoContainer:hover button:hover{color:#ff0;}
TMHYiframe{height:100%;width:100%;overflow:auto;position:absolute;top:0;left:0;margin:auto;border:0;box-shadow:0 0 3em rgba(0,0,0,.4);z-index:-1;}
/TMHYIframe/
TMHYul{position:fixed;top:5em;left:0;padding:0;z-index:999999;}
TMHYul li{list-style:none;}
TMHYul svg{float:right;}
.TM1{opacity:0.3;position:relative;padding-right:.5em;width:1.5em;cursor:pointer;}
.TM1:hover{opacity:1;}
.TM1 span{display:block;border-radius:0 .3em .3em 0;background-color:#ffff00;border:0;font:bold 1em "微软雅黑"!important;color:#ff0000;margin:0;padding:1em .3em;}
.TM3{position:absolute;top:0;left:1.5em;display:none;border-radius:.3em;margin:0;padding:0;}
.TM3 li{float:none;width:6em;margin:0;font-size:1em;padding:.15em 1em;cursor:pointer;color:#3a3a3a!important;background:rgba(255,255,0,0.8);}
.TM3 li:hover{color:white!important;background:rgba(0,0,0,.8);}
.TM3 li:last-child{border-radius:0 0 .35em .35em;}
.TM3 li:first-child{border-radius:.35em .35em 0 0;}
.TM1:hover .TM3{display:block;}
/自定义解析接口,本页播放窗口设置/
.TMHYp {position:fixed;top:20%;left:20%;z-index:999999;background:yellow;padding:30px 20px 10px 20px;border-radius:10px;text-align:center;}/TMHYpanel/
.TMHYp * {font-size:16px;background:rgba(255,255,0,1);font-family:'微软雅黑';color:#3a3a3a;border-radius:10px;}
tMuserDefine li {margin:5px;width:100%;list-style-type:none;}
.TMHYp input[type=text] {border-radius:5px !important;border:1px solid #3a3a3a;margin:2px 10px 2px 5px;padding:2px 5px;}
.TMHYlti {width:350px;}/TMHYlongTextInput/
.TMHYmti {width:160px;}/TMHYmti/
.idelete {float: left; display: inline-block; color: red; padding: 0 20px !important; cursor: pointer;}
.iname {padding-right:10px;}
li:hover .idelete,li:hover .ilink,li:hover .iname {background:rgba(224,175,17,0.62);}
.TMHYp button {border:1px solid #3a3a3a;border-radius:5px;cursor:pointer;padding: 2px 10px;margin:10px 20px 0 20px;}
.TMHYp button:hover {background:#3a3a3a;color:yellow;}
.TMHYClose {position:absolute;top:0;left:0;margin:0!important;}
.TMHYp fieldset {margin:0;padding:10px;}
.TMHYp legend {padding:0 10px;}
.TMHYp label {display:inline-block;}
.TMHYspan80 {display:inline-block;text-align:right;width:80px;}
.TMHYspan120 {display:inline-block;text-align:right;width:120px;}
inTabSettingSave {position:relative;margin-top:10px;padding:3px 20px;}
`);
var defaultapi = {
title: "龙轩脚本的接口,默认用浮空解析,失效请更换接口",
url: "http://goudidiao.com/?url="
};
//apis name:显示的文字 url:接口 title:提示文字 intab:是否适合内嵌(嵌入判断:GMgetValue("replaceRaw",false)值||intab值)
var apis =[
{name:"zl",url:"https://z1.m1907.cn/?a=1&jx=",title:"转圈圈就换线路",intab:1},
{name:"大表哥",url:"http://jx.biaoge.tv/index.php?url=",title:"iqiyi",intab:1},
{name:"yangju",url:"https://cdn.yangju.vip/k/?url=",title:"转圈圈就换线路",intab:1},
{name:"桔梗",url:"http://jx.itaoju.top/?url=",title:"iqiyi",intab:1},
{name:"024",url:"http://024sm.xyz/panguu/index.php?url=",title:"iqiyi",intab:1},
{name:"乐看",url:"http://jx.anlehe.com/?url=",title:"iqiyi",intab:1},
{name:"ok",url:"http://okjx.cc/?url=",title:"iqiyi",intab:1},
{name:"52a",url:"http://jx.52a.ink/?url=",title:"iqiyi",intab:1},
{name:"ledboke",url:"http://jx.ledboke.com/?url=",title:"iqiyi",intab:1},
{name:"98a",url:"http://jx.98a.ink/vip/?url=",title:"iqiyi",intab:1},
{name:"ledboke",url:"http://api.ledboke.com/?url=",title:"iqiyi",intab:1},
{name:"nobij",url:"http://api.nobij.top/?url=",title:"iqiyi",intab:1},
{name:"hezeshissl",url:"https://jx.hezeshi.net/ce/jlexi.php?url=",title:"转圈圈就换线路",intab:1},
{name:"yangju",url:"https://cdn.yangju.vip/k/?url=",title:"转圈圈就换线路",intab:1},
{name:"pingcc",url:"http://jx.pingcc.cn/?url=",title:"转圈圈就换线路",intab:1},
{name:"hellosex",url:"http://api.hellosex.cc/jlexi.php?url=",title:"转圈圈就换线路",intab:1},
{name:"beaacc",url:"http://beaacc.com/api.php?url=",title:"转圈圈就换线路",intab:1},
{name:"桔梗",url:"http://www.hongxin.me/?url=",title:"iqiyi",intab:1},
{name:"无名小站",url:"http://www.sfsft.com/admin.php?url=",title:"无名小站同源",intab:1},
{name:"无名小站2",url:"http://www.wmxz.wang/video.php?url=",title:"转圈圈就换线路",intab:1},
{name:"aeidu",url:"http://jx.aeidu.cn/index.php?url=",title:"综合,多线路",intab:0}
{name:"VIP看看",url:"http://q.z.vip.totv.72du.com/?url=",title:"更换线路成功率会提高",intab:1},
{name:"618G",url:"http://jx.618g.com/?url=",title:"618G",intab:1},
// {name:"百域阁",url:"http://api.baiyug.cn/vip/index.php?url=",title:"转圈圈就换线路",intab:1},
{name:"玩的嗨"+YoukuIcon,url:"http://tv.wandhi.com/go.html?url=",title:"综合接口,一键VIP*** 更新可用【作者mark zhang】脚本的接口",intab:0},
{name:"最惠买",url:"http://www.zhmdy.top/index.php?zhm_jx=",title:"懒人专用脚本接口",intab:0},
{name:"噗噗电影",url:"http://www.pupudy.com/splay.php?play=",title:"综合接口,破解全网VIP视频会员-去广告【作者ttmsjx】脚本的接口",intab:0},
{name:"搜你妹"+YoukuIcon,url:"http://www.sonimei.cn/?url=",title:"综合接口,VIP视频 更新可用【作者sonimei134】脚本的接口",intab:0},
{name:"ODFLV",url:"http://aikan-tv.com/?url=",title:"不稳定,广告过滤软件可能有影响",intab:1},
{name:"石头解析",url:"https://jiexi.071811.cc/jx.php?url=",title:"手动点播放",intab:1},
{name:"乐乐云",url:"https://660e.com/?url=",title:"乐乐云,未知效果",intab:1},
// {name:"旋风解析",url:"http://api.xfsub.com/index.php?url=",title:"1905优先使用",intab:1},
{name:"石头解析",url:"https://jiexi.071811.cc/jx.php?url=",title:"手动点播放",intab:1},
{name:"无名小站",url:"http://www.sfsft.com/admin.php?url=",title:"无名小站同源",intab:1},
{name:"VIP看看",url:"http://q.z.vip.totv.72du.com/?url=",title:"更换线路成功率会提高",intab:1},
// {name:"163人",url:"http://jx.api.163ren.com/vod.php?url=",title:"偶尔支持腾讯",intab:1},
//{name:"CKFLV",url:"http://www.0335haibo.com/tong.php?url=",title:"CKFLV云,部分站点不支持",intab:1},
//{name:"眼睛会下雨",url:"http://www.vipjiexi.com/yun.php?url=",title:"www.vipjiexi.com",intab:1},
{name:"人人发布",url:"http://v.renrenfabu.com/jiexi.php?url=",title:"综合,多线路",intab:0}
];
//嵌入页面播放
function openInTab(evt) {
// 找到支持的方法, 使用需要全屏的 element 调用
function launchFullScreen(element) {
if(element.requestFullscreen) {
element.requestFullscreen();
} else if(element.mozRequestFullScreen) {
element.mozRequestFullScreen();
} else if(element.webkitRequestFullscreen) {
element.webkitRequestFullscreen();
} else if(element.msRequestFullscreen) {
element.msRequestFullscreen();
}
}
if(evt.target.dataset.intab === '1'){
//如果页面有播放窗口,只需更新播放窗口的 src, 如果没有播放窗口,读取播放窗口位置信息,新建一个播放窗
if(q('#TMHYiframe') === null){
GMgetValue('intabSize','{"height":"","width":"","left":"","top":""}').then((position)=>{
var sty = JSON.parse(position);
sty = 'height:'+sty.height+';width:'+sty.width+';left:'+sty.left+';top:'+sty.top+';';
var a = makeEl('div');
a.id = 'TMHYvideoContainer';
a.setAttribute('style', sty);
a.innerHTML = '🗙🗖';
document.body.appendChild(a);
var b=makeEl('iframe');
b.id='TMHYiframe';
b.src=evt.target.dataset.url + location.href;
q('#TMHYvideoContainer').appendChild(b);
q('#TMHYIframeClose').addEventListener('click', ()=>{document.body.removeChild(q('#TMHYvideoContainer'));}, false);
q('#TMHYfullScreen').addEventListener('click', ()=>{launchFullScreen(q('#TMHYiframe'));}, false);
});
} else{
q('#TMHYiframe').src=evt.target.dataset.url + location.href;
}
} else{
//不适合页内播放的,打开新标签
window.open(evt.target.dataset.url + location.href);
}
}
//保存嵌入页面大小位置设置
function saveInTabSetting(){
var intabSize = {
height:q('#TMpH').value,
width:q('#TMpW').value,
left:q('#TMpL').value,
top:q('#TMpT').value
};
GMsetValue('intabSize', JSON.stringify(intabSize));
setTimeout('document.body.removeChild(q("#TMHYSetting"));', 30);
}
//生成"嵌入页面大小位置设置"面板
function intabSetting(){
var intabSize = GMgetValue('intabSize','{"height":"","width":"","left":"","top":""}')
.then((ag)=>{
var a = makeEl('div');
a.id='TMHYSetting';
a.setAttribute('class', 'TMHYp');
a.innerHTML =
<button class="TMHYClose" onclick="document.body.removeChild(this.parentNode)">🗙</button>
<fieldset>
<legend>页内播放窗口位置大小</legend>
<label for="TMpH"><span class="TMHYspan80">高度</span><input type="text" id="TMpH" value="${intabSize.height}" class="TMHYmti" placeholder='如"300px"或者"65%"'/></label>
<label for="TMpW"><span class="TMHYspan80">宽度</span><input type="text" id="TMpW" value="${intabSize.width}" class="TMHYmti" placeholder='如"300px"或者"65%"'/></label><br />
<label for="TMpL"><span class="TMHYspan80">左边距</span><input type="text" id="TMpL" value="${intabSize.left}" class="TMHYmti" placeholder='如"300px"或者"65%"'/></label>
<label for="TMpT"><span class="TMHYspan80">上边距</span><input type="text" id="TMpT" value="${intabSize.top}" class="TMHYmti" placeholder='如"300px"或者"65%"'/></label>
</fieldset>
<button onclick="(function(){var a=getComputedStyle(q('#TMHYvideoContainer'));q('#TMpH').value=a.height,q('#TMpW').value=a.width,q('#TMpL').value=a.left,q('#TMpT').value=a.top;})()">获取当前播放窗尺寸</button>
<button id="intabSettingPreview" onclick="(function(){a=q('#TMHYvideoContainer').style.cssText='height:'+q('#TMpH').value+';width:'+q('#TMpW').value+';left:'+q('#TMpL').value+';top:'+q('#TMpT').value+';';})()">预览</button>
<button id="intabSettingSave">保存</button>
;
document.body.appendChild(a);
q('#intabSettingSave').addEventListener('click', saveInTabSetting, false);
});
}
//检查是否勾选页内解析
function noNewTabCheck() {
var x, arr = qa(".TM4 li");
replaceRaw = q("#intabChekbx").checked;
GMsetValue("replaceRaw", replaceRaw);
for (x = 0; x < arr.length; x++) {
if (replaceRaw) {
arr[x].addEventListener("click", openInTab, false);
arr[x].setAttribute('onclick', '');
} else {
arr[x].removeEventListener("click", openInTab, false);
arr[x].setAttribute('onclick', 'window.open(this.dataset.url + location.href)');
}
}
}
/* 爱奇艺正确选集 /
function rightEpsLinkCheck() {
episodes = q("#realLinkChekbx").checked;
GMsetValue("episodes", episodes);
try {
if (episodes) {
q('#widget-dramaseries').addEventListener('click', function getLink(e) {
//-------------iqiyi剧集真实播放页面方法 Begin------------------
//Code piece infomation:
//License:MIT Author:hoothin Homepage: http://hoothin.com Email: [email protected]
var target = e.target.parentNode.tagName == "LI" ? e.target.parentNode : (e.target.parentNode.parentNode.tagName == "LI" ? e.target.parentNode.parentNode : e.target.parentNode.parentNode.parentNode);
if (target.tagName != "LI") return;
GMxmlhttpRequest({
method: 'GET',
url: "http://cache.video.qiyi.com/jp/vi/" + target.dataset.videolistTvid + "/" + target.dataset.videolistVid + "/?callback=crackIqiyi",
onload: function(result) {
var crackIqiyi = function(d) {
location.href = d.vu;
};
eval(result.responseText);
}
});
});
//-------------iqiyi剧集真实播放页面方法 End------------------
} else {
q('#widget-dramaseries').removeEventListener('click', getLink);
}
} catch(e) {}
}
/ 勾选自定义接口 /
function addApiCheck() {
userApisOn = q('#addApiChekBx').checked;
GMsetValue('userApisOn', userApisOn);
if(userApisOn) {
selfDefine();
setTimeout(showAddApiPanel, 200);
}
}
/ 执行 /
var div = makeEl("div");
div.id = "TMHYd";
var txt = '', i = 0;
/提供的接口列表*/
for (i in apis) {
txt += <li data-order=${i} data-url="${apis[i].url}" data-intab=${apis[i].intab} title="${apis[i].title}" onclick="window.open(this.dataset.url+location.href)">${apis[i].name}</li>
;
}
div.innerHTML = `
;
document.body.appendChild(div);
q("#addApiChekBx").addEventListener('change', addApiCheck, false);
// q("#addApiChekBx").addEventListener('click', addApiCheck, false);
GMgetValue('userApisOn',false)
.then((ag)=>{
userApisOn = ag;
q("#addApiChekBx").checked = userApisOn;
/*看看是否需要加载自定义的接口列表*/
if (userApisOn) {
GMgetValue('userApis', "[{}]").then((ag1)=>{
var userApis = JSON.parse(ag1), txt='';
for (var j in userApis) {
try {
if (userApis[j].link !== null) {
txt +=