User:Vacation9/vector.js

/* Most of these are (shamelessly) copied from Addshore's script page (thaaank you :)) */ importScript("User:PleaseStand/segregate-refs.js"); importScript('User:AzaToth/twinkle.js'); importScript('User:Kangaroopower/MRollback.js'); //Mass Rollback Script User:Kangaroopower/MRollback.js importScript('User:Ais523/votesymbols.js'); importScript('Wikipedia:WikiProject User scripts/Scripts/CloseAFD.js'); importScript('User:Jnothman/afd_helper/script.js'); importScript('User:Mr.Z-man/closeAFD.js'); importScript('User:Voice of All/Approvals.js'); //for brfas importScript('User:Splarka/ajaxmassrollback.js'); //User:Splarka/ajaxmassrollback.js importScript("User:PleaseStand/highlight-comments.js"); // highlight my comments importScript('User:Mr.Z-man/closeAFD.js'); importScript('User:Howcheng/quickimgdelete.js'); importScript('User:Ais523/adminrights.js');          // Highlight admin names importScript('User:Ais523/editcount.js');            // Awesome contribs edit counter importScript('User:Gracenotes/amelvand.js');         // Quick revert in diffs importScript('User:Henrik/js/afc-helper.js');        // AFC helper importScript('User:Jnothman/afd_helper/script.js');  // AFD helper importScript('User:Magnus Manske/HighlightEditSections.js');       // Highlight section on edit link hover over importScript('User:Mr.Z-man/moverevert.js');         // Move Reverts (Revert moves) importScript('User:Mr.Z-man/patrollinks.js');        // Newpage patrol links in list importScript('User:Superm401/Compare link.js');      // Compare Button to link importScript('User:X!/userrights.js');               // Add link from toolbox to Userrights importScript('Wikipedia:WikiProject User scripts/Scripts/Replace');           // Adds a regex replace tab importScript('Wikipedia:WikiProject User scripts/Scripts/Formatter');         // The format tab importScript('User:Vacation9/userlinks.js');   // Watchlist since // Google and Yahoo toolbox search links var iwDisplayMode = 1 //User:Alex Smotrov/iwiki.js /* Sysop decrier/detector (rights group displayer), version [0.2.0a] Originally from http://en.wikipedia.org/wiki/User:Splarka/sysopdectector.js*/ var showUserGroupSettings = { 'IP':true, 'unregistered':true, 'registered':true, 'groups': true, 'editcount':true, 'regdate':true, 'blocked':true }; if((mw.config.get('wgNamespaceNumber') == 2 || mw.config.get('wgNamespaceNumber') == 3) && mw.config.get('wgTitle').indexOf('/') == -1 && (mw.config.get('wgAction') != 'edit' || mw.config.get('wgAction') != 'submit')) addOnloadHook(showUserGroups) function showUserGroups { var url = mw.config.get('wgServer') + mw.config.get('wgScriptPath') + '/api.php?action=query&format=json&callback=showUserGroupsCB&maxage=3600&smaxage=3600&usprop=blockinfo|groups|editcount|registration&list=users&ususers=' + encodeURIComponent(mw.config.get('wgTitle')); mw.loader.load(url); } function showUserGroupsCB(obj) { var show = window.showUserGroupSettings || false; if(!obj['query'] || !obj['query']['users']) return var user = obj['query']['users']; if(user.length == 0) return user = user[0]; var someHeading = document.getElementsByTagName('h1')[0] || document.getElementsByTagName('h2')[0] if(!someHeading) return var span = document.createElement('span'); var title = 'User:' + user['name'] + ' '; var text = ' '; if(user['invalid'] == '') { if(show && show.IP) text += '[IP] ' else title += '[invalid or IP username] ' } else if(user['missing'] == '') { if(show && show.unregistered) text += '[doesn\'t exist] ' else title += '[not a registered name] ' } else { if(show && show.registered) text += '[exists] ' else title += '[username registered] ' if(user['groups']) { if(show && show.groups || !show) text += '[' + user['groups'] + '] ' else title += '[' + user['groups'] + '] ' }   if(user['editcount']) { if(show && show.editcount) text += '[' + user['editcount'] + ' edits] ' else title += '[' + user['editcount'] + ' edits] ' }   if(user['registration']) { if(show && show.regdate) text += '[created: ' + user['registration'].split('T')[0] + '] ' else title += '[created: ' + user['registration'] + '] ' }   if(user['blockedby']) { if(show && show.blocked) text += '[blocked] ' else text += '[currently blocked] ' } }  span.setAttribute('class','detected-userrights'); span.appendChild(document.createTextNode(text)); someHeading.appendChild(span); someHeading.setAttribute('title',title); someHeading.className += ' detected-userrights-heading'; }