Skip to content

Commit

Permalink
Dev (#4)
Browse files Browse the repository at this point in the history
* 更正插件加载方法,允许软件包作为插件加载

* 优化前端效果,使其适配obs

* 更新无关紧要的文件的结构

* 1.推进插件接口的完善工作:插件配置
2.推进前端插件工作

* 初步完成前端插件接口的任务,不过还是有点问题难以解决

* 初步完成前端插件接口的任务,不过还是有点问题难以解决

* 修正拼写错误
  • Loading branch information
northgreen authored Oct 6, 2023
1 parent 5a444ff commit aed7f3f
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions web/js/script/main_js.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,28 +37,26 @@ 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(){
socket.send('{"code":200,"msg":"ok"}')
}
}
else {
alert("err! your bloser is not sopported!!!")
alert("err! your browser is not supported!!!")
}
}

Expand Down

0 comments on commit aed7f3f

Please sign in to comment.