<commit_before>$(document).ready(function () {

    var myURLParams = BTCUtils.getQueryStringArgs();
    console.log(myURLParams);


    var tx = myURLParams['tx'];
    var currency = myURLParams['currency'];
    var url = '';
    if (tx.length < 63)
    {
    	url = "Address.html?addr=" + tx;
    	window.location = url;
    	return;
    }


    //Ajax call so I can see transactionType from JSON
    url = '/tx/' + tx + '.json';
    $.ajax({
	url: url,
	type: 'get',
	success: function (data) {
	    //successfull callback, forward user to original_url
	    //  window.location = url;
	    var url = "";

	    var response = data;
	    console.log(response);
	    console.log(response[0].transactionType);
	    var transactionType = response[0].transactionType;
	    var method = response[0].method;
	    if ((method == 'basic') || (transactionType == '00000000')) {
		//it is simplesend
		url += "simplesend.html?tx=";
	    }
	    else if (transactionType == '00000014') {
		//it is a sell offer
		url += "selloffer.html?tx=";
	    }
	    else if (transactionType == '00000016') {
		//it is a sell accept
		url += "sellaccept.html?tx=";
	    }
	    else {
		//no transactionType - it is btc payment.
		url += "btcpayment.html?tx=";<commit_msg>search support for bitcoin payment tx<commit_after>$(document).ready(function () {

    var myURLParams = BTCUtils.getQueryStringArgs();
    console.log(myURLParams);


    var tx = myURLParams['tx'];
    var currency = myURLParams['currency'];
    var url = '';
    if (tx.length < 63)
    {
    	url = "Address.html?addr=" + tx;
    	window.location = url;
    	return;
    }


    //Ajax call so I can see transactionType from JSON
    url = '/tx/' + tx + '.json';
    $.ajax({
	url: url,
	type: 'get',
	success: function (data) {
	    //successfull callback, forward user to original_url
	    //  window.location = url;
	    var url = "";

	    var response = data;
	    console.log(response);
	    console.log(response[0].transactionType);
	    var transactionType = response[0].transactionType;
	    var method = response[0].method;
	    var invalid = response[0].invalid;
	    var invalid_str = invalid.toString();
	    if (invalid_str == 'true,bitcoin payment') {
                //if is bitcoin payment
		url += "btcpayment.html?tx=";
            }
	    else if ((method == 'basic') || (transactionType == '00000000')) {
		//it is simplesend
		url += "simplesend.html?tx=";
	    }
	    else if (transactionType == '00000014') {
		//it is a sell offer
		url += "selloffer.html?tx=";
	    }
	    else if (transactionType == '00000016') {
		//it is a sell accept
		url += "sellaccept.html?tx=";
{'fraction_non_alphanumeric': 0.15149225538345296, 'fraction_numerical': 0.022289384208537967, 'mean_word_length': 2.6323731138545954, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, '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': '457546', 'n_tokens_mistral': 942, 'n_tokens_neox': 829, 'n_words': 222}