From aed7f3f29d82c7da2c911d754c53e4b31de18743 Mon Sep 17 00:00:00 2001 From: ictye <95436661+northgreen@users.noreply.github.com> Date: Sat, 7 Oct 2023 01:50:33 +0800 Subject: [PATCH] Dev (#4) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 更正插件加载方法,允许软件包作为插件加载 * 优化前端效果,使其适配obs * 更新无关紧要的文件的结构 * 1.推进插件接口的完善工作:插件配置 2.推进前端插件工作 * 初步完成前端插件接口的任务,不过还是有点问题难以解决 * 初步完成前端插件接口的任务,不过还是有点问题难以解决 * 修正拼写错误 --- web/js/script/main_js.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/web/js/script/main_js.js b/web/js/script/main_js.js index cb79722..49ad9b6 100644 --- a/web/js/script/main_js.js +++ b/web/js/script/main_js.js @@ -37,20 +37,18 @@ define(["js/script/plugin_manager"], let connect_ok = void 0 function websocket(ura){ if("WebSocket" in window) { - var socket = new WebSocket(ura) + let socket = new WebSocket(ura) socket.addEventListener("message",function(event){ console.log('Message from server ', event.data) if (event.data === "{\"code\": 200, \"msg\": \"connect ok\"}"){ - console.info("connect to seriver success") + console.info("connect to server success") connect_ok = 1 }else if (connect_ok === 1) { console.info("cok is "+event.data) let msg = JSON.parse(event.data) - if (msg.message_class === "default"){ - //消息处理 - pm.message_handlers(msg) - } + //消息处理 + pm.message_handlers(msg) } }) socket.onopen=function(){ @@ -58,7 +56,7 @@ function websocket(ura){ } } else { - alert("err! your bloser is not sopported!!!") + alert("err! your browser is not supported!!!") } }