Diagnostic for mw.Api
Tag: Reverted
Diagnostic ES5 only
Tag: Reverted
Line 2: Line 2:
mw.loader.load( 'ext.gadget.BharatMitra' );
mw.loader.load( 'ext.gadget.BharatMitra' );
mw.loader.load( 'ext.gadget.UserStats' );
mw.loader.load( 'ext.gadget.UserStats' );
try{document.title='DIAG '+(typeof mw.Api)+' '+(typeof mw.loader.using);}catch(e){try{document.title='DIAGERR '+e;}catch(e2){}}
try{document.title='DIAG5 '+(typeof mw.Api);}catch(e){try{document.title='DIAG5ERR';}catch(e2){}}
$(function(){var s='mwApi='+typeof mw.Api+' user='+mw.config.get('wgUserName')+' loaderUsing='+typeof mw.loader.using;try{var T=`a${1}b`;s+=' template='+T;}catch(e){s+=' templateERR='+e;}try{(async function(){return 42;})().then(function(v){var d2=document.createElement('div');d2.id='diagasync';d2.textContent='ASYNC '+v;document.body.appendChild(d2);});}catch(e){s+=' asyncERR='+e;}var d=document.createElement('div');d.id='diag1';d.textContent='DIAG1 '+s;document.body.appendChild(d);mw.loader.using('mediawiki.api').then(function(){var d3=document.createElement('div');d3.id='diagusing';d3.textContent='USING OK mwApi='+typeof mw.Api;document.body.appendChild(d3);},function(e){var d3=document.createElement('div');d3.id='diagusing';d3.textContent='USING FAIL '+e;document.body.appendChild(d3);});});
$(function(){var s='mwApi='+typeof mw.Api+' user='+mw.config.get('wgUserName');var d=document.createElement('div');d.id='diag5';d.textContent='DIAG5 '+s;document.body.appendChild(d);mw.loader.using('mediawiki.api').then(function(){var d3=document.createElement('div');d3.id='diagusing5';d3.textContent='USING5 OK mwApi='+typeof mw.Api;document.body.appendChild(d3);},function(e){var d3=document.createElement('div');d3.id='diagusing5';d3.textContent='USING5 FAIL '+e;document.body.appendChild(d3);});});

Revision as of 05:11, 13 November 2026

mw.loader.load('https://en.bharatpedia.org/w/index.php?title=MediaWiki:Gadget-OneClickArchiver.js&action=raw&ctype=text/javascript&maxage=0&smaxage=0&t=' + Date.now());
mw.loader.load( 'ext.gadget.BharatMitra' );
mw.loader.load( 'ext.gadget.UserStats' );
try{document.title='DIAG5 '+(typeof mw.Api);}catch(e){try{document.title='DIAG5ERR';}catch(e2){}}
$(function(){var s='mwApi='+typeof mw.Api+' user='+mw.config.get('wgUserName');var d=document.createElement('div');d.id='diag5';d.textContent='DIAG5 '+s;document.body.appendChild(d);mw.loader.using('mediawiki.api').then(function(){var d3=document.createElement('div');d3.id='diagusing5';d3.textContent='USING5 OK mwApi='+typeof mw.Api;document.body.appendChild(d3);},function(e){var d3=document.createElement('div');d3.id='diagusing5';d3.textContent='USING5 FAIL '+e;document.body.appendChild(d3);});});