The wallet works with JavaScript by injecting a web3 item right into the web site page you get on. It is important to note that this does not change the site in any manner. Instead, it just adds a performance that makes it feasible to access the Ethereum system.