User Pass
Home Sign Up Contact Log In
Forum > Goal Line Blitz > Greasemonkey Scripts > Greasemonkey Scripts (original thread)
Page:
 
morid
offline
Link
 
any ideas on why i get Addon not found for Greasemonkey?
 
Link
 
Originally posted by morid
any ideas on why i get Addon not found for Greasemonkey?


I noticed that too when trying to find a link for it for someone else just now. It has to be temporary and/or related to the new release of firefox. I would just give it a little time.
 
Link
 
Ok, all the greasemonkey links and addons are back and working. Nothing to see here.
 
tciss
offline
Link
 
Anyone want to watch the game without clicking the "Next Play" button? How about with a first down marker?

If so here you go: http://userscripts.org/users/56355/scripts
 
Gazeruth
offline
Link
 
Originally posted by tciss
Anyone want to watch the game without clicking the "Next Play" button? How about with a first down marker?

If so here you go: http://userscripts.org/users/56355/scripts


Wow, that is brilliant, someone give that man a medal!
 
Gazeruth
offline
Link
 
After using this, it does make the replay a little bit jumpy, but it's still quite good for watching a game without having to click Next Play, and I love the first down marker
 
tciss
offline
Link
 
Originally posted by Gazeruth
After using this, it does make the replay a little bit jumpy, but it's still quite good for watching a game without having to click Next Play, and I love the first down marker


Mine is perfectly stable, but I am running really low res so I have to scroll the screen down in the code.

if you remove the first line "window.scroll(0,100);" from the script then it should fix your problem.
 
Gazeruth
offline
Link
 
Originally posted by tciss
Originally posted by Gazeruth

After using this, it does make the replay a little bit jumpy, but it's still quite good for watching a game without having to click Next Play, and I love the first down marker


Mine is perfectly stable, but I am running really low res so I have to scroll the screen down in the code.

if you remove the first line "window.scroll(0,100);" from the script then it should fix your problem.


Much better!

Thanks!
 
Cronus6
offline
Link
 
Cool script tciss. A lot of people have been asking for something like this.

What would need to be removed to only have the first down marker?
 
tciss
offline
Link
 
Originally posted by Cronus6
Cool script tciss. A lot of people have been asking for something like this.

What would need to be removed to only have the first down marker?


just remove this section

unsafeWindow.nextFrame = function (){
unsafeWindow.currentFrame++;
if (unsafeWindow.currentFrame < unsafeWindow.play_data.length)
{
unsafeWindow.updateFrame();
}
else
{
unsafeWindow.pause();
var Buttons = getElementsByClassName("tab",document);
var ButtonsCount = Buttons.length;
for(var i=0; i<ButtonsCount; i++)
{
var Button = Buttons;
var ButtonText = Button.innerHTML;
if(ButtonText.indexOf("Next Play")!=-1)
{
window.location.href = Buttons.firstChild.href;
}


}
}
}

I did not test this so let me know if it works
 
Sik Wit It
offline
Link
 
Originally posted by tciss
Originally posted by Cronus6

Cool script tciss. A lot of people have been asking for something like this.

What would need to be removed to only have the first down marker?


just remove this section

unsafeWindow.nextFrame = function (){
unsafeWindow.currentFrame++;
if (unsafeWindow.currentFrame < unsafeWindow.play_data.length)
{
unsafeWindow.updateFrame();
}
else
{
unsafeWindow.pause();
var Buttons = getElementsByClassName("tab",document);
var ButtonsCount = Buttons.length;
for(var i=0; i<ButtonsCount; i++)
{
var Button = Buttons;
var ButtonText = Button.innerHTML;
if(ButtonText.indexOf("Next Play")!=-1)
{
window.location.href = Buttons.firstChild.href;
}


}
}
}

I did not test this so let me know if it works


That stops it from going on to the next play automatically, but it also makes the first down line disappear for some reason
 
TuNice
offline
Link
 
Originally posted by sants
Originally posted by serialced

Originally posted by TuNice


script to highlight the text in which your players are in, while looking at the play by play list.


second this!
i dont want the one to check whether im in every play, just highlight my players name in the pbp page if he does anything (i assume thats also what TuNice is asking for)


i posted this like five pages back, but it's not listed on the main part yet. a couple of people have had problems with it that i'm still trying to figure out.

Originally posted by sants

Originally posted by Dravz


I have an idea for a new script:

When looking at play-by-plays of games, I wish there were a way to highlight plays where your player(s) are mentioned.

On the box score, your guys are highlighted blue, but to find my guys in the pbp I use ctrl-F and search on their name to see the plays they were involved in.

Be nice if the lines were somehow highlighted for faster skimming.


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


(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


edit: had to change one thing to make it work with the "watch" option.


lemme know if you need help.

for QB's - add 'pass' after your QB's name if you don't want every pitch and handoff showing up.


it didnt work for me at all. Could you post an example copy of one that works. I was a little confused on what to delete and what not.
 
Dingofol
offline
Link
 
Originally posted by tciss
Anyone want to watch the game without clicking the "Next Play" button? How about with a first down marker?

If so here you go: http://userscripts.org/users/56355/scripts


A perfect script! TYVM!!!

I have a question for all of you though?

How can I change some parameters in the scripts? Where can I alter the settings?
 
Gazeruth
offline
Link
 
Originally posted by Dingofol
Originally posted by tciss

Anyone want to watch the game without clicking the "Next Play" button? How about with a first down marker?

If so here you go: http://userscripts.org/users/56355/scripts


A perfect script! TYVM!!!

I have a question for all of you though?

How can I change some parameters in the scripts? Where can I alter the settings?


What parameters are you trying to change?

If you go to Tools -> Greasemonkey -> Manage User Scripts

Pick the script on the left you want to change and hit Edit

(It may ask you to choose which program to edit the script with.. pick whichever editor you use)

You can then tweak the script to customise it.
 
Cronus6
offline
Link
 
Originally posted by Sik Wit It
Originally posted by tciss

Originally posted by Cronus6


Cool script tciss. A lot of people have been asking for something like this.

What would need to be removed to only have the first down marker?


just remove this section



I did not test this so let me know if it works


That stops it from going on to the next play automatically, but it also makes the first down line disappear for some reason


You must have done something wrong because it worked great for me. Thanks tciss.

Should look like :

// ==UserScript==
// @name Replay
// @namespace http://userscripts.org/users/useridnumbe
// @include http://goallineblitz.com/game/replay.pl?pbp_id=*
// ==/UserScript==




window.scroll(0,100);
var play_container = document.getElementById("replay_area");
var dirt = getElementsByClassName("play",document);
var dir = dirt[0];
var dirText = dir.innerHTML;
var ytg = "";
if(dirText.indexOf(" inches ")!=-1)
{var ytg = '.3';}
else
{ if(dirText.indexOf(" G on ")!=-1)
{//later
}
else
{ var p2 = dirText.indexOf(" & ")+7;
var p1 = dirText.indexOf(" on ");
var ytg = dirText.substring(p2,p1);
}
}
var dy = parseFloat(ytg)*9;
if(parseFloat(unsafeWindow.play_data[unsafeWindow.currentFrame][1].y) > parseFloat(unsafeWindow.play_data[unsafeWindow.currentFrame][0].y))
{
var fp = parseFloat(unsafeWindow.play_data[unsafeWindow.currentFrame][0].y) * 3+12;
if(dirText.indexOf(" G on ")!=-1)
{//later
}
else
{
var ltg = (parseFloat(fp) + parseFloat(dy));
var div = unsafeWindow.document.createElement('div');
div.id = 'ds';
div.className = 'player_icon';
play_container.appendChild(div);
div.style.top = (ltg) + 'px';
div.style.width = '520px';
div.style.height = '2px';
div.style.backgroundColor = 'red';
}
}
else
{
var fp = parseFloat(unsafeWindow.play_data[unsafeWindow.currentFrame][0].y) * 3-18;
if(dirText.indexOf("G on ")!=-1)
{//later
}
else
{
var ltg = (parseFloat(fp) - parseFloat(dy));
var div = unsafeWindow.document.createElement('div');
div.id = 'ds';
div.className = 'player_icon';
play_container.appendChild(div);
div.style.top = (ltg) + 'px';
div.style.width = '520px';
div.style.height = '2px';
div.style.backgroundColor = 'red';
}
}


function getElementsByClassName(classname, par)
{
var a=[];
var re = new RegExp('\\b' + classname + '\\b');
var els = par.getElementsByTagName("*");
for(var i=0,j=els.length; i<j; i++)
{
if(re.test(els.className))
{a.push(els);}
}
return a;
};

 
Page:
 


You are not logged in. Please log in if you want to post a reply.