Fixes to make it work with Tampermonkey+Chrome