User:KathrynLybarger/modern.js

importScript('User:Lupin/popups.js'); importScript('User:Lupin/recent2.js'); importScript('User:JackSchmidt/JS Ajax.js'); importScript('User:JackSchmidt/JS Watchlist.js'); importScript('User:JackSchmidt/JS CatWatch.js'); importScript('User:JackSchmidt/JS_UserWatch.js'); importScript('User:JackSchmidt/blofeld.js'); importScript('User:JackSchmidt/JS_ShowHiddenCats.js');

popupFixDabs=true;

addOnloadHook( function {   mw.util.addPortletLink('p-cactions',"javascript:JS_CatWatch.AddThemAll", "CatWatch", "ca-catwatch", "Add 'Watch By Category' buttons"); JS_UserWatch.MakeButton("KathrynLybarger","kat");  JS_UserWatch.MakeButton("Michael_Slone","mps");  JS_UserWatch.MakeButton("JackSchmidt","jack");

//timeOfLastEdit; });

// End snippet

/* function editsPastDay { var today = new Date; today.setDate(today.getDate-1); var pretty = dayFormat(today, true) + 'T' + timeFormat(today, true) + 'Z'; JS_PHP(   "api.php",    { action:"query", list:"usercontribs", ucprop:"flags", ucuser:wgUserName, format:"yaml", ucstart:pretty, uclimit:100, ucdir:"newer" },    "Get",    function(id,txt) { try {        var matches = txt.match(/minor:/g); JS_Dump(matches.length);      } catch(e) { }    }  ) }

function timeOfLastEdit { JS_PHP(   "api.php",    { action:"query", list:"usercontribs", ucuser:wgUserName, format:"yaml", uclimit:1, ucprop:"timestamp" },    "hmm",    function(id,txt) { try {      JS_Dump( txt.substr(txt.indexOf("timestamp:") + 11, 20) );     } catch(e) { }    }  ) }

//function slackFactor {

//}

function alertCount(user) { JS_PHP(   "api.php",    { action:"query", list:"allusers", aulimit:1, auprop:"editcount", aufrom:user, format:"json" },    user + "Get",    function(id,txt) { try {        JS_Dump(JS_UserWatch.EditCountFromContribCounterText(txt));      } catch(e) { }    }  ) }

function JS_Dump( txt ) { var dg; dg = document.getElementById( "dumping_ground" ); if( !dg ) { dg = document.createElement( "div" ); dg.id = "dumping_ground"; document.getElementsByTagName("body")[0].appendChild( dg ); } var pre = document.createElement( "pre" ); pre.appendChild( document.createTextNode( txt ) ); dg.appendChild( pre ); }