I'm using the Userscripts Extension in Safari for reference. But the code should work in any browser. https://github.com/quoid/userscripts#readme