src/js/hearthdrafter.js
//filters list for proprerty rarirty when card selection changes
filters list for proprerty rarirty when card selection changes
filters list for proprerty rarirty when card selection changes
function filterList() {
    if (rarity == 'none') {
        return;
    }
    var newItems = [];
    for (i = 0; i < userList.items.length; i++) {
        var objr =  userList.items[i];
        var obj = objr['_values'];
        var add = 1;
        if (rarity != 'unknown') {
            if (rarity == 'basic' || rarity == 'free' || rarity == 'common') {
                if (obj.rarity != 'basic' && obj.rarity != 'free' && obj.rarity != 'common' ) {
                    add = 0;
                }
            } else if (obj.rarity != rarity) {
                add = 0;
            }
        }
        for(j = 0; j < selected.length; j++) {
            if (selected[j] != null && obj.name == selected[j]) {
                add = 0;
            }
        }
        if (add) {
            newItems.push(objr);
        }
    }
    userList.items = newItems;
}
function filterList ( ) { if ( rarity == 'none' ) { return ; } var newItems = [ ] ; for ( i = 0 ; i < userList . items . length ; i ++ ) { var objr = userList . items [ i ] ; var obj = objr [ '_values' ] ; var add = 1 ; if ( rarity != 'unknown' ) { if ( rarity == 'basic' || rarity == 'free' || rarity == 'common' ) { if ( obj . rarity != 'basic' && obj . rarity != 'free' && obj . rarity != 'common' ) { add = 0 ; } } else if ( obj . rarity != rarity ) { add = 0 ; } } for ( j = 0 ; j < selected . length ; j ++ ) { if ( selected [ j ] != null && obj . name == selected [ j ] ) { add = 0 ; } } if ( add ) { newItems . push ( objr ) ; } } userList . items = newItems ; }
filters list for proprerty rarirty when card selection changes
filters list for proprerty rarirty when card selection changes