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('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' );
/* TEMP-VERIFY-DCF ES5: read-only verification of the tab fix via mw.Api */
(function(){
if(window.__dcfVerify){return;}window.__dcfVerify=true;
var R={};
var api=null;
var OLD="\t\t\t\t', failed: ' + stats.failed + '. The wanted list is cached by the wiki, so fixed pages can stay listed there for some time.';";
var NEWL="\t\t\t\t\t', failed: ' + stats.failed + '. The wanted list is cached by the wiki, so fixed pages can stay listed there for some time.';";
function out(o){try{var d=document.createElement('div');d.id='dcf-verify-fix';d.textContent='VERIFYFIX '+JSON.stringify(o);document.body.appendChild(d);}catch(e){}}
function countLines(t,n){var L=t.split('\n');var c=0;for(var i=0;i<L.length;i++){if(L[i]===n){c++;}}return c;}
function leadingTabs(s){var n=0;while(n<s.length&&s.charAt(n)==='\t'){n++;}return n;}
function pget(p){var d=$.Deferred();api.get(p).then(function(data){d.resolve({ok:true,d:data});},function(c,data){d.resolve({ok:false,code:String(c),d:data});});return d.promise();}
function getText(t){var d=$.Deferred();pget({action:'query',prop:'revisions',titles:t,rvprop:'ids|content',rvslots:'main',formatversion:2}).then(function(r){if(!r.ok){d.resolve({ok:false,code:r.code});return;}var pg=(r.d.query&&r.d.query.pages)||[];var p0=pg[0]||{};var rev=p0.revisions&&p0.revisions[0];if(!rev){d.resolve({ok:false,code:'norev'});return;}var txt=(rev.slots&&rev.slots.main&&rev.slots.main.content)||rev.content||'';d.resolve({ok:true,text:txt,revid:rev.revid});});return d.promise();}
function getRev(id){var d=$.Deferred();pget({action:'query',prop:'revisions',revids:id,rvprop:'ids|content',rvslots:'main',formatversion:2}).then(function(r){if(!r.ok){d.resolve({ok:false,code:r.code});return;}var pg=(r.d.query&&r.d.query.pages)||[];var p0=pg[0]||{};var rev=p0.revisions&&p0.revisions[0];if(!rev){d.resolve({ok:false,code:'norev'});return;}var txt=(rev.slots&&rev.slots.main&&rev.slots.main.content)||rev.content||'';d.resolve({ok:true,text:txt,revid:rev.revid});});return d.promise();}
$(function(){mw.loader.using('mediawiki.api').then(function(){api=new mw.Api();getText('MediaWiki:Gadget-DoubleCatFixer.js').then(function(g){if(!g.ok){out({ok:false,error:'cur-'+g.code});return;}R.curLen=g.text.length;R.curRevid=g.revid;R.countOld=countLines(g.text,OLD);R.countNew=countLines(g.text,NEWL);var lines=g.text.split('\n');R.totalLines=lines.length;R.line221=lines[220]||'';R.line221LeadingTabs=leadingTabs(lines[220]||'');R.line221IsNew=(lines[220]===NEWL);getRev(751679).then(function(o){if(!o.ok){out({ok:false,error:'oldrev-'+o.code});return;}R.oldLen=o.text.length;R.oldRevid=o.revid;R.lenPlusOne=(g.text.length===o.text.length+1);R.restUnchanged=(g.text.replace(NEWL,OLD)===o.text);var ol=o.text.split('\n');var otherSame=true;for(var i=0;i<lines.length;i++){if(i!==220&&lines[i]!==ol[i]){otherSame=false;}}R.otherLinesSame=otherSame;R.ok=true;out(R);});});},function(e){out({ok:false,error:'using-fail '+e});});});
})();