Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

htmxskyjs

Package Overview
Dependencies
Maintainers
1
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

htmxskyjs - npm Package Compare versions

Comparing version 1.0.16 to 1.0.17

2

editors/web2/js/main.js
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/CC231116055618Mf/.test(e.ctype)}),n(e))):getFetch("/plugin/fastquark/list/1/200/"+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/CC231116055618Mf/.test(e.ctype)}),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/3),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-fire-fill"></i>赞助商</span></div><div class="title">${a.title}</div></a>`;t[3*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-fire-fill"></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(o=>{o.addEventListener("click",function(e){e.preventDefault();var e=o.getAttribute("cid"),t=o.getAttribute("tim"),n=o.getAttribute("link");let i=o.getAttribute("other"),a=o.getAttribute("oget");t&&(t=(new Date).getTime(),sessionStorage.setItem("vlink_time",t),document.querySelector(".pop_show_fast").style.display="none"),e&&getFetch("/plugin/fastquark/click?id="+e),n&&window.open(n,"_blank"),i&&setTimeout(function(){window.open(i,a)},200)}),o.classList.remove("ulink")}),clickLastTap()}async function clickLastTap(){var e=await getFastBannerItem("TopImg"),t=await getFastBannerItem("ItmImg");let s=e.concat(t);document.querySelectorAll("a.vlink").forEach(o=>{o.addEventListener("click",function(e){e.preventDefault();var t,e=sessionStorage.getItem("vlink_time"),n=(new Date).getTime(),i=o.getAttribute("href"),a=o.getAttribute("target");6e5<=n-e&&0<s.length?(e=getRandomObjects(s,1),t=document.querySelector("main"),n=`<div class="pop_show_box pop_show_fast" style="display:flex;">
密码:`+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/CC231116055618Mf/.test(e.ctype)}),n(e))):getFetch("/plugin/fastquark/list/1/200/"+a).then(e=>{var t,e=JSON.parse(atob(e.data));sessionStorage.setItem(a+"_BANNER_LIST",JSON.stringify(e)),i?(t=e.filter(e=>"pc"!=e.terminal),n(t)):(t=e.filter(function(e){return/CC231116055618Mf/.test(e.ctype)}),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/3),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-fire-fill"></i>赞助商</span></div><div class="title">${a.title}</div></a>`;t[3*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-fire-fill"></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(o=>{o.addEventListener("click",function(e){e.preventDefault();var e=o.getAttribute("cid"),t=o.getAttribute("tim"),n=o.getAttribute("link");let i=o.getAttribute("other"),a=o.getAttribute("oget");t&&(t=(new Date).getTime(),sessionStorage.setItem("vlink_time",t),document.querySelector(".pop_show_fast").style.display="none"),e&&getFetch("/plugin/fastquark/click?id="+e),n&&window.open(n,"_blank"),i&&setTimeout(function(){window.open(i,a)},200)}),o.classList.remove("ulink")}),clickLastTap()}async function clickLastTap(){var e=await getFastBannerItem("TopImg"),t=await getFastBannerItem("ItmImg");let s=e.concat(t);document.querySelectorAll("a.vlink").forEach(o=>{o.addEventListener("click",function(e){e.preventDefault();var t,e=sessionStorage.getItem("vlink_time"),n=(new Date).getTime(),i=o.getAttribute("href"),a=o.getAttribute("target");6e5<=n-e&&0<s.length?(e=getRandomObjects(s,1),t=document.querySelector("main"),n=`<div class="pop_show_box pop_show_fast" style="display:flex;">
<div class="pop_bg closenot"></div>

@@ -6,0 +6,0 @@ <div class="pop_content pop_notice pop_fast">

{
"name": "htmxskyjs",
"private": false,
"version": "1.0.16",
"version": "1.0.17",
"description": "high power tools for html",

@@ -6,0 +6,0 @@ "keywords": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc