function updateSubs() {
    if (sub_unconf) {
        connection.send("{\"op\":\"unconfirmed_sub\"}");
        $("#subbut_unconf").css({"text-decoration": "underline"});
    }
    else {
        $("#subbut_unconf").css({"text-decoration": "none"});
    }

    if (sub_blocks) {
        connection.send("{\"op\":\"blocks_sub\"}");
        $("#subbut_blocks").css({"text-decoration": "underline"});
    }
    else {
        $("#subbut_blocks").css({"text-decoration": "none"});
    }

    if (sub_addresses.length > 0) {
        for (var i = 0; i < sub_addresses.length; i++) {
            connection.send("{\"op\":\"addr_sub\", \"addr\":\"" + sub_addresses[i] + "\"}");
        }
        $("#subbut_address").text("Address (" + sub_addresses.length + ")");
        $("#subbut_address").css({"text-decoration": "underline"});
        
    }
    else {
        $("#subbut_address").text("Address");
        $("#subbut_address").css({"text-decoration": "none"});
    }



    printSubbedAddr();

}
// Send the subscriptions if nescessary and update the buttons
Send the subscriptions if nescessary and update the buttons
Send the subscriptions if nescessary and update the buttons
function updateSubs() {
    if (sub_unconf) {
        connection.send("{\"op\":\"unconfirmed_sub\"}");
        $("#subbut_unconf").css({"text-decoration": "underline"});
    }
    else {
        $("#subbut_unconf").css({"text-decoration": "none"});
    }
    if (sub_blocks) {
        connection.send("{\"op\":\"blocks_sub\"}");
        $("#subbut_blocks").css({"text-decoration": "underline"});
    }
    else {
        $("#subbut_blocks").css({"text-decoration": "none"});
    }
    if (sub_addresses.length > 0) {
        for (var i = 0; i < sub_addresses.length; i++) {
            connection.send("{\"op\":\"addr_sub\", \"addr\":\"" + sub_addresses[i] + "\"}");
        }
        $("#subbut_address").text("Address (" + sub_addresses.length + ")");
        $("#subbut_address").css({"text-decoration": "underline"});
    }
    else {
        $("#subbut_address").text("Address");
        $("#subbut_address").css({"text-decoration": "none"});
    }
    printSubbedAddr();
}
function updateSubs ( ) { if ( sub_unconf ) { connection . send ( "{\"op\":\"unconfirmed_sub\"}" ) ; $ ( "#subbut_unconf" ) . css ( { "text-decoration" : "underline" } ) ; } else { $ ( "#subbut_unconf" ) . css ( { "text-decoration" : "none" } ) ; } if ( sub_blocks ) { connection . send ( "{\"op\":\"blocks_sub\"}" ) ; $ ( "#subbut_blocks" ) . css ( { "text-decoration" : "underline" } ) ; } else { $ ( "#subbut_blocks" ) . css ( { "text-decoration" : "none" } ) ; } if ( sub_addresses . length > 0 ) { for ( var i = 0 ; i < sub_addresses . length ; i ++ ) { connection . send ( "{\"op\":\"addr_sub\", \"addr\":\"" + sub_addresses [ i ] + "\"}" ) ; } $ ( "#subbut_address" ) . text ( "Address (" + sub_addresses . length + ")" ) ; $ ( "#subbut_address" ) . css ( { "text-decoration" : "underline" } ) ; } else { $ ( "#subbut_address" ) . text ( "Address" ) ; $ ( "#subbut_address" ) . css ( { "text-decoration" : "none" } ) ; } printSubbedAddr ( ) ; }
Send the subscriptions if nescessary and update the buttons
Send the subscriptions if nescessary and update the buttons