Comparing version 1.0.6 to 1.0.7
@@ -1,1 +0,1 @@ | ||
let orderBtn=document.getElementById("order"),btn=(orderBtn.addEventListener("click",function(){let e=document.querySelector(".chapter_list");for(var t=e.getElementsByTagName("a"),t=Array.prototype.slice.call(t).reverse();e.firstChild;)e.removeChild(e.firstChild);t.forEach(function(t){e.appendChild(t)}),"1"===orderBtn.getAttribute("type")?(orderBtn.setAttribute("type","2"),orderBtn.innerHTML='<i class="i-icon i-order-descending"></i>\u6b63\u5e8f'):(orderBtn.setAttribute("type","1"),orderBtn.innerHTML='<i class="i-icon i-order-ascending"></i>\u5012\u5e8f')}),document.querySelector(".box .left .label"));function addHistoryCartoon(e,r){var t;localStorage.getItem("nikename")&&(t=new URLSearchParams(window.location.search).get("id"),getFetch(`/plugin/cartoon/resource/status?id=${t}&type=${e}&status=`+r).then(t=>{2===e&&r?(alert("\u6536\u85cf\u6210\u529f\uff01"),btn.setAttribute("type","cav"),btn.innerHTML='<i class="i-icon i-heart-filled"></i>\u53d6\u6d88\u6536\u85cf'):2!==e||r||(alert("\u5df2\u53d6\u6d88\u6536\u85cf\uff01"),btn.setAttribute("type","fav"),btn.innerHTML='<i class="i-icon i-heart"></i>\u6536\u85cf')}))}btn.addEventListener("click",function(t){var e=localStorage.getItem("nikename"),r=btn.getAttribute("type");e?addHistoryCartoon(2,"fav"===r):openPopShowTap()}),addHistoryCartoon(1,!0); | ||
let orderBtn=document.getElementById("order"),btn=(orderBtn.addEventListener("click",function(){let e=document.querySelector(".chapter_list");for(var t=e.getElementsByTagName("a"),t=Array.prototype.slice.call(t).reverse();e.firstChild;)e.removeChild(e.firstChild);t.forEach(function(t){e.appendChild(t)}),"1"===orderBtn.getAttribute("type")?(orderBtn.setAttribute("type","2"),orderBtn.innerHTML='<i class="i-icon i-order-descending"></i>\u6b63\u5e8f'):(orderBtn.setAttribute("type","1"),orderBtn.innerHTML='<i class="i-icon i-order-ascending"></i>\u5012\u5e8f')}),document.querySelector(".box .left .label"));function addHistoryCartoon(e,r){var t;localStorage.getItem("nikename")&&(t=location.pathname.split("/").pop().split(".")[0],getFetch(`/plugin/cartoon/resource/status?id=${t}&type=${e}&status=`+r).then(t=>{2===e&&r?(alert("\u6536\u85cf\u6210\u529f\uff01"),btn.setAttribute("type","cav"),btn.innerHTML='<i class="i-icon i-heart-filled"></i>\u53d6\u6d88\u6536\u85cf'):2!==e||r||(alert("\u5df2\u53d6\u6d88\u6536\u85cf\uff01"),btn.setAttribute("type","fav"),btn.innerHTML='<i class="i-icon i-heart"></i>\u6536\u85cf')}))}btn.addEventListener("click",function(t){var e=localStorage.getItem("nikename"),r=btn.getAttribute("type");e?addHistoryCartoon(2,"fav"===r):openPopShowTap()}),addHistoryCartoon(1,!0); |
@@ -1,1 +0,1 @@ | ||
var dp,clickVideoStatus=!1;let btn=document.querySelector(".box .left .label");function addHistoryVideo(t,a){var e;localStorage.getItem("nikename")&&(e=new URLSearchParams(window.location.search).get("id"),getFetch(`/plugin/video/resource/status?id=${e}&type=${t}&status=`+a).then(e=>{3===t&&a?(alert("\u6536\u85cf\u6210\u529f\uff01"),btn.setAttribute("type","cav"),btn.innerHTML='<i class="i-icon i-heart-filled"></i>\u53d6\u6d88'):3!==t||a||(alert("\u5df2\u53d6\u6d88\u6536\u85cf\uff01"),btn.setAttribute("type","fav"),btn.innerHTML='<i class="i-icon i-heart"></i>\u6536\u85cf')}))}function loadDPVideo(){var e=document.getElementById("dplayers").getAttribute("vurl");(dp=new Aliplayer({id:"dplayers",source:e,width:"100%",height:"100%",autoplay:!1,isLive:!1,rePlay:!1,playsinline:!0,preload:!0,useH5Prism:!0,controlBarVisibility:"click",diagnosisButtonVisible:!1,vodRetry:20,rtsLoadDataTimeout:12e3,x5_type:"h5",skinLayout:[{name:"bigPlayButton",align:"blabs",x:10,y:60},{name:"controlBar",align:"blabs",x:0,y:0,children:[{name:"progress",align:"blabs",x:0,y:44},{name:"playButton",align:"tl",x:15,y:12},{name:"timeDisplay",align:"tl",x:10,y:7},{name:"fullScreenButton",align:"tr",x:10,y:12},{name:"volume",align:"tr",x:5,y:10}]}]})).on("ready",e=>{document.querySelector(".blur_box .loading").remove(),console.log("\u89c6\u9891\u52a0\u8f7d\u5b8c\u6210")}),dp.on("play",()=>{var e,t=dp.getDuration();let a=document.querySelector(".blur_box .tips");console.log("\u70b9\u51fb\u64ad\u653e"),setTimeout(function(){a.style.bottom="-2.2rem"},3e3),2<t&&t<=180&&t%1!=0&&(e=document.querySelector(".main_domain .forever span").textContent,getFeedback(e,`该视频总时常小于3分钟:${t}s`)),clickVideoStatus?document.querySelector(".blur_box .push")&&document.querySelector(".blur_box .push").remove():getPlayImg()}),dp.on("pause",()=>{console.log("\u70b9\u51fb\u6682\u505c"),clickVideoStatus&&getPusImg()}),testVideoUrl()}async function getPusImg(){var e=await getFastBannerItem("videoPusImg"),t=document.querySelector(".blur_box"),e=getRandomObjects(e,1);t&&0<e.length?(dp.pause(),e=`<div class="push"><a link="${e[0].links}" cid="${e[0].id}" class="ulink"><img src="${e[0].pic}" loading="lazy" /></a></div>`,t.insertAdjacentHTML("beforeend",e),clickFastTap()):document.querySelector(".blur_box .push").remove()}async function getPlayImg(){var e=await getFastBannerItem("videoPlyImg"),t=document.querySelector(".blur_box"),e=getRandomObjects(e,1);t&&0<e.length&&(dp.pause(),e=`<div class="start" style="background-image: url(${e[0].pic});"><span>8秒</span><a link="${e[0].links}" cid="${e[0].id}" class="ulink"><img src="${e[0].pic}" loading="lazy" /></a></div>`,t.insertAdjacentHTML("beforeend",e),clickFastTap(),updateCountdown())}async function getFastBtmImg(){var e=await getFastBannerItem("videoBtmImg"),t=document.querySelector(".vaj_list .btm"),e=getRandomObjects(e,1);t&&0<e.length&&(t.innerHTML=`<a link="${e[0].links}" cid="${e[0].id}" style="background-image:url(${e[0].pic})" class="img ulink"><img src="${e[0].pic}" loading="lazy"/></a>`,clickFastTap())}function updateCountdown(){let e=8,t=()=>{0<(self.countdown=e)?(e--,document.querySelector(".blur_box .start span").textContent=e+"\u79d2",setTimeout(t,1e3)):(dp.play(),document.querySelector(".blur_box .start").remove(),clickVideoStatus=!0)};t()}function testVideoUrl(){let a=0,n="";timestamp=(new Date).getTime();let o=[{link:document.getElementById("dplayers").getAttribute("vpic"),type:"image",name:"\u56fe\u7247"},{link:document.getElementById("dplayers").getAttribute("vurl"),type:"application",name:"M3U8"}],i=async()=>{let t=o[a];var e=new URLSearchParams;e.append("url",t.link),console.log("\u5f00\u59cb\u81ea\u68c0"+t.name),await fetch("https://status.bdscdnstatic.com",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:e}).then(e=>e.json()).then(e=>{"number"==typeof e.status&&0!=e.status&&200!=e.status&&(n+=`[${t.name}]${t.link} 打开异常:${e.msg},`)}),++a<o.length?i():n&&(e=document.querySelector(".main_domain .forever span").textContent,getFeedback(e,n))};i()}btn&&(btn.addEventListener("click",function(e){var t=localStorage.getItem("nikename"),a=btn.getAttribute("type");t?addHistoryVideo(3,"fav"===a):openPopShowTap()}),loadDPVideo(),addHistoryVideo(1,!0)),getFastBtmImg(); | ||
var dp,clickVideoStatus=!1;let btn=document.querySelector(".box .left .label");function addHistoryVideo(t,n){var e;localStorage.getItem("nikename")&&(e=location.pathname.split("/").pop().split(".")[0],getFetch(`/plugin/video/resource/status?id=${e}&type=${t}&status=`+n).then(e=>{3===t&&n?(alert("\u6536\u85cf\u6210\u529f\uff01"),btn.setAttribute("type","cav"),btn.innerHTML='<i class="i-icon i-heart-filled"></i>\u53d6\u6d88'):3!==t||n||(alert("\u5df2\u53d6\u6d88\u6536\u85cf\uff01"),btn.setAttribute("type","fav"),btn.innerHTML='<i class="i-icon i-heart"></i>\u6536\u85cf')}))}function loadDPVideo(){var e=document.getElementById("dplayers").getAttribute("vurl");(dp=new Aliplayer({id:"dplayers",source:e,width:"100%",height:"100%",autoplay:!1,isLive:!1,rePlay:!1,playsinline:!0,preload:!0,useH5Prism:!0,controlBarVisibility:"click",diagnosisButtonVisible:!1,vodRetry:20,rtsLoadDataTimeout:12e3,x5_type:"h5",skinLayout:[{name:"bigPlayButton",align:"blabs",x:10,y:60},{name:"controlBar",align:"blabs",x:0,y:0,children:[{name:"progress",align:"blabs",x:0,y:44},{name:"playButton",align:"tl",x:15,y:12},{name:"timeDisplay",align:"tl",x:10,y:7},{name:"fullScreenButton",align:"tr",x:10,y:12},{name:"volume",align:"tr",x:5,y:10}]}]})).on("ready",e=>{document.querySelector(".blur_box .loading").remove(),console.log("\u89c6\u9891\u52a0\u8f7d\u5b8c\u6210")}),dp.on("play",()=>{var e,t=dp.getDuration();let n=document.querySelector(".blur_box .tips");console.log("\u70b9\u51fb\u64ad\u653e"),setTimeout(function(){n.style.bottom="-2.2rem"},3e3),2<t&&t<=180&&t%1!=0&&(e=document.querySelector(".main_domain .forever span").textContent,getFeedback(e,`该视频总时常小于3分钟:${t}s`)),clickVideoStatus?document.querySelector(".blur_box .push")&&document.querySelector(".blur_box .push").remove():getPlayImg()}),dp.on("pause",()=>{console.log("\u70b9\u51fb\u6682\u505c"),clickVideoStatus&&getPusImg()}),testVideoUrl()}async function getPusImg(){var e=await getFastBannerItem("videoPusImg"),t=document.querySelector(".blur_box"),e=getRandomObjects(e,1);t&&0<e.length?(dp.pause(),e=`<div class="push"><a link="${e[0].links}" cid="${e[0].id}" class="ulink"><img src="${e[0].pic}" loading="lazy" /></a></div>`,t.insertAdjacentHTML("beforeend",e),clickFastTap()):document.querySelector(".blur_box .push").remove()}async function getPlayImg(){var e=await getFastBannerItem("videoPlyImg"),t=document.querySelector(".blur_box"),e=getRandomObjects(e,1);t&&0<e.length&&(dp.pause(),e=`<div class="start" style="background-image: url(${e[0].pic});"><span>8秒</span><a link="${e[0].links}" cid="${e[0].id}" class="ulink"><img src="${e[0].pic}" loading="lazy" /></a></div>`,t.insertAdjacentHTML("beforeend",e),clickFastTap(),updateCountdown())}async function getFastBtmImg(){var e=await getFastBannerItem("videoBtmImg"),t=document.querySelector(".vaj_list .btm"),e=getRandomObjects(e,1);t&&0<e.length&&(t.innerHTML=`<a link="${e[0].links}" cid="${e[0].id}" style="background-image:url(${e[0].pic})" class="img ulink"><img src="${e[0].pic}" loading="lazy"/></a>`,clickFastTap())}function updateCountdown(){let e=8,t=()=>{0<(self.countdown=e)?(e--,document.querySelector(".blur_box .start span").textContent=e+"\u79d2",setTimeout(t,1e3)):(dp.play(),document.querySelector(".blur_box .start").remove(),clickVideoStatus=!0)};t()}function testVideoUrl(){let n=0,a="";timestamp=(new Date).getTime();let o=[{link:document.getElementById("dplayers").getAttribute("vpic"),type:"image",name:"\u56fe\u7247"},{link:document.getElementById("dplayers").getAttribute("vurl"),type:"application",name:"M3U8"}],i=async()=>{let t=o[n];var e=new URLSearchParams;e.append("url",t.link),console.log("\u5f00\u59cb\u81ea\u68c0"+t.name),await fetch("https://status.bdscdnstatic.com",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:e}).then(e=>e.json()).then(e=>{"number"==typeof e.status&&0!=e.status&&200!=e.status&&(a+=`[${t.name}]${t.link} 打开异常:${e.msg},`)}),++n<o.length?i():a&&(e=document.querySelector(".main_domain .forever span").textContent,getFeedback(e,a))};i()}btn&&(btn.addEventListener("click",function(e){var t=localStorage.getItem("nikename"),n=btn.getAttribute("type");t?addHistoryVideo(3,"fav"===n):openPopShowTap()}),loadDPVideo(),addHistoryVideo(1,!0)),getFastBtmImg(); |
{ | ||
"name": "htmxskyjs", | ||
"private": false, | ||
"version": "1.0.6", | ||
"version": "1.0.7", | ||
"description": "high power tools for html", | ||
@@ -6,0 +6,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
383147