added event argument to functions

forgot to add them before and the plugin wasn’t working in firefox at
all. turns out you need to pass the event parameter as an argument.