<commit_before>/**
 * @depends {nrs.js}
 */
var NRS = (function(NRS, $, undefined) {
	NRS.normalVersion = {};
	NRS.betaVersion = {};
	NRS.isOutdated = false;

	NRS.checkAliasVersions = function() {
		if (NRS.downloadingBlockchain) {
			$("#nrs_update_explanation span").hide();
			$("#nrs_update_explanation_blockchain_sync").show();
			return;
		}
		if (NRS.isTestNet) {
			$("#nrs_update_explanation span").hide();
			$("#nrs_update_explanation_testnet").show();
			return;
		}

		//Get latest version nr+hash of normal version
		NRS.sendRequest("getAlias", {
			"aliasName": "nrsversion"
		}, function(response) {
			if (response.aliasURI && (response = response.aliasURI.split(" "))) {
				NRS.normalVersion.versionNr = response[0];
				NRS.normalVersion.hash = response[1];

				if (NRS.betaVersion.versionNr) {
					NRS.checkForNewVersion();
				}
			}
		});

		//Get latest version nr+hash of beta version
		NRS.sendRequest("getAlias", {
			"aliasName": "nrsbetaversion"
		}, function(response) {
			if (response.aliasURI && (response = response.aliasURI.split(" "))) {
				NRS.betaVersion.versionNr = response[0];
				NRS.betaVersion.hash = response[1];

				if (NRS.normalVersion.versionNr) {
					NRS.checkForNewVersion();
				}
			}
		});

		/*if (NRS.inApp) {
			//user uses an old version which does not supply the platform / version
			var noticeDate = new Date(2014, 9, 28);

			if (new Date() > noticeDate) {
				$("#secondary_dashboard_message").removeClass("alert-success").addClass("alert-danger").html("A new version of the NXT Wallet application is available for download <a href='http://nxt.org/get-started-nxt/download-nxt-software' target='_blank'>here</a>. You must install it manually due to changes in the NRS startup procedure.").show();
			}
		}*/
	}

	NRS.checkForNewVersion = function() {
		var installVersusNormal, installVersusBeta, normalVersusBeta;
<commit_msg>Updated to correctly check if it is an old app version or not<commit_after>/**
 * @depends {nrs.js}
 */
var NRS = (function(NRS, $, undefined) {
	NRS.normalVersion = {};
	NRS.betaVersion = {};
	NRS.isOutdated = false;

	NRS.checkAliasVersions = function() {
		if (NRS.downloadingBlockchain) {
			$("#nrs_update_explanation span").hide();
			$("#nrs_update_explanation_blockchain_sync").show();
			return;
		}
		if (NRS.isTestNet) {
			$("#nrs_update_explanation span").hide();
			$("#nrs_update_explanation_testnet").show();
			return;
		}

		//Get latest version nr+hash of normal version
		NRS.sendRequest("getAlias", {
			"aliasName": "nrsversion"
		}, function(response) {
			if (response.aliasURI && (response = response.aliasURI.split(" "))) {
				NRS.normalVersion.versionNr = response[0];
				NRS.normalVersion.hash = response[1];

				if (NRS.betaVersion.versionNr) {
					NRS.checkForNewVersion();
				}
			}
		});

		//Get latest version nr+hash of beta version
		NRS.sendRequest("getAlias", {
			"aliasName": "nrsbetaversion"
		}, function(response) {
			if (response.aliasURI && (response = response.aliasURI.split(" "))) {
				NRS.betaVersion.versionNr = response[0];
				NRS.betaVersion.hash = response[1];

				if (NRS.normalVersion.versionNr) {
					NRS.checkForNewVersion();
				}
			}
		});

		if (NRS.inApp) {
			//user uses an old version which does not supply the platform / version
			if (NRS.appPlatform != "" && NRS.appVersion != "" ) {
				$("#secondary_dashboard_message").removeClass("alert-success").addClass("alert-danger").html("A new version of the NXT Wallet application is available for download <a href='http://nxt.org/get-started-nxt/download-nxt-software' target='_blank'>here</a>. You must install it manually due to changes in the NRS startup procedure.").show();
			}
			/* Old code check
			var noticeDate = new Date(2014, 9, 28);

			if (new Date() > noticeDate) {
				$("#secondary_dashboard_message").removeClass("alert-success").addClass("alert-danger").html("A new version of the NXT Wallet application is available for download <a href='http://nxt.org/get-started-nxt/download-nxt-software' target='_blank'>here</a>. You must install it manually due to changes in the NRS startup procedure.").show();
			}*/
		}
	}

	NRS.checkForNewVersion = function() {
		var installVersusNormal, installVersusBeta, normalVersusBeta;

{'fraction_non_alphanumeric': 0.15391834819333647, 'fraction_numerical': 0.005161895823557016, 'mean_word_length': 3.9859649122807017, 'pattern_counts': {'":': 4, '<': 9, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6477476', 'n_tokens_mistral': 1603, 'n_tokens_neox': 1398, 'n_words': 300}