This repository was archived by the owner on Mar 29, 2021. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3434 window . location . host === "web1.dawnofthedragons.com" ||
3535 window . location . host === "dotd-web1.5thplanetgames.com"
3636 ) {
37- window . idrinth = { } ;
38- window . idrinth . add = function ( data ) {
39- var s = document . createElement ( "script" ) ;
40- s . appendChild ( document . createTextNode ( data ) ) ;
41- document . getElementsByTagName ( "head" ) [ 0 ] . appendChild ( s ) ;
42- } ;
43- window . addEventListener (
44- "message" ,
45- function ( event ) {
46- try {
47- var data = JSON . parse ( event . data ) ;
48- if (
49- data . to !== "idotd" ||
50- ! window . idrinth . hasOwnProperty ( data . task ) ||
51- ! data . data
52- ) {
53- return ;
37+ var f = function ( ) {
38+ console . log ( "s" ) ;
39+ window . idrinth = { } ;
40+ window . idrinth . add = function ( data ) {
41+ var s = document . createElement ( "script" ) ;
42+ s . appendChild ( document . createTextNode ( data ) ) ;
43+ document . getElementsByTagName ( "head" ) [ 0 ] . appendChild ( s ) ;
44+ } ;
45+ window . addEventListener (
46+ "message" ,
47+ function ( event ) {
48+ try {
49+ var data = JSON . parse ( event . data ) ;
50+ if (
51+ ! data ||
52+ data . to !== "idotd" ||
53+ ! window . idrinth . hasOwnProperty ( data . task ) ||
54+ ! data . data
55+ ) {
56+ return ;
57+ }
58+ window . idrinth [ data . task ] ( data . data ) ;
59+ } catch ( e ) {
60+ //nothing
5461 }
55- window . idrinth [ data . task ] ( data . data ) ;
56- } catch ( e ) {
57- //nothing
58- }
59- } ,
60- false
61- ) ;
62+ } ,
63+ false
64+ ) ;
65+ } ;
66+ var sc = document . createElement ( "script" ) ;
67+ sc . setAttribute ( "id" , "idotd-loader" ) ;
68+ sc . appendChild ( document . createTextNode ( '(' + f . toString ( ) + '());' ) ) ;
69+ document . getElementsByTagName ( "head" ) [ 0 ] . appendChild ( sc ) ;
6270 return ;
6371 }
6472 var sc = document . createElement ( "script" ) ;
You can’t perform that action at this time.
0 commit comments