Temporary diagnostic probe
Tag: Reverted
Update diagnostic probe
Tag: Reverted
Line 1: Line 1:
/* BM probe - temporary */
/* BM probe 2 - temporary */
$( function () {
$( function () {
var box = document.createElement( 'div' );
var box = document.createElement( 'div' );
box.id = 'bm-probe';
box.id = 'bm-probe';
box.setAttribute( 'style', 'position:fixed;top:0;left:0;z-index:99999;background:#fff;color:#000;border:2px solid red;padding:6px;font-size:12px;max-width:90%;' );
box.setAttribute( 'style', 'position:fixed;top:0;left:0;z-index:99999;background:#fff;color:#000;border:2px solid red;padding:6px;font-size:12px;max-width:95%;' );
box.textContent = 'probe...';
box.textContent = 'probe2 chalu...';
document.body.appendChild( box );
document.body.appendChild( box );
var firstMenu = null, n = 0;
function st( m ) { try { return mw.loader.getState( m ); } catch ( e ) { return 'err'; } }
var t = setInterval( function () {
var before = 'twinkle=' + st( 'ext.gadget.Twinkle' ) + ' | userstats=' + st( 'ext.gadget.UserStats' ) + ' | bm=' + st( 'ext.gadget.BharatMitra' ) + ' | bmobj=' + ( typeof window.BharatMitra );
n++;
box.textContent = before + ' | load koshish...';
var menu = document.querySelector( '.bpneo-title-actions .bpneo-action-menu' );
mw.loader.using( [ 'ext.gadget.BharatMitra' ] ).then( function () {
if ( menu && !firstMenu ) { firstMenu = menu; }
setTimeout( function () {
var lines = [];
box.textContent = before + ' | LOAD SAFAL | bmobj=' + ( typeof window.BharatMitra ) + ' | item=' + !!document.getElementById( 'ca-bharatmitra' );
lines.push( 'skin=' + mw.config.get( 'wgSkin' ) );
}, 1500 );
lines.push( 'BMobj=' + ( typeof window.BharatMitra ) );
}, function ( e ) {
try { lines.push( 'state=' + mw.loader.getState( 'ext.gadget.BharatMitra' ) ); } catch ( e ) { lines.push( 'state=?' ); }
box.textContent = before + ' | LOAD FAIL: ' + ( e && e.message ? e.message : e );
lines.push( 'menu=' + !!menu );
} );
lines.push( 'menuStable=' + ( menu ? ( menu === firstMenu ) : 'n/a' ) );
lines.push( 'item=' + !!document.getElementById( 'ca-bharatmitra' ) );
lines.push( 'tick=' + n );
box.textContent = lines.join( ' | ' );
if ( n >= 20 ) { clearInterval( t ); }
}, 500 );
} );
} );

Revision as of 10:50, 1 November 2026

/* BM probe 2 - temporary */
$( function () {
	var box = document.createElement( 'div' );
	box.id = 'bm-probe';
	box.setAttribute( 'style', 'position:fixed;top:0;left:0;z-index:99999;background:#fff;color:#000;border:2px solid red;padding:6px;font-size:12px;max-width:95%;' );
	box.textContent = 'probe2 chalu...';
	document.body.appendChild( box );
	function st( m ) { try { return mw.loader.getState( m ); } catch ( e ) { return 'err'; } }
	var before = 'twinkle=' + st( 'ext.gadget.Twinkle' ) + ' | userstats=' + st( 'ext.gadget.UserStats' ) + ' | bm=' + st( 'ext.gadget.BharatMitra' ) + ' | bmobj=' + ( typeof window.BharatMitra );
	box.textContent = before + ' | load koshish...';
	mw.loader.using( [ 'ext.gadget.BharatMitra' ] ).then( function () {
		setTimeout( function () {
			box.textContent = before + ' | LOAD SAFAL | bmobj=' + ( typeof window.BharatMitra ) + ' | item=' + !!document.getElementById( 'ca-bharatmitra' );
		}, 1500 );
	}, function ( e ) {
		box.textContent = before + ' | LOAD FAIL: ' + ( e && e.message ? e.message : e );
	} );
} );
Explore
Main page Explore Bharatpedia Random article Discover something new Categories Browse topics and subjects Recent changes See what's changing
Useful
Preferences
Language
Appearance
Font size
Accessibility
Help
Not logged in

You are not logged in. Edits from this browser are recorded under your IP address.

Log in or create an account to get credit for future edits and access more features.

Not logged in
Please sign up or log in to edit Bharatpedia.
Create account