MediaWiki:Gadget-I18n-js.js: Difference between revisions

From Tardis Wiki, the free Doctor Who reference
m
remove stripComments' `mw.log`s per discord convo + fix that linter warning
(minor code review)
m (remove stripComments' `mw.log`s per discord convo + fix that linter warning)
Line 24: Line 24:
*/
*/


;(function (window, $, mw, undefined) {
(function (window, $, mw, undefined) {
     'use strict';
     'use strict';


Line 648: Line 648:
     */
     */
     function stripComments(json) {
     function stripComments(json) {
         mw.log('[I18n-js] Raw i18n.json:', json);
         json = json
 
            .trim()
        json = json.trim()
             .replace(/\/\*[\s\S]*?\*\//g, '');
             .replace(/\/\*[\s\S]*?\*\//g, '');
        mw.log('[I18n-js] Comment-stripped i18n.json:', json);
         return json;
         return json;
     }
     }
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.