<commit_before>define( [ "ember" ], function( Ember ) {

	return Ember.Route.extend({
		init: function() {
			this._super();
			this.controllerFor( "versioncheck" ).check();
			this.controllerFor( "userAuth" ).validateToken();
			this.controllerFor( "notification" );
		},

		actions: {
			"history": function( action ) {
				window.history.go( +action );
			},

			"refresh": function() {
				var routeName = this.controller.get( "currentRouteName" );
				if ( routeName !== "error" ) {
					this.container.lookup( "route:" + routeName ).refresh();
				}
			},

			"goto": function() {
				this.transitionTo.apply( this, arguments );
			},

			"openBrowser": function( url ) {
				this.nwGui.Shell.openExternal( url );
			},

			"openLivestreamer": function( stream ) {
				this.controllerFor( "livestreamer" ).startStream( stream );
			},

			"openModal": function( template, controller, data ) {
				if ( typeof controller === "string" ) {
					controller = this.controllerFor( controller );
				}
				if ( controller && data instanceof Object ) {
					controller.setProperties( data );
				}

				this.render( template, {
					into      : "application",
					outlet    : "modal",
					view      : "modal",
					controller: controller
				});
			},
<commit_msg>Also refresh routes when using the goto action<commit_after>define( [ "ember" ], function( Ember ) {

	return Ember.Route.extend({
		init: function() {
			this._super();
			this.controllerFor( "versioncheck" ).check();
			this.controllerFor( "userAuth" ).validateToken();
			this.controllerFor( "notification" );
		},

		actions: {
			"history": function( action ) {
				window.history.go( +action );
			},

			"refresh": function() {
				var routeName = this.controller.get( "currentRouteName" );
				if ( routeName !== "error" ) {
					this.container.lookup( "route:" + routeName ).refresh();
				}
			},

			"goto": function( routeName ) {
				var currentRoute = this.controller.get( "currentRouteName" );
				if ( routeName === currentRoute ) {
					this.send( "refresh" );
				} else {
					this.transitionTo.apply( this, arguments );
				}
			},

			"openBrowser": function( url ) {
				this.nwGui.Shell.openExternal( url );
			},

			"openLivestreamer": function( stream ) {
				this.controllerFor( "livestreamer" ).startStream( stream );
			},

			"openModal": function( template, controller, data ) {
				if ( typeof controller === "string" ) {
					controller = this.controllerFor( controller );
				}
				if ( controller && data instanceof Object ) {
					controller.setProperties( data );
				}

				this.render( template, {
					into      : "application",
					outlet    : "modal",
					view      : "modal",
					controller: controller
				});
			},

{'fraction_non_alphanumeric': 0.15658232489915658, 'fraction_numerical': 0.0, 'mean_word_length': 2.880512091038407, 'pattern_counts': {'":': 12, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7229756', 'n_tokens_mistral': 1050, 'n_tokens_neox': 809, 'n_words': 182}