Welcome to the Forum Archive!

Years of conversation fill a ton of digital pages, and we've kept all of it accessible to browse or copy over. Whether you're looking for reveal articles for older champions, or the first time that Rammus rolled into an "OK" thread, or anything in between, you can find it here. When you're finished, check out the boards to join in the latest League of Legends discussions.

GO TO BOARDS


Bookmarklet: Change enemy names to black (Colorblind Option)

Comment below rating threshold, click here to show it.

Velkorious

Senior Member

06-01-2011

I read a few threads about how colorblind users have difficulty distinguishing enemy and friendly players in the tribunal chat log, so I made a quick bookmarklet (http://en.wikipedia.org/wiki/Bookmarklet) that changes enemy names to black. Not the most convenient solution, but there's nothing else yet.


To Install the Bookmarklet

1. In your browser, make a new bookmark, name it anything
2. Copy this text into the address box:

Quote:
javascript:(function(){var colorName = "black"; var styleText = ".enemy {color:" + colorName + " !important;}";styleElement = document.createElement("style"styleElement.type = "text/css";if (styleElement.styleSheet) {styleElement.styleSheet.cssText = styleText;} else {styleElement.appendChild(document.createTextNode(styleText)); } document.getElementsByTagName("head&quot[0].appendChild(styleElement);})();

3. Save the bookmark
4. When you're viewing a tribunal case, click the bookmark. It scans the page for enemy names and changes their color to black.


Greasemonkey Version

Thanks to FrankWest for the original GreaseMonkey script, which I've updated. If you install the GreaseMonkey addon for your web browser and add this User Script, it will change the names automatically.

Quote:

// ==UserScript==
// @name enemy names in black
// @namespace http://
// @include http://na.leagueoflegends.com/tribunal/*
// @include http://euw.leagueoflegends.com/tribunal/*
// @include http://eune.leagueoflegends.com/tribunal/*
// @version 1
// ==/UserScript==
var colorName = "black";
var styleText = ".enemy {color:" + colorName + " !important;}";
styleElement = document.createElement("style"
styleElement.type = "text/css";
if (styleElement.styleSheet)
{
styleElement.styleSheet.cssText = styleText;
}
else
{
styleElement.appendChild(document.createTextNode( styleText));
}
document.getElementsByTagName("head&quot[0].appendChild(styleElement);




Tested in Firefox, Chrome, Safari, and Internet Explorer


EDIT: Fixed so that you don't have to reclick when viewing a different game.
EDIT2: If you want to change it to something other than black, just edit the bold part of either code. Most common colors should work fine (blue, orange, purple, etc). Just make sure you don't accidentally delete the quotation marks.
EDIT3: Updated for May 2012 tribunal changes


Comment below rating threshold, click here to show it.

FrankWest

Recruiter

06-01-2011

That's really clever!

I copied your code and made it into a GreaseMonkey script, so it can run automatically (in Firefox, with Greasemonkey installed.)
[code]// ==UserScript==
// @name EnemyNamesInBlack
// @namespace http://
// @include http://www.leagueoflegends.com/tribunal/case/*
// ==/UserScript==
var arr=document.getElementsByTagName("span"
for(var i=0;i< arr.length;i++)
if(arr[i].className==="chat_user enemy&quot
arr[i].style.color = "black";[/code]


Comment below rating threshold, click here to show it.

Velkorious

Senior Member

06-02-2011

Page 3 bump.


Comment below rating threshold, click here to show it.

Llwynn

Member

06-02-2011

XD I could use this just to keep things ordered without being colorblind. Thanks for this.


Comment below rating threshold, click here to show it.

Wonderbolts

Senior Member

06-06-2011

cool, this thread became a sticky


Comment below rating threshold, click here to show it.

tomtomkenobi

Senior Member

06-07-2011

*tear* I love this community


Comment below rating threshold, click here to show it.

Velkorious

Senior Member

06-07-2011

Oh wow a sticky! Thanks!


Comment below rating threshold, click here to show it.

sciyth

Senior Member

06-07-2011

nice job velkor. you are the customizing master


Comment below rating threshold, click here to show it.

Rebel Cardinal

Senior Member

06-07-2011

+1 Thoughtful OP.


Comment below rating threshold, click here to show it.

mpank

Senior Member

06-07-2011

Good to see that people care about comunity! +1