JavaScript plugin for event and property rule-based redirects