Temporary one-shot check for the Sandbox menu item
Tags: Reverted Mobile edit Mobile web edit Advanced mobile edit
Remove the temporary check
Tags: Manual revert Mobile edit Mobile web edit Advanced mobile edit
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' );
/* BP-DIAG-START */
$(function(){setTimeout(function(){
var info=[];
var sb=document.getElementById('pt-sandbox');
info.push('skin='+mw.config.get('skin'));
info.push('sandbox in page: '+(sb?'yes':'no'));
if(sb){info.push('visible: '+(sb.offsetParent!==null));}
if(!sb){
try{
var href=mw.util.getUrl('Special:MyPage/sandbox');
var li=mw.util.addPortletLink('p-personal',href,'Sandbox','pt-sandbox','Your personal sandbox',null,'#pt-preferences');
info.push('force add: '+(li?'ok':'returned nothing'));
if(li){li.classList.add('user-links-collapsible-item');var a=li.querySelector('a');if(a){var sp=document.createElement('span');sp.className='bp-sandbox-icon';sp.style.cssText='display:inline-block;width:20px;height:20px;vertical-align:text-bottom;margin-right:6px';sp.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="20" height="20" aria-hidden="true"><path fill="currentColor" d="M16 2v2h-1v3.243a8 8 0 0 0 .736 3.352l4.281 9.276A1.5 1.5 0 0 1 18.655 22H5.344a1.5 1.5 0 0 1-1.362-2.129l4.281-9.276A8 8 0 0 0 9 7.243V4H8V2zm-2.613 8.001h-2.776q-.156.545-.374 1.071l-.158.362L6.124 20h11.75l-3.954-8.566A10 10 0 0 1 13.387 10M11 7.243q0 .38-.028.758h2.057a10 10 0 0 1-.02-.364L13 7.243V4h-2z"/></svg>';a.insertBefore(sp,a.firstChild);}}
}catch(e){info.push('force error: '+e.message);}
}
var ids=[];var lis=document.querySelectorAll('#p-personal li');for(var i=0;i<lis.length;i++){ids.push(lis[i].id||'(no id)');}
info.push('menu items: '+ids.join(', '));
var box=document.createElement('div');
box.style.cssText='position:fixed;top:60px;left:10px;z-index:99999;background:#ffffff;border:2px solid #333333;padding:10px;font-size:14px;color:#000000;max-width:90%';
box.textContent='BP check: '+info.join(' | ');
document.body.appendChild(box);
},2500);});
/* BP-DIAG-END */

Revision as of 17:42, 17 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' );