declare var editor ; if ( editor ) { editor . once ( "assets:load" , function ( ) { window . setTimeout ( function ( ) { const app = editor . call ( "viewport:app" ) ; const item = editor . call ( "assets:findOne" , function ( asset ) { return ( asset . get ( "type" ) === "script" && asset . get ( "name" ) === "uranus-editor-sdk.js" ) ; } ) ; if ( ! item ) return ; const asset = app . assets . get ( item [ 1 ] . get ( "id" ) ) ; if ( asset ) { const localUrl = asset . getFileUrl ( ) ; fetch ( localUrl ) . then ( async ( response ) => { const code = await response . text ( ) ; console . log ( "Uranus.Extension injecting editor loader" ) ; const script = document . createElement ( "script" ) ; script . innerHTML = code ; document . head . appendChild ( script ) ; } ) ; } } , 100 ) ; } ) ; }