Update overlay.js

In Firefox prevents a:
"TypeError: Not enough arguments to CustomEvent.initCustomEvent."

This error doesn't allow the overlay to be shown again.