                     exception: exception
             xhr = new XMLHttpRequest()
             xhr.open 'POST', 'activity', true
-            xhr.setRequestHeader "Content-Type", "application/json;charset=UTF-8"
+            xhr.setRequestHeader "Content-Type",
+                "application/json;charset=UTF-8"
             xhr.send JSON.stringify(data)
             window.lastError = exception

        window.cozyMails.setSetting 'plugins', window.settings.plugins

        # Init Web Intents
        IntentManager = require "./utils/intent_manager"
        window.intentManager = new IntentManager()
        window.intentManager.send 'nameSpace',
            type: 'ping'
            from: 'mails'
        .then (message) ->
            LayoutActionCreator.intentAvailability true
        , (error) ->
            console.error "Intents not available"
            LayoutActionCreator.intentAvailability false

        # Flux initialization (must be called at the begining)
        AccountStore  = require './stores/account_store'

        xhr.send JSON.stringify(data)
        window.lastError = exception

# Waits for the DOM to be ready
window.onload = ->

    try
        window.__DEV__ = window.location.hostname is 'localhost'

        initPerformances()

        # expose an API
        window.cozyMails = require './utils/api_utils'
