js: add default toggle

Signed-off-by: Micky Ching <mickyching@gmail.com>