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

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