lib/twitch.gui.js
function popupNW13Login(params) {
	var url = core.REDIRECT_URL + 'oauth2/authorize?' + util.param(params);

  nw.Window.open(url, {
    title: 'Login with TwitchTV',
    width: WIDTH,
    height: HEIGHT,
    id: 'login',
    resizable: true
  }, function(login) {
		login.on('loaded', function() {
      var w = this.window;
      if (w.location.hostname == 'api.twitch.tv' && w.location.pathname == '/kraken/') {
        core.setSession(util.parseFragment(w.location.hash));

        auth.getStatus(function(err, status) {
          if (status.authenticated) {
            core.events.emit('auth.login', status);
          }
        });

        this.close();
      }
			else {
        this.show();
        this.focus();
			}
    });
	});
}
function popupNW13Login(params) {
	var url = core.REDIRECT_URL + 'oauth2/authorize?' + util.param(params);

  nw.Window.open(url, {
    title: 'Login with TwitchTV',
    width: WIDTH,
    height: HEIGHT,
    id: 'login',
    resizable: true
  }, function(login) {
		login.on('loaded', function() {
      var w = this.window;
      if (w.location.hostname == 'api.twitch.tv' && w.location.pathname == '/kraken/') {
        core.setSession(util.parseFragment(w.location.hash));

        auth.getStatus(function(err, status) {
          if (status.authenticated) {
            core.events.emit('auth.login', status);
          }
        });

        this.close();
      }
			else {
        this.show();
        this.focus();
			}
    });
	});
}
function popupNW13Login ( params ) { var url = core . REDIRECT_URL + 'oauth2/authorize?' + util . param ( params ) ; nw . Window . open ( url , { title : 'Login with TwitchTV' , width : WIDTH , height : HEIGHT , id : 'login' , resizable : true } , function ( login ) { login . on ( 'loaded' , function ( ) { var w = this . window ; if ( w . location . hostname == 'api.twitch.tv' && w . location . pathname == '/kraken/' ) { core . setSession ( util . parseFragment ( w . location . hash ) ) ; auth . getStatus ( function ( err , status ) { if ( status . authenticated ) { core . events . emit ( 'auth.login' , status ) ; } } ) ; this . close ( ) ; } else { this . show ( ) ; this . focus ( ) ; } } ) ; } ) ; }
Opens a login popup using NW.js's API version 0.13 or higher

**THIS IS EXPERIMENTAL AT THE MOMENT!**

@private
@method popupNW13Login
@param {Array|Object} params
Opens a login popup using NW . js s API version 0 . 13 or higher