User:Dr Brains/monobook.js

addOnloadHook(function{

// Get several preferences and compare them with $.compareObject if ( $.compareObject( mw.user.options.get( ['usebetatoolbar'] ), { usebetatoolbar: 0 } ) ) { // User's preferences match the object alert('avec barre améliorée'); } else { // User's preferences don't match the given set alert('sans barre améliorée'); }

/* var options = mw.user.options.values.usebetatoolbar; //prompt("options", explose(options)); //alert(mw.user.options.get( [''] ) function explose(A){    var Text = "{"    for(var index in A){       if(!A[index]){           Text += "";           continue;       }       if(typeof(A[index]) === "function") continue;       Text += index + " : " + ( typeof(A[index]) === "string" || typeof(A[index]) === "number" ? A.toString : explose(A[index]) ) + ","   }    Text += "}";    return Text  } });

/*

{cols : [object Object],date : [object Object],editfont : [object Object],editondblclick : [object Object],editsection : [object Object],enotifusertalkpages : [object Object],fancysig : [object Object],gender : [object Object],imagesize : [object Object],previewontop : [object Object],rcdays : [object Object],rclimit : [object Object],rememberpassword : [object Object],rows : [object Object],searchlimit : [object Object],showjumplinks : [object Object],shownumberswatching : [object Object],showtoc : [object Object],showtoolbar : [object Object],skin : [object Object],thumbsize : [object Object],underline : [object Object],watchcreations : [object Object],watchlistdays : [object Object],wllimit : [object Object],useeditwarning : [object Object],flaggedrevssimpleui : [object Object],flaggedrevseditdiffs : {},vector-simplesearch : [object Object],vector-collapsiblenav : [object Object],usebetatoolbar : [object Object],lqtdisplaydepth : [object Object],lqtdisplaycount : [object Object],lqtcustomsignatures : {},lqt-watch-threads : {},wikilove-enabled : [object Object],translate-editlangs : [object Object],translate-jsedit : [object Object],echo-notify-show-link : {},echo-subscriptions-email-system : {},echo-subscriptions-web-system : {},echo-subscriptions-web-other : {},echo-subscriptions-email-edit-user-talk : {},echo-subscriptions-web-edit-user-talk : {},echo-subscriptions-web-reverted : {},echo-subscriptions-web-mention : {},echo-subscriptions-web-edit-thank : {},uls-preferences : [object Object],variant : [object Object],language : [object Object],searchNs0 : {},searchNs12 : {},searchNs100 : {},searchNs102 : {},gadget-site : [object Object],gadget-externalsearch : [object Object],gadget-collapsibleTables : [object Object],gadget-Edittools : [object Object],gadget-WmfProjectStatusHelper : [object Object],nickname : [object Object],timecorrection : [object Object],watchlisttoken : [object Object],}