browser javascript code