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

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