Amazing work, James and Galder!
Today I was bold, made it fully multilingual and generalized it so that it can be easily installed in any wiki (Wikimedia or not).
Some technical notes:
- I simplified the code considerably using the pre-built methods OO.ui.alert and OO.ui.confirm rather than those complicated (and unnecessary, in this case) OOUI classes. I hope you like it.
- I wrapped the code with an "OWID" object to keep it out of the global space and make sure the 'oojs-ui-windows' dependency is always loaded.
- The localized messages should probably be moved to their own JSON file and loaded from there, but I'm not sure about the best way to do that while keep it template gadgets centralized at MediaWiki.org, and possibly having the strings translated by
translatewiki.net. Perhaps we can set up a call to discuss some options?
PS, I enabled the template on the Spanish Wikipedia (see
https://es.wikipedia.org/wiki/Plantilla:OWID) but we're having some local trouble with template gadgets so it's not working right now. I should be able to fix it in the next few hours.