Discussion MediaWiki:Gadget-CommonEdit.js
Apparence
Dernier commentaire : il y a 15 ans par Seb35 dans le sujet Remove redundant check
Remove redundant check
Hi!
I think we can change "forcePreview" code from
if (wgUserName != null || wgAction != "edit") return;
to
if (wgUserName != null) return;
because MediaWiki:Common.js/edit.js is only loaded when edit a page. (Or this would cause a problem with "|| wgAction == 'submit'
" at MediaWiki:Common.js?)
Heldergeovane (d) 20 juillet 2009 à 14:11 (CEST)
- I'm not sure to understand: MediaWiki:Common.js/edit.js must be loaded both when the action is "edit" and "submit" (for instance the special caracters are loaded whenever during editing); but forcePreview must be loaded only the first time an editpage is loaded, else anonymous visitors couldn't never edit, isn't it? ~ Seb35 [^_^] 5 octobre 2009 à 19:40 (CEST)