   s += if isDarkTheme then ' dark' else ' light'
 
 
-# Global data resolver
-proxy.addListener 'game.on.request', (method, path, body) ->
+handleProxyGameOnRequest = (method, path, body) ->
   # Important! Clone a copy of proxy objects!
   body = JSON.parse body
   event = new CustomEvent 'game.request',

    catch err
      console.error err
  locked = false
proxy.addListener 'game.on.response', (method, path, body, postBody) ->
  # Important! Clone a copy of proxy objects!
  responses.push [method, path, JSON.parse(body), JSON.parse(postBody)]
  resolveResponses() if !locked
proxy.addListener 'game.start', ->
  window.dispatchEvent new Event 'game.start'
proxy.addListener 'game.payitem', ->
  window.dispatchEvent new Event 'game.payitem'
proxy.addListener 'network.error.retry', (counter) ->
  event = new CustomEvent 'network.error.retry',
    bubbles: true
    cancelable: true
    detail:
      counter: counter
  window.dispatchEvent event
proxy.addListener 'network.invalid.code', (code) ->
  event = new CustomEvent 'network.invalid.code',
    bubbles: true
    cancelable: true
    detail:
      code: code
  window.dispatchEvent event
proxy.addListener 'network.error', ->
  window.dispatchEvent new Event 'network.error'

      path: path
      body: body
  window.dispatchEvent event

# Global data resolver
proxy.addListener 'game.on.request', handleProxyGameOnRequest

start2Version = 0
initStart2Value = ->
