您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

jsync_demo_db_only.js 1.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. function jsyncdb_init_helper(){
  2. // clog("WS_HELPER")
  3. var fns = window.glob_u.ws.fns
  4. var room_name=glob_u.fns.get_room_name()
  5. let ws_protocol = "wss:"
  6. location.protocol == "https:" ? "was already set to wss:" : ws_protocol = "ws:"
  7. var o = {
  8. include_participants_data:1,
  9. include_ws_channel_data:1, // required for participants_data to work
  10. // msto.participants and msto.ws_channels will be defined in either case so we don't need to handle cases where some users enable this and some don't
  11. AutoReconnect:false,
  12. // the following options attributes
  13. url:'wss://' + window.location.hostname +`/djc_srv/ws/chat/${room_name}`,
  14. url: `${ws_protocol}//${location.hostname}:5000/echo_c1${location.search}`,
  15. socket_name:"ws1",
  16. ord:glob_u.cb.ws,
  17. methods:{
  18. onmessage:fns.onmessage,
  19. onclose:fns.onclose,
  20. onerror:fns.onerror,
  21. onopen:fns.onopen,
  22. },
  23. fns:{
  24. },
  25. }
  26. var socket = window.glob_u.fns.connect_ws(o)
  27. // clog({socket})
  28. }
  29. // window.dev_flag = 1
  30. function set_rldi_int(){
  31. window?.rldi?.setint?.(400)
  32. }
  33. addEventListener("load",set_rldi_int)
  34. jsyncdb_init_helper()
  35. // window?.rldi?.setint?.(400)
  36. // window.rldi.setint(400)
  37. // clog("????")