function init (callback) {
  // Initialize plugins.
  const plugins = getOrderedPlugins(defaultPluginDirectory, defaultHomePlugin)
  let homePluginView
  // Load each plugin element into the UI
  for (let i = 0; i < plugins.size; i++) {
    const plugin = (() => {
      if (getPluginName(plugins.get(i)) === 'Logs') {
        return loadPlugin(plugins.get(i), true, 'Ctrl+Shift+L')
      }
      return loadPlugin(plugins.get(i))
    })()

    if (getPluginName(plugins.get(i)) === defaultHomePlugin) {
      homePluginView = plugin
    }
  }
  const onHomeLoad = () => {
    setCurrentPlugin(defaultHomePlugin)
    homePluginView.removeEventListener('dom-ready', onHomeLoad)
    callback()
  }
  // wait for the home plugin to load before calling back
  homePluginView.addEventListener('dom-ready', onHomeLoad)
}
// Wait for siad to load, then load the plugin system.
Wait for siad to load, then load the plugin system.
Wait for siad to load then load the plugin system .
function init (callback) {
  const plugins = getOrderedPlugins(defaultPluginDirectory, defaultHomePlugin)
  let homePluginView
  for (let i = 0; i < plugins.size; i++) {
    const plugin = (() => {
      if (getPluginName(plugins.get(i)) === 'Logs') {
        return loadPlugin(plugins.get(i), true, 'Ctrl+Shift+L')
      }
      return loadPlugin(plugins.get(i))
    })()
    if (getPluginName(plugins.get(i)) === defaultHomePlugin) {
      homePluginView = plugin
    }
  }
  const onHomeLoad = () => {
    setCurrentPlugin(defaultHomePlugin)
    homePluginView.removeEventListener('dom-ready', onHomeLoad)
    callback()
  }
  homePluginView.addEventListener('dom-ready', onHomeLoad)
}
function init ( callback ) { const plugins = getOrderedPlugins ( defaultPluginDirectory , defaultHomePlugin ) let homePluginView for ( let i = 0 ; i < plugins . size ; i ++ ) { const plugin = ( ( ) => { if ( getPluginName ( plugins . get ( i ) ) === 'Logs' ) { return loadPlugin ( plugins . get ( i ) , true , 'Ctrl+Shift+L' ) } return loadPlugin ( plugins . get ( i ) ) } ) ( ) if ( getPluginName ( plugins . get ( i ) ) === defaultHomePlugin ) { homePluginView = plugin } } const onHomeLoad = ( ) => { setCurrentPlugin ( defaultHomePlugin ) homePluginView . removeEventListener ( 'dom-ready' , onHomeLoad ) callback ( ) } homePluginView . addEventListener ( 'dom-ready' , onHomeLoad ) }
Wait for siad to load, then load the plugin system.
Wait for siad to load then load the plugin system .
// Initialize plugins. // Load each plugin element into the UI // wait for the home plugin to load before calling back