making events emit after userscript runs