mirror of
https://github.com/muerwre/muerwre.github.io.git
synced 2025-04-25 19:06:41 +07:00
commit 9899659dd3
Author: Fedor Katurov <gotham48@gmail.com> Date: Fri Nov 11 18:23:52 2022 +0600 fixed contact page mobile view
This commit is contained in:
parent
cf4fa8656b
commit
514aaf36b1
206 changed files with 250 additions and 250 deletions
1
nuxt/web-socket.2446dc0d.js
Normal file
1
nuxt/web-socket.2446dc0d.js
Normal file
|
@ -0,0 +1 @@
|
|||
import{M as u,N as i}from"./entry.fa74e411.js";const n={log:(...t)=>console.log("[Content]",...t),warn:(...t)=>console.warn("[Content]",...t)};let e;function g(){if(!window.WebSocket){n.warn("Could not enable hot reload, your browser does not support WebSocket.");return}const t=o=>{try{if(!JSON.parse(o.data))return;i()}catch{}},s=()=>n.log("WS connected!"),a=o=>{switch(o.code){case"ECONNREFUSED":r(!0);break;default:n.warn("WS Error:",o);break}},l=o=>{o.code===1e3||o.code===1005?n.log("WS closed!"):r(!0)},r=(o=!1)=>{if(o){n.log("WS reconnecting.."),setTimeout(r,1e3);return}if(e){try{e.close()}catch{}e=void 0}const c=`${u().public.content.wsUrl}ws`;n.log(`WS connect to ${c}`),e=new WebSocket(c),e.onopen=s,e.onmessage=t,e.onerror=a,e.onclose=l};return r(),{connect:r}}export{g as useContentWebSocket};
|
Loading…
Add table
Add a link
Reference in a new issue