Skip to content

Instantly share code, notes, and snippets.

@shu8
Last active August 29, 2015 14:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shu8/c727e0cc3d5bff23b51f to your computer and use it in GitHub Desktop.
Save shu8/c727e0cc3d5bff23b51f to your computer and use it in GitHub Desktop.
Converts the divs on the privileges page of every SE site into anchors to make them real links
// ==UserScript==
// @name SE privileges linkifier
// @namespace http://stackexchange.com/users/4337810/
// @version 1.0
// @description Converts the divs on the privileges page of every SE site into anchors to make them
// @author ᔕᖺᘎᕊ (http://stackexchange.com/users/4337810/)
// @match *://*.stackexchange.com/help/privileges
// @match *://*.stackoverflow.com/help/privileges
// @match *://*.superuser.com/help/privileges
// @match *://*.serverfault.com/help/privileges
// @match *://*.askubuntu.com/help/privileges
// @match *://*.stackapps.com/help/privileges
// @match *://*.mathoverflow.net/help/privileges
// @grant none
// ==/UserScript==
$('.privilege-table-row').each(function() {
var url = $(this).data('href'),
classes = $(this).attr('class');
$(this).replaceWith("<a data-href='#' style='color:black; display:inline-block;' class='"+classes+"' href='"+url+"'>" + this.innerHTML + "</a>");
});
@shu8
Copy link
Author

shu8 commented Aug 10, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment