Javascript: inline object pusher