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.7KB

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