User:Inquisitor Sasha/blockUser.js

/*

BLOCK USER BUTTON

AUTHOR: Inquisitor Ehrenstein CONTRIBUTORS: DESCRIPTION: Adds a button to the userbar links at the top for blocking a specific user. It can be repeated for blocking multiple users, but this will quickly fill up the userbar, particularly on small monitors.

DOCUMENTATION: To use this script, copy it and set the user variable below to the name of the user you want to have easy block access to. It should only be the name of the user, without the User: prefix.



var user = 'NAME OF USER';

/* - */

var buRef = document.getElementById('pt-logout'); var buParent = buRef.parentNode; var buNewLink = document.createElement('li'); buNewLink.id = 'block-user-link'; buNewLink.innerHTML = 'Block '+ user +''; buParent.insertBefore(buNewLink, buRef);