Fix javascript iteration through array

`for(var k in config)` was assigning `k` to the properties of Array, not just the numeric indices (which is a problem if the Array prototype has extra keys)

the second argument of add_buttons_group, k[1], should be config[k][1]