
mw54finest
|
Highlight your player name text in pbp | Code: | Also try this one by SNAITF
http://userscripts.org/scripts/show/29176
This one does the names automatically. No modifying the scripts!
|
by sants
make a new user script, fill out the shit and make it only included in http://goallineblitz.com/game/game.pl?game_id=*&mode=pbp*
----
//leave the crap at the top that will be right here
| Code: |
// ==UserScript==
// @name Highlight player name text
// @namespace http://goallineblitz.com
// @include http://goallineblitz.com/game/game.pl?game_id=*&mode=pbp*
// ==/UserScript==
(function() {
const COLOR_MAP = {
"player name here": {"background": "lightblue"}, //leave the quotation marks in, USE LOWERCASE
"player name here": {"background": "yellow"}, //delete this line if you want only 1 player highlighted, copy it directly below if you want more
};
function highlightText() {
var allTextNodes = document.evaluate('//text()', document, null,
XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,
null);
for (var i = 0; i < allTextNodes.snapshotLength; i++) {
var ele = allTextNodes.snapshotItem(i);
for (var key in COLOR_MAP) {
if (ele.nodeValue.toLowerCase().indexOf(key) != -1) {
var span = document.createElement("span");
ele.parentNode.replaceChild(span, ele);
span.appendChild(ele);
for (var css in COLOR_MAP[key]) {
span.style[css] = COLOR_MAP[key][css];
}
}
}
}
}
highlightText();
})();
|
---
feel free to delete the line with the 2nd player if you just want one player, or add another line like the others to get more than 2 players. you can change the colors too. i think light blue looks the best
for QB's - add 'pass' after your QB's name if you don't want every pitch and handoff showing up.
|
mw54finest
|
Also try this one by SNAITF
http://userscripts.org/scripts/show/29176
This one does the names automatically. No modifying the scripts!
|
m1k3
|
need to have one that highlights as you go play by play, currently it only highlights after listing all the plays
|
sants
|
tweak SNAITF's script to include | Code: | | http://goallineblitz.com/game/game.pl?game_id=*&mode=pbp* | instead of what he has, and it will work in both.
|
|
|
|