Have you looked at ve.init.mw.ViewPageTarget.prototype.maybeShowDialogs?