mediawiki.confirmCloseWindow: Remove support for custom 'message'
Between 2015 and 2016, all major browsers removed support for this
due to abuse by pop-up ads and such. As such, we're invoking the
client-side wikitext message parser before the onbeforeunload event
can return, but not actually using its string anywhere except in IE11.
Remove this and let IE11 do the same native thing as all other
browsers have been doing regrardless. This is not a breaking change,
because any callers to confirmCloseWindow() passing a 'message' option
will still work and create the same behaviour as before. It just means
that in IE11 the "extra text" message is now ignored the same as it
was in other browsers already.
Browsers correctly understood that virtually the only legitimate use
of this feature was to remind users of unsaved changes, and their
default localised prompt reflects that understanding.
- Update callers to not bundle and pass down a custom message.
- Keep the message bundled with confirmCloseWindow.js for use in the trigger() method. This no longer supports the override, but it does still need a default localised string there since this method uses a prompt() which unlike 'onbeforeunload' has no default.
I have moved the message parsing down to that method to still remove its overhead from the most common code path.