Race condition was optimized for Chrome and my PC but it should work on both Chrome and Firefox. Check out my all solutions:
run()
open()