Updated bages JavaScript to use new wiki event syntax