// ==UserScript== // @name GLB Fantasy Football Score // @namespace pbr // @include http://goallineblitz.com/game/game.pl?game_id=* // @exclude http://goallineblitz.com/game/game.pl?game_id=*mode=pbp // @version 09.12.14 // @description sdfsd // @downloadURL https://update.greasyfork.icu/scripts/1446/GLB%20Fantasy%20Football%20Score.user.js // @updateURL https://update.greasyfork.icu/scripts/1446/GLB%20Fantasy%20Football%20Score.meta.js // ==/UserScript== /* * * writen by pabst 3/1/09 * */ window.setTimeout( function() { fantasyScoreMain(); } , 2000); function Passing() { this.completion = 0; this.attempt = 0; this.yards = 1; this.yardMin = 30; this.touchdown = 6; this.interception = -3; this.hurry = 0; this.sack = 0; this.sackYards = 0; this.sackMin = 0; } function Rushing() { this.attempt = 0; this.yards = 1; this.yardMin = 10; this.touchdown = 6; this.fumble = -1; this.fumbleLost = -1; this.brtk = 0.25; this.tfl = -1; } function Receiving() { this.reception = 0; this.yards = 1; this.yardMin = 20; this.yac = 0; this.yacMin = 0; this.touchdown = 6; this.fumble = -1; this.fumbleLost = -1; this.drop = -1; } function Kicking() { this.fgm = 2; this.fga = -1; this.fg19 = 2; this.fg29 = 2; this.fg39 = 2; this.fg49 = 3; this.fg50 = 4; this.xpm = 2; this.xpa = -1; } function Punting() { this.punt = 0; this.yards = 1; this.yardMin = 40; } function Returning() { this.kr = 0; this.kyards = 1; this.kyardMin = 30; this.ktouchdown = 6; this.pr = 0; this.pyards = 1; this.pyardMin = 20; this.ptouchdown = 6; } function Special() { this.tk = 1; this.mstk = -1; this.ffum = 2; this.fumr = 2; this.td = 6; this.pancakes = 0; this.pancakeMin = 5; this.brtk = 0; this.fum = -1; this.fuml = -1; } function OffensiveLine() { this.pancakes = 1; this.pancakeMin = 3; } function Defense() { this.pancakes = 0; this.pancakeMin = 3; this.tk = 1; this.mstk = -1; this.sack = 2; this.syards = 1; this.syardMin = 10; this.hry = 1; this.tfl = 1; this.ffum = 2; this.fumr = 2; this.pd = 1; this.inter = 3; this.iyards = 1; this.iyardMin = 20; this.td = 6; } var farr = new Array(); farr.push([1,calculatePassing]); farr.push([2,calculatePassing]); farr.push([3,calculateRushing]); farr.push([4,calculateRushing]); farr.push([5,calculateReceiving]); farr.push([6,calculateReceiving]); farr.push([7,calculateKicking]); farr.push([8,calculateKicking]); farr.push([9,calculatePunting]); farr.push([10,calculatePunting]); farr.push([11,calculateReturning]); farr.push([12,calculateReturning]); farr.push([13,calculateSpecial]); farr.push([14,calculateSpecial]); farr.push([15,calculateOffensiveLine]); farr.push([16,calculateOffensiveLine]); farr.push([17,calculateDefense]); farr.push([18,calculateDefense]); function fantasyScoreMain() { var t = document.getElementById("fd-table-1"); if (t == null) { console.log("fd-table-1 doesn't exist, waiting ..."); setTimeout(function() { fantasyScoreMain(); }, 2000); return; } var totals = [0,0]; for (var i=0; i 0) { value = parseInt(stat/min) * score; } return value; } function calculatePassing(table) { var p = new Passing(); insertColumn(table); var tr = table.getElementsByTagName("tr"); for (var i=0; i