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

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