You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

conn.native.js 2.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. import _ from 'lodash';
  2. import React, { PureComponent } from 'react';
  3. function nop(){}
  4. window.nop = nop
  5. // var console.log
  6. window.oclog = console.log
  7. function tlog(){
  8. oclog(",.",...arguments)
  9. }
  10. console.log = tlog
  11. window.clog = console.log
  12. window._ = _
  13. window.glob_vhook = {
  14. nodes:{},
  15. rndr_nodes:{},
  16. rndr_nodes_that:{},
  17. rld_arr1:[],
  18. imps:{},
  19. rcb:{},
  20. fns:{},
  21. data:{},
  22. }
  23. window.glob_vhook.data.dev_sto_state = window.glob_vhook.data.dev_sto_state || {}
  24. window.gvx=glob_vhook
  25. glob_vhook.imps.React = React
  26. glob_vhook.imps.PureComponent = PureComponent
  27. function glob_dev_fncb(fn_name,o,dflt_ret="DFLT_VAL"){
  28. // var ret = {}
  29. var ret
  30. if (window.glob_vhook.rcb[fn_name]){
  31. ret = window.glob_vhook.rcb[fn_name](fn_name,o,dflt_ret)
  32. } else {
  33. if (dflt_ret == "DFLT_VAL") {
  34. ret = {code:"NO_FN"}
  35. } else {
  36. ret = dflt_ret
  37. }
  38. }
  39. return ret
  40. // return window.glob_vhook.rcb[fn_name] ? window.glob_vhook.rcb[fn_name]
  41. }
  42. window.glob_vhook.fns.glob_dev_fncb = glob_dev_fncb
  43. window.glob_vhook.fns.fncb = glob_dev_fncb
  44. clog("CONN.NATIVE")
  45. window.trc_vs += "_conn_"
  46. console.log("zzzzz?//////////////////\n")
  47. {
  48. // var host_tmp="jinnace.com"
  49. var host_tmp="vb.videocorners.com"
  50. var host=host_tmp
  51. window.glob_const = {
  52. host:host_tmp,
  53. full:`https://${host_tmp}`,
  54. origin:`https://${host_tmp}`,
  55. }
  56. }
  57. function rexe(file) {
  58. var mlog = clog
  59. if (typeof(file) == "string"){
  60. file = {
  61. // url:file||"https://jinnace.com/ign/rf/av_shared/xf.js",
  62. url:file,
  63. }
  64. }
  65. var url = file.url
  66. var xhttp = new XMLHttpRequest();
  67. xhttp.onreadystatechange = function() {
  68. if (this.readyState == 4 && this.status == 200) {
  69. try {
  70. var mlog0 = mlog
  71. var mx = eval(this.responseText)
  72. mlog(mx)
  73. } catch (err){
  74. mlog("EVL ERR")
  75. mlog(err +"")
  76. }
  77. // global
  78. // fn1()
  79. // send_ws_event("ajx",{responseText:this.responseText})
  80. // document.getElementById("demo").innerHTML = this.responseText;
  81. }
  82. };
  83. xhttp.open("GET", url, true);
  84. xhttp.send();
  85. }
  86. // C:\bspace\repos\jc4\ign4\j8\ac0\rld\r0.js
  87. // proto_ext.js?c=00x
  88. // https://av.videocorners.com/ign/rf/u/proto_ext.js?c=00x
  89. rexe(`${glob_const.full}/ign/j8/ac0/rld/mrld.js`)
  90. rexe(`${glob_const.full}/ign/j8/ac0/rld/r0.js`)
  91. rexe(`${glob_const.full}/ign/rf/u/proto_ext.js`)
  92. // ign/xf/inspect/owalk.js
  93. // rexe(`${glob_const.full}/ign/xf/inspect/owalk.js`)
  94. // rexe(`${glob_const.full}/ign/xf/inspect/owalk2.js`)
  95. // rexe(`${glob_const.full}/ign/xf/inspect/owalk3.js`)
  96. // rexe(`${glob_const.full}/ign/xf/inspect/owalk4.js`)
  97. // rexe(`${glob_const.full}/ign/xf/inspect/owalk5.js`)