Comparing version 1.0.5 to 1.0.6
@@ -1,1 +0,1 @@ | ||
function loadMoreData(){var e,t;window.loadStatus||(document.getElementById("loadingTxt").style.display="flex",window.loadStatus=!0,t=Number("{{website['list_page']}}"),(e=document.querySelectorAll(".content.category_list").length)<t?(sionname=`list_${t=e+1}_`+(e="{{website['list_id']}}"),sessionStorage.getItem(sionname)?(document.getElementById("loadingTxt").insertAdjacentHTML("beforebegin",sessionStorage.getItem(sionname)),window.loadStatus=!1,document.getElementById("loadingTxt").style.display="none"):getFetch(`/list/loadmore?type={{website['list_type']}}&id=${e}&pg=`+t).then(e=>{e=atob(e.content),e=decodeURIComponent(e);document.getElementById("loadingTxt").insertAdjacentHTML("beforebegin",e),window.loadStatus=!1,document.getElementById("loadingTxt").style.display="none",sessionStorage.setItem(sionname,e),getFastItmImg(),getFooterImg()})):document.getElementById("loadingTxt").style.display="none")}async function getFooterImg(){let o=await getFastBannerItem("ResImg");document.querySelectorAll(".data_list").forEach(e=>{var t=getRandomObjects(o,3);let n=document.createElement("div");n.classList.add("res_list"),t.forEach(e=>{e=`<a href="${e.links}" target="_blank" class="res"><img src="${e.pic}" loading="lazy"/></a>`;n.innerHTML+=e}),e.appendChild(n),e.classList.remove("data_list")})}window.addEventListener("scroll",function(){window.innerHeight+window.scrollY>=document.body.offsetHeight-1&&loadMoreData()}),getFooterImg(); | ||
function loadMoreData(){var e,t,n;window.loadStatus||(document.getElementById("loadingTxt").style.display="flex",window.loadStatus=!0,e=window.list_page,e=Number(e),(n=document.querySelectorAll(".content.category_list").length)<e?(e=window.list_id,t=window.list_type,sionname=`list_${n=n+1}_`+e,sessionStorage.getItem(sionname)?(document.getElementById("loadingTxt").insertAdjacentHTML("beforebegin",sessionStorage.getItem(sionname)),window.loadStatus=!1,document.getElementById("loadingTxt").style.display="none"):getFetch(`/list/loadmore?type=${t}&id=${e}&pg=`+n).then(e=>{e=atob(e.content),e=decodeURIComponent(e);document.getElementById("loadingTxt").insertAdjacentHTML("beforebegin",e),window.loadStatus=!1,document.getElementById("loadingTxt").style.display="none",sessionStorage.setItem(sionname,e),getFastItmImg(),getFastResImg()})):document.getElementById("loadingTxt").style.display="none")}window.addEventListener("scroll",function(){window.innerHeight+window.scrollY>=document.body.offsetHeight-1&&loadMoreData()}); |
const domain="/api";var main_index=0;function getFetch(n){return new Promise((t,e)=>{fetch(domain+n,{method:"GET"}).then(e=>e.json()).then(e=>{105!==e.code&&300!==e.code||(clearCookie("user_token"),alert(e.msg)),t(e)})})}function getPost(i,a){return new Promise((t,e)=>{var n={method:"POST",body:JSON.stringify(a),headers:{"content-type":"application/json"}};fetch(domain+i,n).then(e=>e.json()).then(e=>{t(e.data)})})}function getLoginRegister(e,t){document.querySelector(".pop_content form .loading").style.display="flex";t={method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)};fetch(domain+e,t).then(e=>e.json()).then(e=>{var t;0===e.code?((t=new Date).setTime(t.getTime()+1728e5),document.cookie=`user_token=${e.data.token}; expires=${t.toUTCString()}; path=/`,localStorage.setItem("uuid",e.data.uid),localStorage.setItem("nikename",e.data.nikename||e.data.user_phone),location.reload()):(document.querySelector(".pop_content form .loading").style.display="none",t=e.msg.replace("\u5c0f\u7a0b\u5e8f",""),alert(t))})}function checkCookie(e){for(const i of document.cookie.split(";")){var[t,n]=i.trim().split("=");if(t===e)return n}return!1}function clearCookie(e){document.cookie=e+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;",localStorage.removeItem("nikename"),localStorage.removeItem("uuid"),location.reload()}function openPopShowTap(){var e=document.querySelector(".pop_show_box"),t=document.getElementById("login_form"),n=document.getElementById("register_form"),i=document.querySelector(".pop_content .head .title");"flex"===e.style.display?e.style.display="none":(e.style.display="flex",t.style.display="block",n.style.display="none",i.textContent="\u7528\u6237\u767b\u5f55")}function loginFunction(){document.querySelector(".pop_show_box");let n=document.getElementById("login_form"),i=document.getElementById("register_form"),a=document.querySelector(".pop_content .head .title");document.querySelectorAll(".closepop").forEach(e=>{e.addEventListener("click",function(e){openPopShowTap()})}),document.querySelectorAll(".pop_content .formbtn").forEach(t=>{t.addEventListener("click",function(e){e.preventDefault();e=t.getAttribute("type");"register"===e?(n.style.display="none",i.style.display="block",a.textContent="\u7528\u6237\u6ce8\u518c"):"login"===e?(n.style.display="block",i.style.display="none",a.textContent="\u7528\u6237\u767b\u5f55"):getFetch("/login/random/account").then(e=>{var t;0===e.code&&(alert(`游客注册成功 | ||
请记住您的账号密码 | ||
账号:${e.data.user_phone} | ||
密码:`+e.data.user_password),(t=new Date).setTime(t.getTime()+1728e5),document.cookie=`user_token=${e.data.token}; expires=${t.toUTCString()}; path=/`,localStorage.setItem("uuid",e.data.uid),localStorage.setItem("nikename",e.data.user_phone),location.reload())})})}),n.addEventListener("submit",function(e){e.preventDefault();var e=n.elements.phone.value,t=n.elements.password.value;e&&t?getLoginRegister("/login/password",{user_phone:e,user_password:t}):alert("\u8bf7\u8f93\u5165\u7528\u6237\u540d\u6216\u5bc6\u7801")}),i.addEventListener("submit",function(e){e.preventDefault();var e=i.elements.phone.value,t=i.elements.password.value;e&&t?getLoginRegister("/login/register",{user_phone:e,user_password:t}):alert("\u8bf7\u8f93\u5165\u7528\u6237\u540d\u6216\u5bc6\u7801")})}function showNextLink(){var e=document.querySelectorAll(".main_domain .forever");e[main_index].style.display="none",e[main_index=(main_index+1)%e.length].style.display="flex"}function diaplayTime(e){e=e.replace(/-/g,"/");let t;var n,i=864e5,a=new Date,o=a.getTime(),a=6e4*a.getTimezoneOffset(),a=new Date(a+o+288e5).getTime()-new Date(e);if(!(a<0))return o=a/2592e6,e=a/(7*i),i=a/i,n=a/36e5,a=a/6e4,t=1<=o?o<=12?parseInt(o)+"\u6708\u524d":parseInt(o/12)+"\u5e74\u524d":1<=e?parseInt(e)+"\u5468\u524d":1<=i?parseInt(i)+"\u5929\u524d":1<=n?parseInt(n)+"\u5c0f\u65f6\u524d":1<=a?parseInt(a)+"\u5206\u949f\u524d":"\u521a\u521a"}function getRandomObjects(e,t){var n=e.slice(0);for(let e=n.length-1;0<e;e--){var i=Math.floor(Math.random()*(e+1));[n[e],n[i]]=[n[i],n[e]]}return n.slice(0,t)}function getFastBannerItem(a){return new Promise(n=>{var e,t=sessionStorage.getItem(a+"_BANNER_LIST");let i=/iPhone|iPad|iPod|Android/i.test(navigator.userAgent);t?(t=JSON.parse(t),i?(e=t.filter(e=>"pc"!=e.terminal),n(e)):(e=t.filter(function(e){return/(ludu319|huntermail)/.test(e.links)}),n(e))):getFetch("/plugin/fastquark/list?page=1&sizes=200&keywords="+a).then(e=>{var t,e=e.data.list;sessionStorage.setItem(a+"_BANNER_LIST",JSON.stringify(e)),i?(t=e.filter(e=>"pc"!=e.terminal),n(t)):(t=e.filter(function(e){return/(ludu319|huntermail)/.test(e.links)}),n(t))})})}async function getFastItmImg(){let o=await getFastBannerItem("ItmImg");document.querySelectorAll(".category_list .item_list").forEach(function(e){var t=e.querySelectorAll(".label"),n=Math.floor(t.length/4),i=getRandomObjects(o,n);if(0<i.length){for(let e=1;e<=n;e++){var a=i[e-1]||i[Math.floor(Math.random()*i.length)],a=`<a link="${a.links}" cid="${a.id}" class="label fast ulink"><div class="img" style="background-image:url(${a.pic})"><img src="${a.pic}" loading="lazy"/><span><i class="i-icon i-ad"></i>赞助商</span></div><div class="title">${a.title}</div></a>`;t[4*e-1].insertAdjacentHTML("afterend",a)}e.classList.remove("item_list")}})}async function getFastItmTxt(){let o=await getFastBannerItem("ItmTxt");document.querySelectorAll(".category_list .text_list").forEach(function(e){var t=e.querySelectorAll(".label"),n=Math.floor(t.length/4),i=getRandomObjects(o,n);if(0<i.length){for(let e=1;e<=n;e++){var a=i[e-1]||i[Math.floor(Math.random()*i.length)],a=`<a link="${a.links}" cid="${a.id}" class="label fast ulink"><div class="peo"><i class="i-icon i-ad"></i>赞助商</div><div class="title">${a.title}</div><div class="time">${diaplayTime(a.uptime)}</div></a>`;t[4*e-1].insertAdjacentHTML("afterend",a)}e.classList.remove("text_list")}})}async function getFastCatImg(){let n=await getFastBannerItem("CatImg");document.querySelectorAll(".category_list .head .cat_img").forEach(function(e){var t=getRandomObjects(n,1);0<t.length&&(e.innerHTML=`<a link="${t[0].links}" cid="${t[0].id}" class="fast ulink"><img src="${t[0].pic}" loading="lazy"/></a>`,e.classList.remove("cat_img"))})}async function getFastResImg(){let i=await getFastBannerItem("ResImg");document.querySelectorAll(".category_list .res_img").forEach(function(e){let t=e.getAttribute("cid");var n=i.filter(e=>-1!=e.ctype.indexOf(t));if(0<n.length){let t=document.createElement("div");t.classList.add("res_list"),n.forEach(e=>{e=`<a link="${e.links}" cid="${e.id}" class="res ulink"><img src="${e.pic}" loading="lazy"/></a>`;t.innerHTML+=e}),e.insertAdjacentElement("afterend",t),e.classList.remove("res_img")}else{n=getRandomObjects(i.filter(e=>"headResImg"===e.ctype),3);if(0<n.length){let t=document.createElement("div");t.classList.add("res_list"),n.forEach(e=>{e=`<a link="${e.links}" cid="${e.id}" class="res ulink"><img src="${e.pic}" loading="lazy"/></a>`;t.innerHTML+=e}),e.insertAdjacentElement("afterend",t),e.classList.remove("res_img")}}})}async function getFastTopImg(){var e=await getFastBannerItem("TopImg"),t=document.querySelector(".vaj_list .top"),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>`:t&&t.remove()}async function getFastFotImg(){var e=await getFastBannerItem("FotImg"),t=document.querySelector(".vaj_list .fix"),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>`:t&&t.remove()}async function getFastVajImg(){var e=await getFastBannerItem("VajImg"),n=document.querySelector(".vaj_list .vaj"),e=getRandomObjects(e,10);if(n&&2<e.length){let t=document.createElement("div");t.classList.add("list"),e.forEach(e=>{e=`<a link="${e.links}" cid="${e.id}" class="res ulink"><img src="${e.pic}" loading="lazy"/><span>${e.title}</span></a>`;t.innerHTML+=e}),n.insertAdjacentElement("beforeend",t)}else n&&n.remove()}async function getFastAppImg(){var e=await getFastBannerItem("AppImg"),n=document.querySelector(".vaj_list .app");if(n&&2<e.length){let t=document.createElement("div");t.classList.add("list"),e.forEach(e=>{e=`<a link="${e.links}" cid="${e.id}" class="res ulink"><img src="${e.pic}" loading="lazy"/><span>${e.title}</span></a>`;t.innerHTML+=e}),n.insertAdjacentElement("beforeend",t)}else n&&n.remove()}function scrollPageTop(e=0,t=0){const n=()=>{0<(document.documentElement.scrollTop||document.body.scrollTop)&&(window.requestAnimationFrame(n),window.scrollTo(e,t))};n()}function clickFastTap(){document.querySelectorAll("a.ulink").forEach(n=>{n.addEventListener("click",function(e){e.preventDefault();var e=n.getAttribute("cid"),t=n.getAttribute("link");t&&window.open(t,"_blank"),e&&getFetch("/plugin/fastquark/click?id="+e)}),n.classList.remove("ulink")})}function getFeedback(e,t="\u65e0",n="\u89c6\u9891\u8d44\u6e90"){let i={site:e,type:n,ids:window.location.href};fetch("https://ip.hellobike.com/service/getIpInfo").then(e=>e.json()).then(e=>{e=e.data,e=`IP:${e.ip} | ||
密码:`+e.data.user_password),(t=new Date).setTime(t.getTime()+1728e5),document.cookie=`user_token=${e.data.token}; expires=${t.toUTCString()}; path=/`,localStorage.setItem("uuid",e.data.uid),localStorage.setItem("nikename",e.data.user_phone),location.reload())})})}),n.addEventListener("submit",function(e){e.preventDefault();var e=n.elements.phone.value,t=n.elements.password.value;e&&t?getLoginRegister("/login/password",{user_phone:e,user_password:t}):alert("\u8bf7\u8f93\u5165\u7528\u6237\u540d\u6216\u5bc6\u7801")}),i.addEventListener("submit",function(e){e.preventDefault();var e=i.elements.phone.value,t=i.elements.password.value;e&&t?getLoginRegister("/login/register",{user_phone:e,user_password:t}):alert("\u8bf7\u8f93\u5165\u7528\u6237\u540d\u6216\u5bc6\u7801")})}function showNextLink(){var e=document.querySelectorAll(".main_domain .forever");e[main_index].style.display="none",e[main_index=(main_index+1)%e.length].style.display="flex"}function diaplayTime(e){e=e.replace(/-/g,"/");let t;var n,i=864e5,a=new Date,o=a.getTime(),a=6e4*a.getTimezoneOffset(),a=new Date(a+o+288e5).getTime()-new Date(e);if(!(a<0))return o=a/2592e6,e=a/(7*i),i=a/i,n=a/36e5,a=a/6e4,t=1<=o?o<=12?parseInt(o)+"\u6708\u524d":parseInt(o/12)+"\u5e74\u524d":1<=e?parseInt(e)+"\u5468\u524d":1<=i?parseInt(i)+"\u5929\u524d":1<=n?parseInt(n)+"\u5c0f\u65f6\u524d":1<=a?parseInt(a)+"\u5206\u949f\u524d":"\u521a\u521a"}function getRandomObjects(e,t){var n=e.slice(0);for(let e=n.length-1;0<e;e--){var i=Math.floor(Math.random()*(e+1));[n[e],n[i]]=[n[i],n[e]]}return n.slice(0,t)}function getFastBannerItem(a){return new Promise(n=>{var e,t=sessionStorage.getItem(a+"_BANNER_LIST");let i=/iPhone|iPad|iPod|Android/i.test(navigator.userAgent);t?(t=JSON.parse(t),i?(e=t.filter(e=>"pc"!=e.terminal),n(e)):(e=t.filter(function(e){return/(ludu319|huntermail)/.test(e.links)}),n(e))):getFetch("/plugin/fastquark/list?page=1&sizes=200&keywords="+a).then(e=>{var t,e=e.data.list;sessionStorage.setItem(a+"_BANNER_LIST",JSON.stringify(e)),i?(t=e.filter(e=>"pc"!=e.terminal),n(t)):(t=e.filter(function(e){return/(ludu319|huntermail)/.test(e.links)}),n(t))})})}async function getFastItmImg(){let o=await getFastBannerItem("ItmImg");document.querySelectorAll(".category_list .item_list").forEach(function(e){var t=e.querySelectorAll(".label"),n=Math.floor(t.length/4),i=getRandomObjects(o,n);if(e.classList.remove("item_list"),0<i.length){for(let e=1;e<=n;e++){var a=i[e-1]||i[Math.floor(Math.random()*i.length)],a=`<a link="${a.links}" cid="${a.id}" class="label fast ulink"><div class="img" style="background-image:url(${a.pic})"><img src="${a.pic}" loading="lazy"/><span><i class="i-icon i-ad"></i>赞助商</span></div><div class="title">${a.title}</div></a>`;t[4*e-1].insertAdjacentHTML("afterend",a)}clickFastTap()}})}async function getFastItmTxt(){let o=await getFastBannerItem("ItmTxt");document.querySelectorAll(".category_list .text_list").forEach(function(e){var t=e.querySelectorAll(".label"),n=Math.floor(t.length/4),i=getRandomObjects(o,n);if(e.classList.remove("text_list"),0<i.length){for(let e=1;e<=n;e++){var a=i[e-1]||i[Math.floor(Math.random()*i.length)],a=`<a link="${a.links}" cid="${a.id}" class="label fast ulink"><div class="peo"><i class="i-icon i-ad"></i>赞助商</div><div class="title">${a.title}</div><div class="time">${diaplayTime(a.uptime)}</div></a>`;t[4*e-1].insertAdjacentHTML("afterend",a)}clickFastTap()}})}async function getFastCatImg(){let n=await getFastBannerItem("CatImg");document.querySelectorAll(".category_list .head .cat_img").forEach(function(e){var t=getRandomObjects(n,1);e.classList.remove("cat_img"),0<t.length&&(e.innerHTML=`<a link="${t[0].links}" cid="${t[0].id}" class="fast ulink"><img src="${t[0].pic}" loading="lazy"/></a>`)}),clickFastTap()}async function getFastResImg(){let i=await getFastBannerItem("ResImg");document.querySelectorAll(".category_list .res_img").forEach(function(e){let t=e.getAttribute("cid");var n=i.filter(e=>-1!=e.ctype.indexOf(t));if(e.classList.remove("res_img"),0<n.length){let t=document.createElement("div");t.classList.add("res_list"),n.forEach(e=>{e=`<a link="${e.links}" cid="${e.id}" class="res ulink"><img src="${e.pic}" loading="lazy"/></a>`;t.innerHTML+=e}),e.insertAdjacentElement("afterend",t)}else{n=getRandomObjects(i.filter(e=>"headResImg"===e.ctype),3);if(0<n.length){let t=document.createElement("div");t.classList.add("res_list"),n.forEach(e=>{e=`<a link="${e.links}" cid="${e.id}" class="res ulink"><img src="${e.pic}" loading="lazy"/></a>`;t.innerHTML+=e}),e.insertAdjacentElement("afterend",t)}}}),clickFastTap()}async function getFastTopImg(){var e=await getFastBannerItem("TopImg"),t=document.querySelector(".vaj_list .top"),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()):t&&t.remove()}async function getFastFotImg(){var e=await getFastBannerItem("FotImg"),t=document.querySelector(".vaj_list .fix"),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()):t&&t.remove()}async function getFastVajImg(){var e=await getFastBannerItem("VajImg"),n=document.querySelector(".vaj_list .vaj"),e=getRandomObjects(e,10);if(n&&2<e.length){let t=document.createElement("div");t.classList.add("list"),e.forEach(e=>{e=`<a link="${e.links}" cid="${e.id}" class="res ulink"><img src="${e.pic}" loading="lazy"/><span>${e.title}</span></a>`;t.innerHTML+=e}),n.insertAdjacentElement("beforeend",t),clickFastTap()}else n&&n.remove()}async function getFastAppImg(){var e=await getFastBannerItem("AppImg"),n=document.querySelector(".vaj_list .app");if(n&&2<e.length){let t=document.createElement("div");t.classList.add("list"),e.forEach(e=>{e=`<a link="${e.links}" cid="${e.id}" class="res ulink"><img src="${e.pic}" loading="lazy"/><span>${e.title}</span></a>`;t.innerHTML+=e}),n.insertAdjacentElement("beforeend",t),clickFastTap()}else n&&n.remove()}function scrollPageTop(e=0,t=0){const n=()=>{0<(document.documentElement.scrollTop||document.body.scrollTop)&&(window.requestAnimationFrame(n),window.scrollTo(e,t))};n()}function clickFastTap(){document.querySelectorAll("a.ulink").forEach(n=>{n.addEventListener("click",function(e){e.preventDefault();var e=n.getAttribute("cid"),t=n.getAttribute("link");t&&window.open(t,"_blank"),e&&getFetch("/plugin/fastquark/click?id="+e)}),n.classList.remove("ulink")})}function getFeedback(e,t="\u65e0",n="\u89c6\u9891\u8d44\u6e90"){let i={site:e,type:n,ids:window.location.href};fetch("https://ip.hellobike.com/service/getIpInfo").then(e=>e.json()).then(e=>{e=e.data,e=`IP:${e.ip} | ||
地区:${e.Country}-${e.Province}-${e.City}-${e.ISP} | ||
自检:`+t;i.remark=e,getPost("/feedback/send",i)})}document.addEventListener("DOMContentLoaded",function(){var e=document.querySelector(".main_domain .forever");e&&(e.style.display="block",setInterval(showNextLink,1e3));let t=document.getElementById("backtop");t&&(window.addEventListener("scroll",function(){var e=window.scrollY;t.style=200<e?"display:flex":"display:none"}),t.addEventListener("click",scrollPageTop));var e=0<=window.navigator.userAgent.indexOf("Mobile"),n=document.querySelector(".menu_box .down_app"),e=(e&&n&&(n.style.display="flex"),getFastItmImg(),getFastItmTxt(),getFastCatImg(),getFastResImg(),getFastTopImg(),getFastVajImg(),getFastAppImg(),getFastFotImg(),setTimeout(function(){clickFastTap()},100),localStorage.getItem("nikename"));e||(document.querySelector("main").insertAdjacentHTML("beforeend",`<div class="pop_show_box"> | ||
自检:`+t;i.remark=e,getPost("/feedback/send",i)})}document.addEventListener("DOMContentLoaded",function(){var e=document.querySelector(".main_domain .forever");e&&(e.style.display="block",setInterval(showNextLink,1e3));let t=document.getElementById("backtop");t&&(window.addEventListener("scroll",function(){var e=window.scrollY;t.style=200<e?"display:flex":"display:none"}),t.addEventListener("click",scrollPageTop));var e=0<=window.navigator.userAgent.indexOf("Mobile"),n=document.querySelector(".menu_box .down_app"),e=(e&&n&&(n.style.display="flex"),getFastItmImg(),getFastItmTxt(),getFastCatImg(),getFastResImg(),getFastTopImg(),getFastVajImg(),getFastAppImg(),getFastFotImg(),localStorage.getItem("nikename"));e||(document.querySelector("main").insertAdjacentHTML("beforeend",`<div class="pop_show_box"> | ||
<div class="pop_bg closepop"></div> | ||
@@ -8,0 +8,0 @@ <div class="pop_content"> |
@@ -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():(dp.pause(),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&&(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,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(); |
{ | ||
"name": "htmxskyjs", | ||
"private": false, | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"description": "high power tools for html", | ||
@@ -6,0 +6,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
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
383157