Changed javascript hack for chrome.
#10: Added JS tests for Chrome and Firefox.