text: const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
  Cu.import('resource://gre/modules/Services.jsm');
  
  function loadIntoWindow(window) {
      try {
          window.require.setRequirePath("scope-servers/", "chrome://scope-servers/content/");
          var commando = window.require("commando/commando");
          commando.registerScope("scope-servers", {
              name: "Servers",
              description: "Navigate through your servers",
              icon: "koicon://ko-svg/chrome/fontawesome/skin/database.svg?size=16",
              handler: "scope-servers/servers"
          });
      } catch (e) {
          Cu.reportError("Commando: Exception while registering scope 'Remote Servers'");
          Cu.reportError(e);
      }
  }
  
  function unloadFromWindow(window) {
      if (!window) return;
      var commando = window.require("commando/commando");
      commando.unregisterScope("scope-servers");
  }
  
  /* Everything below this line is boilerplate and probably should not be touched */
  
  var startupData;
  var windowListener = {
      onOpenWindow: function(aWindow) {
          // Wait for the window to finish loading
          let domWindow = aWindow.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowInternal || Ci.nsIDOMWindow);
          domWindow.addEventListener("komodo-post-startup", function onLoad() {
              domWindow.removeEventListener("komodo-post-startup", onLoad, false);
              loadIntoWindow(domWindow);
          }, false);
      },
  
      onCloseWindow: function(aWindow) {},
      onWindowTitleChange: function(aWindow, aTitle) {}
  };
  
  function startup(data, reason) {
      startupData = data;
  
      // Load into any existing windows
      let windows = Services.wm.getEnumerator("Komodo");
      while (windows.hasMoreElements()) {
          let domWindow = windows.getNext().QueryInterface(Ci.nsIDOMWindow);
          loadIntoWindow(domWindow);
      }
  
      // Load into any new windows
      Services.wm.addListener(windowListener);
  }
  
  function shutdown(data, reason) {
      // When the application is shutting down we normally don't have to clean
      // up any UI changes made
      if (reason == APP_SHUTDOWN) return;
  
      // Stop listening for new windows
      Services.wm.removeListener(windowListener);
  
      // Unload from any existing windows
      let windows = Services.wm.getEnumerator("Komodo");
      while (windows.hasMoreElements()) {
          let domWindow = windows.getNext().QueryInterface(Ci.nsIDOMWindow);
          unloadFromWindow(domWindow);
      }
  }
  
  function install(data, reason) {}
  
  function uninstall(data, reason) {}
  