Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
mw.loader.load('/w/index.php?title=User:WikiDwarf/AntiVandal.js&action=raw&ctype=text/javascript');
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.Twinkle' );
mw.loader.load( 'ext.gadget.BharatMitra' );
mw.loader.load( 'ext.gadget.UserStats' );
/* TEMP DIAG XFDC - revert after test */
window.__xfdcErr=[];
window.addEventListener('error',function(e){window.__xfdcErr.push((e.message||'')+' @ '+(e.filename||''));});
function __xfdcReport(tag){
var o=[];
try{
o.push(tag);
o.push('wgPageName='+mw.config.get('wgPageName'));
o.push('wgNamespaceNumber='+mw.config.get('wgNamespaceNumber'));
o.push('wgArticleId='+mw.config.get('wgArticleId'));
o.push('wgUserGroups='+JSON.stringify(mw.config.get('wgUserGroups')));
o.push('wgDBname='+mw.config.get('wgDBname'));
o.push('skin='+mw.config.get('skin'));
o.push('state XFDcloser='+mw.loader.getState('ext.gadget.XFDcloser'));
o.push('state core='+mw.loader.getState('ext.gadget.XFDcloser-core'));
o.push('state morebits='+mw.loader.getState('ext.gadget.morebits'));
o.push('state oojs-ui-core='+mw.loader.getState('oojs-ui-core'));
o.push('state oojs-ui-windows='+mw.loader.getState('oojs-ui-windows'));
o.push('state icons-interactions='+mw.loader.getState('oojs-ui.styles.icons-interactions'));
o.push('state Twinkle='+mw.loader.getState('ext.gadget.Twinkle'));
o.push('p-cactions='+(document.getElementById('p-cactions')?'yes':'no'));
o.push('p-xfdc-prefs='+(document.getElementById('p-xfdc-prefs')?'yes':'no'));
o.push('xfdc-status='+document.querySelectorAll('.xfdc-status').length);
o.push('xfdc-status-text='+(document.querySelector('.xfdc-status')?document.querySelector('.xfdc-status').textContent:'-'));
o.push('h3mw='+document.querySelectorAll('.mw-heading.mw-heading3').length+' h3='+document.querySelectorAll('h3').length);
o.push('editsection='+document.querySelectorAll('.mw-editsection a').length);
o.push('Morebits='+(window.Morebits?'yes':'no'));
o.push('errors='+window.__xfdcErr.join(' | '));
}catch(e){o.push('DIAGERR '+e.message);}
var d=document.createElement('div'); d.id='xfdc-diag-'+tag; d.style.cssText='position:fixed;top:0;left:0;z-index:99999;background:#fff;color:#000;border:4px solid red;padding:10px;max-width:95vw;white-space:pre-wrap;font-size:14px;'; d.textContent=o.join('\n'); document.body.appendChild(d);
}
setTimeout(function(){__xfdcReport('T1');},3000);
setTimeout(function(){try{mw.loader.load('ext.gadget.XFDcloser-core');}catch(e){} setTimeout(function(){__xfdcReport('T2-manual-core-load');},3000);},4000);
/* TEMP DIAG2 - loader logic replication */
(function(){
var o=[];
try{
var pn=mw.config.get('wgPageName');
var ns=mw.config.get('wgNamespaceNumber');
var aid=mw.config.get('wgArticleId');
var isNon=aid===0;
var isUnNs=[0,6,100].indexOf(ns)!==-1;
var isUn=isNon && isUnNs;
var actRe=/(?:\?|&)(?:action|diff|oldid)=/.test(window.location.href);
var xfdRe=/(Articles_for_deletion\/|Miscellany_for_deletion|(Categories|Files|Templates|Redirects)_for_discussion(?!\/(Working|Holding_cell|Speedy)))(?!\/\/?(?:Administrator_instructions|Common_outcomes)$)/;
var isXfd=xfdRe.test(pn);
o.push('DIAG2-at-commonjs-run');
o.push('pn='+pn+' ns='+ns+' aid='+aid);
o.push('isNon='+isNon+' isUnNs='+isUnNs+' isUn='+isUn+' actRe='+actRe+' isXfd='+isXfd+' shouldLoad='+(isXfd||isUn));
o.push('atRun state XFDcloser='+mw.loader.getState('ext.gadget.XFDcloser')+' core='+mw.loader.getState('ext.gadget.XFDcloser-core'));
o.push('userjs-xfdc='+mw.user.options.get('userjs-xfdc'));
}catch(e){o.push('DIAG2ERR '+e.message);}
var txt=o.join('\n');
setTimeout(function(){var d=document.createElement('div'); d.id='xfdc-diag-DIAG2'; d.style.cssText='position:fixed;top:220px;left:0;z-index:99998;background:#ff0;color:#000;border:4px solid blue;padding:10px;max-width:95vw;white-space:pre-wrap;font-size:14px;'; d.textContent=txt; document.body.appendChild(d);},800);
})();
/* TEMP DIAG3 - loader trace reader + extraction test */
setTimeout(function(){
var o=[];
try{
o.push('DIAG3');
o.push('loaderTrace='+JSON.stringify(window.__xfdcLoaderTrace||null));
o.push('ddPlain='+document.querySelectorAll('dd > span.plainlinks.nourlexpansion').length);
o.push('ddPlainNth2='+document.querySelectorAll('dd > span.plainlinks.nourlexpansion:nth-of-type(2)').length);
o.push('dtPlain='+document.querySelectorAll('dt > span.plainlinks.nourlexpansion').length);
o.push('ddCount='+document.querySelectorAll('dd').length+' dtCount='+document.querySelectorAll('dt').length);
var h3s=document.querySelectorAll('h3'); o.push('h3count='+h3s.length);
if(h3s.length){var sib=[]; var n=h3s[0].nextSibling; while(n && sib.length<12){ if(n.nodeType===1) sib.push(n.tagName+'.'+(n.className||'')); n=n.nextSibling; } o.push('sibsAfterH3='+sib.join(' | '));}
}catch(e){o.push('DIAG3ERR '+e.message);}
var d=document.createElement('div'); d.id='xfdc-diag-DIAG3'; d.style.cssText='position:fixed;top:440px;left:0;z-index:99997;background:#cfc;color:#000;border:4px solid green;padding:10px;max-width:95vw;white-space:pre-wrap;font-size:14px;'; d.textContent=o.join('\n'); document.body.appendChild(d);
},1500);