console.log("Play tracker initiated. Welcome.");

console.log("Type filter(help) to use the filter.");

console.log("NOTE: The number of outs given is the number of outs BEFORE the play occurred")

var a;

var b;

var c;

var d;

var e;

var f;

var g;

var h;

var j;

var k;

var l;

var m;

var n;

var o;

var p;

var q;

var r;

var s;

var t;

var u;

var v;

var w;

var x;

var y;

var z;

var filteredTeam = [];

var filteredTeamOff = [];

var filterStatus = true;

var myVar=setInterval(function () {playsTracker()}, 15000);

function filter(action) {

if (action === help) {

console.log("Type filter(add) to add a team to a filter, filter(remove) to remove a team, filter(on) to turn it on, filter(off) to turn it off, and filter(list) to list the filtered teams");

}

else if (action === add) {

if (filterStatus === true) {

var teamToAdd = prompt("Abbreviation of team (type list() for a list of abbreviations).");

toUpperCase(teamToAdd);

if (filteredTeam.indexOf(teamToAdd) === -1) {

filteredTeam.push(teamToAdd);

console.log("You have added " + teamToAdd + " to the filter");

}

else {

console.log("This team is already filtered!")

}

}

else {

console.log("The filter is off. Type filter(on) to turn it on.")

}

}

else if (action === remove) {

if (filterStatus === true) {

var teamToRemove = prompt("Abbreviation of team to remove (type list() for a list of abbreviations).");

toUpperCase(teamToRemove);

if (filteredTeam.indexOf(teamToRemove) === -1) {

console.log("This team is not being filtered. Please check spelling and try again.");

}

else {

var index = filteredTeam.indexOf(teamToRemove);

filteredTeam.splice(index, 1);

console.log(teamToRemove + " is no longer being filtered.");

};

}

else {

console.log("The filter is off. Type filter(on) to turn it on.")

}

}

else if (action === off) {

if (filteredTeam === [] && filterStatus === true) {

console.log("The filter is empty. Use filter(add).");

}

else if (filterStatus === false) {

console.log("The filter is already off!");

}

else {

filterStatus = false;

filteredTeamOff = filteredTeam;

filteredTeam = [];

console.log("The filter is off. Type filter(on) to turn it back on");

};

}

else if (action === on) {

if (filterStatus === true) {

console.log("The filter is already on! Type filter(list) for the list of filtered teams");

}

else {

filterStatus = true;

filteredTeam = filteredTeamOff;

filteredTeamOff = [];

console.log("The filter is on. Type filter(off) to turn it off.");

}

}

else if (action === list) {

if (filteredTeam === [] && filterStatus === true) {

console.log("No teams are being filtered.");

}

else if (filterStatus === false) {

console.log("The filter is off. The teams being filtered are: ");

for (i = 0; i < filteredTeamOff.length; i++) {

console.log(filteredTeamOff[i]);

};

}

else {

console.log("The teams being filtered are: ");

for (i = 0; i < filteredTeam.length; i++) {

console.log(filteredTeam[i]);

};

};

}

else {

console.log("Command not recognized. Type filter(help) for commands.");

};

};

function list() {

console.log("Please note the unusual abbreviations for the Los Angeles Angels of Anaheim and the Los Angeles Dodgers")

console.log("Arizona Diamondbacks = ARI");

console.log("Atlanta Braves = ATL");

console.log("Baltimore Orioles = BAL");

console.log("Boston Red Sox = BOS");

console.log("Chicago Cubs = CHC");

console.log("Chicago White Sox = CWS");

console.log("Cincinnati Reds = CIN");

console.log("Cleveland Indians = CLE");

console.log("Colorado Rockies = COL");

console.log("Detroit Tigers = DET");

console.log("Miami Marlins = MIA");

console.log("Houston Astros = HOU");

console.log("Kansas City Royals = KC");

console.log("Los Angeles Angels of Anaheim = ANA");

console.log("Los Angeles Dodgers = LA");

console.log("Milwaukee Brewers = MIL");

console.log("Minnesota Twins = MIN");

console.log("New York Mets = NYM");

console.log("New York Yankees = NYY");

console.log("Oakland Athletics = OAK");

console.log("Philadelphia Phillies = PHI");

console.log("Pittsburgh Pirates = PIT");

console.log("St. Louis Cardinals = STL");

console.log("San Diego Padres = SD");

console.log("San Francisco Giants = SF");

console.log("Seattle Mariners = SEA");

console.log("Tampa Bay Rays = TB");

console.log("Texas Rangers = TEX");

console.log("Toronto Blue Jays = TOR");

console.log("Washington Nationals = WSH");

};

function playsTracker() {

if (document.querySelectorAll("span.last-play-full").length === 0) {

;

}

else {

var liveGames = document.querySelectorAll("span.last-play-full").length

for (i = 1; i <= liveGames; i++) {

document.querySelector("span.last-play-full").className = "last-play-full" + i;

}

if (document.querySelector("span.last-play-full1") !== null) {

var A = document.querySelector("span.last-play-full1").textContent;

}

else {

a = undefined;

};

if (document.querySelector("span.last-play-full2") !== null) {

var B = document.querySelector("span.last-play-full2").textContent;

}

else {

b = undefined;

};

if (document.querySelector("span.last-play-full3") !== null) {

var C = document.querySelector("span.last-play-full3").textContent;

}

else {

c = undefined;

};

if (document.querySelector("span.last-play-full4") !== null) {

var D = document.querySelector("span.last-play-full4").textContent;

}

else {

d = undefined;

};

if (document.querySelector("span.last-play-full5") !== null) {

var E = document.querySelector("span.last-play-full5").textContent;

}

else {

e = undefined;

};

if (document.querySelector("span.last-play-full6") !== null) {

var F = document.querySelector("span.last-play-full6").textContent;

}

else {

f = undefined;

};

if (document.querySelector("span.last-play-full7") !== null) {

var G = document.querySelector("span.last-play-full7").textContent;

}

else {

g = undefined;

};

if (document.querySelector("span.last-play-full8") !== null) {

var H = document.querySelector("span.last-play-full8").textContent;

}

else {

h = undefined;

};

if (document.querySelector("span.last-play-full9") !== null) {

var J = document.querySelector("span.last-play-full9").textContent;

}

else {

j = undefined;

};

if (document.querySelector("span.last-play-full10") !== null) {

var K = document.querySelector("span.last-play-full10").textContent;

}

else {

k = undefined;

};

if (document.querySelector("span.last-play-full11") !== null) {

var L = document.querySelector("span.last-play-full11").textContent;

}

else {

l = undefined;

};

if (document.querySelector("span.last-play-full12") !== null) {

var M = document.querySelector("span.last-play-full12").textContent;

}

else {

m = undefined;

};

if (document.querySelector("span.last-play-full13") !== null) {

var N = document.querySelector("span.last-play-full13").textContent;

}

else {

n = undefined;

};

if (document.querySelector("span.last-play-full14") !== null) {

var O = document.querySelector("span.last-play-full14").textContent;

}

else {

o = undefined;

};

if (document.querySelector("span.last-play-full15") !== null) {

var P = document.querySelector("span.last-play-full15").textContent;

}

else {

p = undefined;

};

if (document.querySelector("span.last-play-full16") !== null) {

var Q = document.querySelector("span.last-play-full16").textContent;

}

else {

q = undefined;

};

if (document.querySelector("span.last-play-full17") !== null) {

var R = document.querySelector("span.last-play-full17").textContent;

}

else {

r = undefined;

};

if (document.querySelector("span.last-play-full18") !== null) {

var S = document.querySelector("span.last-play-full18").textContent;

}

else {

s = undefined;

};

if (document.querySelector("span.last-play-full19") !== null) {

var T = document.querySelector("span.last-play-full19").textContent;

}

else {

t = undefined;

};

if (document.querySelector("span.last-play-full20") !== null) {

var U = document.querySelector("span.last-play-full20").textContent;

}

else {

u = undefined;

};

if (document.querySelector("span.last-play-full21") !== null) {

var V = document.querySelector("span.last-play-full21").textContent;

}

else {

v = undefined;

};

if (document.querySelector("span.last-play-full22") !== null) {

var W = document.querySelector("span.last-play-full22").textContent;

}

else {

w = undefined;

};

if (document.querySelector("span.last-play-full23") !== null) {

var X = document.querySelector("span.last-play-full23").textContent;

}

else {

x = undefined;

};

if (document.querySelector("span.last-play-full24") !== null) {

var Y = document.querySelector("span.last-play-full24").textContent;

}

else {

y = undefined;

};

if (document.querySelector("span.last-play-full25") !== null) {

var Z = document.querySelector("span.last-play-full25").textContent;

}

else {

z = undefined;

};

if (A !== a) {

var aAway = document.querySelector("span.last-play-full1").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.classList[4].toUpperCase();

var aHome = document.querySelector("span.last-play-full1").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.classList[5].toUpperCase();

var aPitcher = document.querySelector("span.last-play-full1").parentElement.parentElement.parentElement.firstElementChild.firstElementChild.children[1].firstElementChild.textContent;

if (document.querySelector("span.last-play-full1").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.firstElementChild.className === "first-base runner ") {

if (document.querySelector("span.last-play-full1").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[1].className === "second-base runner ") {

if (document.querySelector("span.last-play-full1").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[2].className === "third-base runner ") {

var aBases = "Bases loaded.";

}

else {

var aBases = "Runners on first and second.";

};

}

else if (document.querySelector("span.last-play-full1").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[2].className === "third-base runner ") {

var aBases = "Runners on corners.";

}

else {

var aBases = "Runner on first.";

};

}

else if (document.querySelector("span.last-play-full1").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[1].className === "second-base runner ") {

if (document.querySelector("span.last-play-full1").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[2].className === "third-base runner ") {

var aBases = "Runners on second and third.";

}

else {

var aBases = "Runner on second.";

};

}

else if (document.querySelector("span.last-play-full1").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[2].className === "third-base runner ") {

var aBases = "Runner on third.";

}

else {

var aBases = "Bases empty.";

};

var aOuts = document.querySelector("span.last-play-full1").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.children[1].firstElementChild.children[2].textContent.substring(0,1);

var aInning = document.querySelector("span.last-play-full1").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[1].textContent;

var aAwayScore = document.querySelector("span.last-play-full1").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.children[1].children[11].children[2].textContent;

var aHomeScore = document.querySelector("span.last-play-full1").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.children[2].children[11].children[2].textContent;

if (filterStatus === true) {

if (filteredTeam.indexOf(aAway) !== -1 || filteredTeam.indexOf(aHome) !== -1) {

if (aAwayScore > aHomeScore) {

console.log(A + " " + aAway + " @ " + aHome + ", Pitcher: " + aPitcher + ". " + aBases + " " + aOuts + " out(s). " + aInning + ". " + aAway + " leads " + aAwayScore + "-" + aHomeScore);

}

else if (aHomeScore > aAwayScore) {

console.log(A + " " + aAway + " @ " + aHome + ", Pitcher: " + aPitcher + ". " + aBases + " " + aOuts + " out(s). " + aInning + ". " + aHome + " leads " + aHomeScore + "-" + aAwayScore);

}

else {

console.log(A + " " + aAway + " @ " + aHome + ", Pitcher: " + aPitcher + ". " + aBases + " " + aOuts + " out(s). " + aInning + ". " + "Game tied at " + aAwayScore);

};

};

}

else {

if (aAwayScore > aHomeScore) {

console.log(A + " " + aAway + " @ " + aHome + ", Pitcher: " + aPitcher + ". " + aBases + " " + aOuts + " out(s). " + aInning + ". " + aAway + " leads " + aAwayScore + "-" + aHomeScore);

}

else if (aHomeScore > aAwayScore) {

console.log(A + " " + aAway + " @ " + aHome + ", Pitcher: " + aPitcher + ". " + aBases + " " + aOuts + " out(s). " + aInning + ". " + aHome + " leads " + aHomeScore + "-" + aAwayScore);

}

else {

console.log(A + " " + aAway + " @ " + aHome + ", Pitcher: " + aPitcher + ". " + aBases + " " + aOuts + " out(s). " + aInning + ". " + "Game tied at " + aAwayScore);

};

};

a = A;

};

if (B !== b) {

var bAway = document.querySelector("span.last-play-full2").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.classList[4].toUpperCase();

var bHome = document.querySelector("span.last-play-full2").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.classList[5].toUpperCase();

var bPitcher = document.querySelector("span.last-play-full2").parentElement.parentElement.parentElement.firstElementChild.firstElementChild.children[1].firstElementChild.textContent;

if (document.querySelector("span.last-play-full2").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.firstElementChild.className === "first-base runner ") {

if (document.querySelector("span.last-play-full2").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[1].className === "second-base runner ") {

if (document.querySelector("span.last-play-full2").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[2].className === "third-base runner ") {

var bBases = "Bases loaded.";

}

else {

var bBases = "Runners on first and second.";

};

}

else if (document.querySelector("span.last-play-full2").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[2].className === "third-base runner ") {

var bBases = "Runners on corners.";

}

else {

var bBases = "Runner on first.";

};

}

else if (document.querySelector("span.last-play-full2").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[1].className === "second-base runner ") {

if (document.querySelector("span.last-play-full2").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[2].className === "third-base runner ") {

var bBases = "Runners on second and third.";

}

else {

var bBases = "Runner on second.";

};

}

else if (document.querySelector("span.last-play-full2").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[2].className === "third-base runner ") {

var bBases = "Runner on third.";

}

else {

var bBases = "Bases empty.";

};

var bOuts = document.querySelector("span.last-play-full2").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.children[1].firstElementChild.children[2].textContent.substring(0,1);

var bInning = document.querySelector("span.last-play-full2").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[1].textContent;

var bAwayScore = document.querySelector("span.last-play-full2").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.children[1].children[11].children[2].textContent;

var bHomeScore = document.querySelector("span.last-play-full2").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.children[2].children[11].children[2].textContent;

if (filterStatus === true) {

if (filteredTeam.indexOf(bAway) !== -1 || filteredTeam.indexOf(bHome) !== -1) {

if (bAwayScore > bHomeScore) {

console.log(B + " " + bAway + " @ " + bHome + ", Pitcher: " + aPitcher + ". " + bBases + " " + bOuts + " out(s). " + bInning + ". " + bAway + " leads " + bAwayScore + "-" + bHomeScore);

}

else if (bHomeScore > bAwayScore) {

console.log(B + " " + bAway + " @ " + bHome + ", Pitcher: " + aPitcher + ". " + bBases + " " + bOuts + " out(s). " + bInning + ". " + bHome + " leads " + bHomeScore + "-" + bAwayScore);

}

else {

console.log(B + " " + bAway + " @ " + bHome + ", Pitcher: " + aPitcher + ". " + bBases + " " + bOuts + " out(s). " + bInning + ". " + "Game tied at " + bAwayScore);

};

};

}

else {if (bAwayScore > bHomeScore) {

console.log(B + " " + bAway + " @ " + bHome + ", Pitcher: " + aPitcher + ". " + bBases + " " + bOuts + " out(s). " + bInning + ". " + bAway + " leads " + bAwayScore + "-" + bHomeScore);

}

else if (bHomeScore > bAwayScore) {

console.log(B + " " + bAway + " @ " + bHome + ", Pitcher: " + aPitcher + ". " + bBases + " " + bOuts + " out(s). " + bInning + ". " + bHome + " leads " + bHomeScore + "-" + bAwayScore);

}

else {

console.log(B + " " + bAway + " @ " + bHome + ", Pitcher: " + aPitcher + ". " + bBases + " " + bOuts + " out(s). " + bInning + ". " + "Game tied at " + bAwayScore);

};};

b = B;

};

if (C !== c) {

var cAway = document.querySelector("span.last-play-full3").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.classList[4].toUpperCase();

var cHome = document.querySelector("span.last-play-full3").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.classList[5].toUpperCase();

var cPitcher = document.querySelector("span.last-play-full3").parentElement.parentElement.parentElement.firstElementChild.firstElementChild.children[1].firstElementChild.textContent;

if (document.querySelector("span.last-play-full3").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.firstElementChild.className === "first-base runner ") {

if (document.querySelector("span.last-play-full3").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[1].className === "second-base runner ") {

if (document.querySelector("span.last-play-full3").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[2].className === "third-base runner ") {

var cBases = "Bases loaded.";

}

else {

var cBases = "Runners on first and second.";

};

}

else if (document.querySelector("span.last-play-full3").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[2].className === "third-base runner ") {

var cBases = "Runners on corners.";

}

else {

var cBases = "Runner on first.";

};

}

else if (document.querySelector("span.last-play-full3").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[1].className === "second-base runner ") {

if (document.querySelector("span.last-play-full3").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[2].className === "third-base runner ") {

var cBases = "Runners on second and third.";

}

else {

var cBases = "Runner on second.";

};

}

else if (document.querySelector("span.last-play-full3").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[2].className === "third-base runner ") {

var cBases = "Runner on third.";

}

else {

var cBases = "Bases empty.";

};

var cOuts = document.querySelector("span.last-play-full3").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.children[1].firstElementChild.children[2].textContent.substring(0,1);

var cInning = document.querySelector("span.last-play-full3").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[1].textContent;

var cAwayScore = document.querySelector("span.last-play-full3").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.children[1].children[11].children[2].textContent;

var cHomeScore = document.querySelector("span.last-play-full3").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.children[2].children[11].children[2].textContent;

if (filterStatus === true) {

if (filteredTeam.indexOf(cAway) !== -1 || filteredTeam.indexOf(cHome) !== -1) {

if (cAwayScore > cHomeScore) {

console.log(C + " " + cAway + " @ " + cHome + ", Pitcher: " + cPitcher + ". " + cBases + " " + cOuts + " out(s). " + cInning + ". " + cAway + " leads " + cAwayScore + "-" + cHomeScore);

}

else if (cHomeScore > cAwayScore) {

console.log(C + " " + cAway + " @ " + cHome + ", Pitcher: " + cPitcher + ". " + cBases + " " + cOuts + " out(s). " + cInning + ". " + cHome + " leads " + cHomeScore + "-" + cAwayScore);

}

else {

console.log(C + " " + cAway + " @ " + cHome + ", Pitcher: " + cPitcher + ". " + cBases + " " + cOuts + " out(s). " + cInning + ". " + "Game tied at " + cAwayScore);

};

};

}

else {if (cAwayScore > cHomeScore) {

console.log(C + " " + cAway + " @ " + cHome + ", Pitcher: " + cPitcher + ". " + cBases + " " + cOuts + " out(s). " + cInning + ". " + cAway + " leads " + cAwayScore + "-" + cHomeScore);

}

else if (cHomeScore > cAwayScore) {

console.log(C + " " + cAway + " @ " + cHome + ", Pitcher: " + cPitcher + ". " + cBases + " " + cOuts + " out(s). " + cInning + ". " + cHome + " leads " + cHomeScore + "-" + cAwayScore);

}

else {

console.log(C + " " + cAway + " @ " + cHome + ", Pitcher: " + cPitcher + ". " + cBases + " " + cOuts + " out(s). " + cInning + ". " + "Game tied at " + cAwayScore);

};};

c = C;

};

if (D !== d) {

var dAway = document.querySelector("span.last-play-full4").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.classList[4].toUpperCase();

var dHome = document.querySelector("span.last-play-full4").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.classList[5].toUpperCase();

var dPitcher = document.querySelector("span.last-play-full4").parentElement.parentElement.parentElement.firstElementChild.firstElementChild.children[1].firstElementChild.textContent;

if (document.querySelector("span.last-play-full4").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.firstElementChild.className === "first-base runner ") {

if (document.querySelector("span.last-play-full4").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[1].className === "second-base runner ") {

if (document.querySelector("span.last-play-full4").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[2].className === "third-base runner ") {

var dBases = "Bases loaded.";

}

else {

var dBases = "Runners on first and second.";

};

}

else if (document.querySelector("span.last-play-full4").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[2].className === "third-base runner ") {

var dBases = "Runners on corners.";

}

else {

var dBases = "Runner on first.";

};

}

else if (document.querySelector("span.last-play-full4").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[1].className === "second-base runner ") {

if (document.querySelector("span.last-play-full4").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[2].className === "third-base runner ") {

var dBases = "Runners on second and third.";

}

else {

var dBases = "Runner on second.";

};

}

else if (document.querySelector("span.last-play-full4").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[2].className === "third-base runner ") {

var dBases = "Runner on third.";

}

else {

var dBases = "Bases empty.";

};

var dOuts = document.querySelector("span.last-play-full4").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.children[1].firstElementChild.children[2].textContent.substring(0,1);

var dInning = document.querySelector("span.last-play-full4").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[1].textContent;

var dAwayScore = document.querySelector("span.last-play-full4").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.children[1].children[11].children[2].textContent;

var dHomeScore = document.querySelector("span.last-play-full4").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.children[2].children[11].children[2].textContent;

if (filterStatus === true) {

if (filteredTeam.indexOf(dAway) !== -1 || filteredTeam.indexOf(dHome) !== -1) {

if (dAwayScore > dHomeScore) {

console.log(D + " " + dAway + " @ " + dHome + ", Pitcher: " + dPitcher + ". " + dBases + " " + dOuts + " out(s). " + dInning + ". " + dAway + " leads " + dAwayScore + "-" + dHomeScore);

}

else if (dHomeScore > dAwayScore) {

console.log(D + " " + dAway + " @ " + dHome + ", Pitcher: " + dPitcher + ". " + dBases + " " + dOuts + " out(s). " + dInning + ". " + dHome + " leads " + dHomeScore + "-" + dAwayScore);

}

else {

console.log(D + " " + dAway + " @ " + dHome + ", Pitcher: " + dPitcher + ". " + dBases + " " + dOuts + " out(s). " + dInning + ". " + "Game tied at " + dAwayScore);

};

};

}

else {if (dAwayScore > dHomeScore) {

console.log(D + " " + dAway + " @ " + dHome + ", Pitcher: " + dPitcher + ". " + dBases + " " + dOuts + " out(s). " + dInning + ". " + dAway + " leads " + dAwayScore + "-" + dHomeScore);

}

else if (dHomeScore > dAwayScore) {

console.log(D + " " + dAway + " @ " + dHome + ", Pitcher: " + dPitcher + ". " + dBases + " " + dOuts + " out(s). " + dInning + ". " + dHome + " leads " + dHomeScore + "-" + dAwayScore);

}

else {

console.log(D + " " + dAway + " @ " + dHome + ", Pitcher: " + dPitcher + ". " + dBases + " " + dOuts + " out(s). " + dInning + ". " + "Game tied at " + dAwayScore);

};};

d = D;

};

if (E !== e) {

var eAway = document.querySelector("span.last-play-full5").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.classList[4].toUpperCase();

var eHome = document.querySelector("span.last-play-full5").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.classList[5].toUpperCase();

var ePitcher = document.querySelector("span.last-play-full5").parentElement.parentElement.parentElement.firstElementChild.firstElementChild.children[1].firstElementChild.textContent;

if (document.querySelector("span.last-play-full5").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.firstElementChild.className === "first-base runner ") {

if (document.querySelector("span.last-play-full5").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[1].className === "second-base runner ") {

if (document.querySelector("span.last-play-full5").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[2].className === "third-base runner ") {

var eBases = "Bases loaded.";

}

else {

var eBases = "Runners on first and second.";

};

}

else if (document.querySelector("span.last-play-full5").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[2].className === "third-base runner ") {

var eBases = "Runners on corners.";

}

else {

var eBases = "Runner on first.";

};

}

else if (document.querySelector("span.last-play-full5").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[1].className === "second-base runner ") {

if (document.querySelector("span.last-play-full5").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[2].className === "third-base runner ") {

var eBases = "Runners on second and third.";

}

else {

var eBases = "Runner on second.";

};

}

else if (document.querySelector("span.last-play-full5").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[2].className === "third-base runner ") {

var eBases = "Runner on third.";

}

else {

var eBases = "Bases empty.";

};

var eOuts = document.querySelector("span.last-play-full5").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.children[1].firstElementChild.children[2].textContent.substring(0,1);

var eInning = document.querySelector("span.last-play-full5").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[1].textContent;

var eAwayScore = document.querySelector("span.last-play-full5").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.children[1].children[11].children[2].textContent;

var eHomeScore = document.querySelector("span.last-play-full5").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.children[2].children[11].children[2].textContent;

if (filterStatus === true) {

if (filteredTeam.indexOf(eAway) !== -1 || filteredTeam.indexOf(eHome) !== -1) {

if (eAwayScore > eHomeScore) {

console.log(E + " " + eAway + " @ " + eHome + ", Pitcher: " + ePitcher + ". " + eBases + " " + eOuts + " out(s). " + eInning + ". " + eAway + " leads " + eAwayScore + "-" + eHomeScore);

}

else if (eHomeScore > eAwayScore) {

console.log(E + " " + eAway + " @ " + eHome + ", Pitcher: " + ePitcher + ". " + eBases + " " + eOuts + " out(s). " + eInning + ". " + eHome + " leads " + eHomeScore + "-" + eAwayScore);

}

else {

console.log(E + " " + eAway + " @ " + eHome + ", Pitcher: " + ePitcher + ". " + eBases + " " + eOuts + " out(s). " + eInning + ". " + "Game tied at " + eAwayScore);

};

};

}

else {

if (eAwayScore > eHomeScore) {

console.log(E + " " + eAway + " @ " + eHome + ", Pitcher: " + ePitcher + ". " + eBases + " " + eOuts + " out(s). " + eInning + ". " + eAway + " leads " + eAwayScore + "-" + eHomeScore);

}

else if (eHomeScore > eAwayScore) {

console.log(E + " " + eAway + " @ " + eHome + ", Pitcher: " + ePitcher + ". " + eBases + " " + eOuts + " out(s). " + eInning + ". " + eHome + " leads " + eHomeScore + "-" + eAwayScore);

}

else {

console.log(E + " " + eAway + " @ " + eHome + ", Pitcher: " + ePitcher + ". " + eBases + " " + eOuts + " out(s). " + eInning + ". " + "Game tied at " + eAwayScore);

};

};

e = E;

};

if (F !== f) {

var fAway = document.querySelector("span.last-play-full6").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.classList[4].toUpperCase();

var fHome = document.querySelector("span.last-play-full6").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.classList[5].toUpperCase();

var fPitcher = document.querySelector("span.last-play-full6").parentElement.parentElement.parentElement.firstElementChild.firstElementChild.children[1].firstElementChild.textContent;

if (document.querySelector("span.last-play-full6").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.firstElementChild.className === "first-base runner ") {

if (document.querySelector("span.last-play-full6").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[1].className === "second-base runner ") {

if (document.querySelector("span.last-play-full6").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[2].className === "third-base runner ") {

var fBases = "Bases loaded.";

}

else {

var fBases = "Runners on first and second.";

};

}

else if (document.querySelector("span.last-play-full6").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[2].className === "third-base runner ") {

var fBases = "Runners on corners.";

}

else {

var fBases = "Runner on first.";

};

}

else if (document.querySelector("span.last-play-full6").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[1].className === "second-base runner ") {

if (document.querySelector("span.last-play-full6").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[2].className === "third-base runner ") {

var fBases = "Runners on second and third.";

}

else {

var fBases = "Runner on second.";

};

}

else if (document.querySelector("span.last-play-full6").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[2].className === "third-base runner ") {

var fBases = "Runner on third.";

}

else {

var fBases = "Bases empty.";

};

var fOuts = document.querySelector("span.last-play-full6").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.children[1].firstElementChild.children[2].textContent.substring(0,1);

var fInning = document.querySelector("span.last-play-full6").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[1].textContent;

var fAwayScore = document.querySelector("span.last-play-full6").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.children[1].children[11].children[2].textContent;

var fHomeScore = document.querySelector("span.last-play-full6").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.children[2].children[11].children[2].textContent;

if (filterStatus === true) {

if (filteredTeam.indexOf(fAway) !== -1 || filteredTeam.indexOf(fHome) !== -1) {

if (fAwayScore > fHomeScore) {

console.log(F + " " + fAway + " @ " + fHome + ", Pitcher: " + fPitcher + ". " + fBases + " " + fOuts + " out(s). " + fInning + ". " + fAway + " leads " + fAwayScore + "-" + fHomeScore);

}

else if (fHomeScore > fAwayScore) {

console.log(F + " " + fAway + " @ " + fHome + ", Pitcher: " + fPitcher + ". " + fBases + " " + fOuts + " out(s). " + fInning + ". " + fHome + " leads " + fHomeScore + "-" + fAwayScore);

}

else {

console.log(F + " " + fAway + " @ " + fHome + ", Pitcher: " + fPitcher + ". " + fBases + " " + fOuts + " out(s). " + fInning + ". " + "Game tied at " + fAwayScore);

};

};

}

else {

if (fAwayScore > fHomeScore) {

console.log(F + " " + fAway + " @ " + fHome + ", Pitcher: " + fPitcher + ". " + fBases + " " + fOuts + " out(s). " + fInning + ". " + fAway + " leads " + fAwayScore + "-" + fHomeScore);

}

else if (fHomeScore > fAwayScore) {

console.log(F + " " + fAway + " @ " + fHome + ", Pitcher: " + fPitcher + ". " + fBases + " " + fOuts + " out(s). " + fInning + ". " + fHome + " leads " + fHomeScore + "-" + fAwayScore);

}

else {

console.log(F + " " + fAway + " @ " + fHome + ", Pitcher: " + fPitcher + ". " + fBases + " " + fOuts + " out(s). " + fInning + ". " + "Game tied at " + fAwayScore);

};

};

f = F;

};

if (G !== g) {

var gAway = document.querySelector("span.last-play-full7").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.classList[4].toUpperCase();

var gHome = document.querySelector("span.last-play-full7").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.classList[5].toUpperCase();

var gPitcher = document.querySelector("span.last-play-full7").parentElement.parentElement.parentElement.firstElementChild.firstElementChild.children[1].firstElementChild.textContent;

if (document.querySelector("span.last-play-full7").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.firstElementChild.className === "first-base runner ") {

if (document.querySelector("span.last-play-full7").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[1].className === "second-base runner ") {

if (document.querySelector("span.last-play-full7").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[2].className === "third-base runner ") {

var gBases = "Bases loaded.";

}

else {

var gBases = "Runners on first and second.";

};

}

else if (document.querySelector("span.last-play-full7").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[2].className === "third-base runner ") {

var gBases = "Runners on corners.";

}

else {

var gBases = "Runner on first.";

};

}

else if (document.querySelector("span.last-play-full7").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[1].className === "second-base runner ") {

if (document.querySelector("span.last-play-full7").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[2].className === "third-base runner ") {

var gBases = "Runners on second and third.";

}

else {

var gBases = "Runner on second.";

};

}

else if (document.querySelector("span.last-play-full7").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[2].className === "third-base runner ") {

var gBases = "Runner on third.";

}

else {

var gBases = "Bases empty.";

};

var gOuts = document.querySelector("span.last-play-full7").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.children[1].firstElementChild.children[2].textContent.substring(0,1);

var gInning = document.querySelector("span.last-play-full7").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[1].textContent;

var gAwayScore = document.querySelector("span.last-play-full7").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.children[1].children[11].children[2].textContent;

var gHomeScore = document.querySelector("span.last-play-full7").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.children[2].children[11].children[2].textContent;

if (filterStatus === true) {

if (filteredTeam.indexOf(gAway) !== -1 || filteredTeam.indexOf(gHome) !== -1) {

if (gAwayScore > gHomeScore) {

console.log(G + " " + gAway + " @ " + gHome + ", Pitcher: " + gPitcher + ". " + gBases + " " + gOuts + " out(s). " + gInning + ". " + gAway + " leads " + gAwayScore + "-" + gHomeScore);

}

else if (gHomeScore > gAwayScore) {

console.log(G + " " + gAway + " @ " + gHome + ", Pitcher: " + gPitcher + ". " + gBases + " " + gOuts + " out(s). " + gInning + ". " + gHome + " leads " + gHomeScore + "-" + gAwayScore);

}

else {

console.log(G + " " + gAway + " @ " + gHome + ", Pitcher: " + gPitcher + ". " + gBases + " " + gOuts + " out(s). " + gInning + ". " + "Game tied at " + gAwayScore);

};

};

}

else {

if (gAwayScore > gHomeScore) {

console.log(G + " " + gAway + " @ " + gHome + ", Pitcher: " + gPitcher + ". " + gBases + " " + gOuts + " out(s). " + gInning + ". " + gAway + " leads " + gAwayScore + "-" + gHomeScore);

}

else if (gHomeScore > gAwayScore) {

console.log(G + " " + gAway + " @ " + gHome + ", Pitcher: " + gPitcher + ". " + gBases + " " + gOuts + " out(s). " + gInning + ". " + gHome + " leads " + gHomeScore + "-" + gAwayScore);

}

else {

console.log(G + " " + gAway + " @ " + gHome + ", Pitcher: " + gPitcher + ". " + gBases + " " + gOuts + " out(s). " + gInning + ". " + "Game tied at " + gAwayScore);

};

};

g = G;

};

if (H !== h) {

var hAway = document.querySelector("span.last-play-full8").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.classList[4].toUpperCase();

var hHome = document.querySelector("span.last-play-full8").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.classList[5].toUpperCase();

var hPitcher = document.querySelector("span.last-play-full8").parentElement.parentElement.parentElement.firstElementChild.firstElementChild.children[1].firstElementChild.textContent;

if (document.querySelector("span.last-play-full8").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.firstElementChild.className === "first-base runner ") {

if (document.querySelector("span.last-play-full8").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[1].className === "second-base runner ") {

if (document.querySelector("span.last-play-full8").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[2].className === "third-base runner ") {

var hBases = "Bases loaded.";

}

else {

var hBases = "Runners on first and second.";

};

}

else if (document.querySelector("span.last-play-full8").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[2].className === "third-base runner ") {

var hBases = "Runners on corners.";

}

else {

var hBases = "Runner on first.";

};

}

else if (document.querySelector("span.last-play-full8").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[1].className === "second-base runner ") {

if (document.querySelector("span.last-play-full8").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[2].className === "third-base runner ") {

var hBases = "Runners on second and third.";

}

else {

var hBases = "Runner on second.";

};

}

else if (document.querySelector("span.last-play-full8").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[2].className === "third-base runner ") {

var hBases = "Runner on third.";

}

else {

var hBases = "Bases empty.";

};

var hOuts = document.querySelector("span.last-play-full8").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.children[1].firstElementChild.children[2].textContent.substring(0,1);

var hInning = document.querySelector("span.last-play-full8").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[1].textContent;

var hAwayScore = document.querySelector("span.last-play-full8").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.children[1].children[11].children[2].textContent;

var hHomeScore = document.querySelector("span.last-play-full8").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.children[2].children[11].children[2].textContent;

if (filterStatus === true) {

if (filteredTeam.indexOf(hAway) !== -1 || filteredTeam.indexOf(hHome) !== -1) {

if (hAwayScore > hHomeScore) {

console.log(H + " " + hAway + " @ " + hHome + ", Pitcher: " + hPitcher + ". " + hBases + " " + hOuts + " out(s). " + hInning + ". " + hAway + " leads " + hAwayScore + "-" + hHomeScore);

}

else if (hHomeScore > hAwayScore) {

console.log(H + " " + hAway + " @ " + hHome + ", Pitcher: " + hPitcher + ". " + hBases + " " + hOuts + " out(s). " + hInning + ". " + hHome + " leads " + hHomeScore + "-" + hAwayScore);

}

else {

console.log(H + " " + hAway + " @ " + hHome + ", Pitcher: " + hPitcher + ". " + hBases + " " + hOuts + " out(s). " + hInning + ". " + "Game tied at " + hAwayScore);

};

};

}

else {

if (hAwayScore > hHomeScore) {

console.log(H + " " + hAway + " @ " + hHome + ", Pitcher: " + hPitcher + ". " + hBases + " " + hOuts + " out(s). " + hInning + ". " + hAway + " leads " + hAwayScore + "-" + hHomeScore);

}

else if (hHomeScore > hAwayScore) {

console.log(H + " " + hAway + " @ " + hHome + ", Pitcher: " + hPitcher + ". " + hBases + " " + hOuts + " out(s). " + hInning + ". " + hHome + " leads " + hHomeScore + "-" + hAwayScore);

}

else {

console.log(H + " " + hAway + " @ " + hHome + ", Pitcher: " + hPitcher + ". " + hBases + " " + hOuts + " out(s). " + hInning + ". " + "Game tied at " + hAwayScore);

};

};

h = H;

};

if (J !== j) {

var jAway = document.querySelector("span.last-play-full9").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.classList[4].toUpperCase();

var jHome = document.querySelector("span.last-play-full9").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.classList[5].toUpperCase();

var jPitcher = document.querySelector("span.last-play-full9").parentElement.parentElement.parentElement.firstElementChild.firstElementChild.children[1].firstElementChild.textContent;

if (document.querySelector("span.last-play-full9").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.firstElementChild.className === "first-base runner ") {

if (document.querySelector("span.last-play-full9").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[1].className === "second-base runner ") {

if (document.querySelector("span.last-play-full9").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[2].className === "third-base runner ") {

var jBases = "Bases loaded.";

}

else {

var jBases = "Runners on first and second.";

};

}

else if (document.querySelector("span.last-play-full9").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[2].className === "third-base runner ") {

var jBases = "Runners on corners.";

}

else {

var jBases = "Runner on first.";

};

}

else if (document.querySelector("span.last-play-full9").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[1].className === "second-base runner ") {

if (document.querySelector("span.last-play-full9").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[2].className === "third-base runner ") {

var jBases = "Runners on second and third.";

}

else {

var jBases = "Runner on second.";

};

}

else if (document.querySelector("span.last-play-full9").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[2].className === "third-base runner ") {

var jBases = "Runner on third.";

}

else {

var jBases = "Bases empty.";

};

var jOuts = document.querySelector("span.last-play-full9").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.children[1].firstElementChild.children[2].textContent.substring(0,1);

var jInning = document.querySelector("span.last-play-full9").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[1].textContent;

var jAwayScore = document.querySelector("span.last-play-full9").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.children[1].children[11].children[2].textContent;

var jHomeScore = document.querySelector("span.last-play-full9").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.children[2].children[11].children[2].textContent;

if (filterStatus === true) {

if (filteredTeam.indexOf(jAway) !== -1 || filteredTeam.indexOf(jHome) !== -1) {

if (jAwayScore > jHomeScore) {

console.log(J + " " + jAway + " @ " + jHome + ", Pitcher: " + jPitcher + ". " + jBases + " " + jOuts + " out(s). " + jInning + ". " + jAway + " leads " + jAwayScore + "-" + jHomeScore);

}

else if (jHomeScore > jAwayScore) {

console.log(J + " " + jAway + " @ " + jHome + ", Pitcher: " + jPitcher + ". " + jBases + " " + jOuts + " out(s). " + jInning + ". " + jHome + " leads " + jHomeScore + "-" + jAwayScore);

}

else {

console.log(J + " " + jAway + " @ " + jHome + ", Pitcher: " + jPitcher + ". " + jBases + " " + jOuts + " out(s). " + jInning + ". " + "Game tied at " + jAwayScore);

};

};

}

else {

if (jAwayScore > jHomeScore) {

console.log(J + " " + jAway + " @ " + jHome + ", Pitcher: " + jPitcher + ". " + jBases + " " + jOuts + " out(s). " + jInning + ". " + jAway + " leads " + jAwayScore + "-" + jHomeScore);

}

else if (jHomeScore > jAwayScore) {

console.log(J + " " + jAway + " @ " + jHome + ", Pitcher: " + jPitcher + ". " + jBases + " " + jOuts + " out(s). " + jInning + ". " + jHome + " leads " + jHomeScore + "-" + jAwayScore);

}

else {

console.log(J + " " + jAway + " @ " + jHome + ", Pitcher: " + jPitcher + ". " + jBases + " " + jOuts + " out(s). " + jInning + ". " + "Game tied at " + jAwayScore);

};

};

j = J;

};

if (K !== k) {

var kAway = document.querySelector("span.last-play-full10").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.classList[4].toUpperCase();

var kHome = document.querySelector("span.last-play-full10").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.classList[5].toUpperCase();

var kPitcher = document.querySelector("span.last-play-full10").parentElement.parentElement.parentElement.firstElementChild.firstElementChild.children[1].firstElementChild.textContent;

if (document.querySelector("span.last-play-full10").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.firstElementChild.className === "first-base runner ") {

if (document.querySelector("span.last-play-full10").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[1].className === "second-base runner ") {

if (document.querySelector("span.last-play-full10").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[2].className === "third-base runner ") {

var kBases = "Bases loaded.";

}

else {

var kBases = "Runners on first and second.";

};

}

else if (document.querySelector("span.last-play-full10").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[2].className === "third-base runner ") {

var kBases = "Runners on corners.";

}

else {

var kBases = "Runner on first.";

};

}

else if (document.querySelector("span.last-play-full10").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[1].className === "second-base runner ") {

if (document.querySelector("span.last-play-full10").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[2].className === "third-base runner ") {

var kBases = "Runners on second and third.";

}

else {

var kBases = "Runner on second.";

};

}

else if (document.querySelector("span.last-play-full10").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[2].className === "third-base runner ") {

var kBases = "Runner on third.";

}

else {

var kBases = "Bases empty.";

};

var kOuts = document.querySelector("span.last-play-full10").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.children[1].firstElementChild.children[2].textContent.substring(0,1);

var kInning = document.querySelector("span.last-play-full10").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[1].textContent;

var kAwayScore = document.querySelector("span.last-play-full10").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.children[1].children[11].children[2].textContent;

var kHomeScore = document.querySelector("span.last-play-full10").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.children[2].children[11].children[2].textContent;

if (filterStatus === true) {

if (filteredTeam.indexOf(kAway) !== -1 || filteredTeam.indexOf(kHome) !== -1) {

if (kAwayScore > kHomeScore) {

console.log(K + " " + kAway + " @ " + kHome + ", Pitcher: " + kPitcher + ". " + kBases + " " + kOuts + " out(s). " + kInning + ". " + kAway + " leads " + kAwayScore + "-" + kHomeScore);

}

else if (kHomeScore > kAwayScore) {

console.log(K + " " + kAway + " @ " + kHome + ", Pitcher: " + kPitcher + ". " + kBases + " " + kOuts + " out(s). " + kInning + ". " + kHome + " leads " + kHomeScore + "-" + kAwayScore);

}

else {

console.log(K + " " + kAway + " @ " + kHome + ", Pitcher: " + kPitcher + ". " + kBases + " " + kOuts + " out(s). " + kInning + ". " + "Game tied at " + kAwayScore);

};

};

}

else {

if (kAwayScore > kHomeScore) {

console.log(K + " " + kAway + " @ " + kHome + ", Pitcher: " + kPitcher + ". " + kBases + " " + kOuts + " out(s). " + kInning + ". " + kAway + " leads " + kAwayScore + "-" + kHomeScore);

}

else if (kHomeScore > kAwayScore) {

console.log(K + " " + kAway + " @ " + kHome + ", Pitcher: " + kPitcher + ". " + kBases + " " + kOuts + " out(s). " + kInning + ". " + kHome + " leads " + kHomeScore + "-" + kAwayScore);

}

else {

console.log(K + " " + kAway + " @ " + kHome + ", Pitcher: " + kPitcher + ". " + kBases + " " + kOuts + " out(s). " + kInning + ". " + "Game tied at " + kAwayScore);

};

};

k = K;

};

if (L !== l) {

var lAway = document.querySelector("span.last-play-full11").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.classList[4].toUpperCase();

var lHome = document.querySelector("span.last-play-full11").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.classList[5].toUpperCase();

var lPitcher = document.querySelector("span.last-play-full11").parentElement.parentElement.parentElement.firstElementChild.firstElementChild.children[1].firstElementChild.textContent;

if (document.querySelector("span.last-play-full11").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.firstElementChild.className === "first-base runner ") {

if (document.querySelector("span.last-play-full11").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[1].className === "second-base runner ") {

if (document.querySelector("span.last-play-full11").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[2].className === "third-base runner ") {

var lBases = "Bases loaded.";

}

else {

var lBases = "Runners on first and second.";

};

}

else if (document.querySelector("span.last-play-full11").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[2].className === "third-base runner ") {

var lBases = "Runners on corners.";

}

else {

var lBases = "Runner on first.";

};

}

else if (document.querySelector("span.last-play-full11").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[1].className === "second-base runner ") {

if (document.querySelector("span.last-play-full11").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[2].className === "third-base runner ") {

var lBases = "Runners on second and third.";

}

else {

var lBases = "Runner on second.";

};

}

else if (document.querySelector("span.last-play-full11").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[2].className === "third-base runner ") {

var lBases = "Runner on third.";

}

else {

var lBases = "Bases empty.";

};

var lOuts = document.querySelector("span.last-play-full11").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.children[1].firstElementChild.children[2].textContent.substring(0,1);

var lInning = document.querySelector("span.last-play-full11").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[1].textContent;

var lAwayScore = document.querySelector("span.last-play-full11").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.children[1].children[11].children[2].textContent;

var lHomeScore = document.querySelector("span.last-play-full11").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.children[2].children[11].children[2].textContent;

if (filterStatus === true) {

if (filteredTeam.indexOf(lAway) !== -1 || filteredTeam.indexOf(lHome) !== -1) {

if (lAwayScore > lHomeScore) {

console.log(L + " " + lAway + " @ " + lHome + ", Pitcher: " + lPitcher + ". " + lBases + " " + lOuts + " out(s). " + lInning + ". " + lAway + " leads " + lAwayScore + "-" + lHomeScore);

}

else if (lHomeScore > lAwayScore) {

console.log(L + " " + lAway + " @ " + lHome + ", Pitcher: " + lPitcher + ". " + lBases + " " + lOuts + " out(s). " + lInning + ". " + lHome + " leads " + lHomeScore + "-" + lAwayScore);

}

else {

console.log(L + " " + lAway + " @ " + lHome + ", Pitcher: " + lPitcher + ". " + lBases + " " + lOuts + " out(s). " + lInning + ". " + "Game tied at " + lAwayScore);

};

};

}

else {

if (lAwayScore > lHomeScore) {

console.log(L + " " + lAway + " @ " + lHome + ", Pitcher: " + lPitcher + ". " + lBases + " " + lOuts + " out(s). " + lInning + ". " + lAway + " leads " + lAwayScore + "-" + lHomeScore);

}

else if (lHomeScore > lAwayScore) {

console.log(L + " " + lAway + " @ " + lHome + ", Pitcher: " + lPitcher + ". " + lBases + " " + lOuts + " out(s). " + lInning + ". " + lHome + " leads " + lHomeScore + "-" + lAwayScore);

}

else {

console.log(L + " " + lAway + " @ " + lHome + ", Pitcher: " + lPitcher + ". " + lBases + " " + lOuts + " out(s). " + lInning + ". " + "Game tied at " + lAwayScore);

};

};

l = L;

};

if (M !== m) {

var mAway = document.querySelector("span.last-play-full12").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.classList[4].toUpperCase();

var mHome = document.querySelector("span.last-play-full12").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.classList[5].toUpperCase();

var mPitcher = document.querySelector("span.last-play-full12").parentElement.parentElement.parentElement.firstElementChild.firstElementChild.children[1].firstElementChild.textContent;

if (document.querySelector("span.last-play-full12").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.firstElementChild.className === "first-base runner ") {

if (document.querySelector("span.last-play-full12").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[1].className === "second-base runner ") {

if (document.querySelector("span.last-play-full12").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[2].className === "third-base runner ") {

var mBases = "Bases loaded.";

}

else {

var mBases = "Runners on first and second.";

};

}

else if (document.querySelector("span.last-play-full12").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[2].className === "third-base runner ") {

var mBases = "Runners on corners.";

}

else {

var mBases = "Runner on first.";

};

}

else if (document.querySelector("span.last-play-full12").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[1].className === "second-base runner ") {

if (document.querySelector("span.last-play-full12").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[2].className === "third-base runner ") {

var mBases = "Runners on second and third.";

}

else {

var mBases = "Runner on second.";

};

}

else if (document.querySelector("span.last-play-full12").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[2].className === "third-base runner ") {

var mBases = "Runner on third.";

}

else {

var mBases = "Bases empty.";

};

var mOuts = document.querySelector("span.last-play-full12").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.children[1].firstElementChild.children[2].textContent.substring(0,1);

var mInning = document.querySelector("span.last-play-full12").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[1].textContent;

var mAwayScore = document.querySelector("span.last-play-full12").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.children[1].children[11].children[2].textContent;

var mHomeScore = document.querySelector("span.last-play-full12").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.children[2].children[11].children[2].textContent;

if (filterStatus === true) {

if (filteredTeam.indexOf(mAway) !== -1 || filteredTeam.indexOf(mHome) !== -1) {

if (mAwayScore > mHomeScore) {

console.log(M + " " + mAway + " @ " + mHome + ", Pitcher: " + mPitcher + ". " + mBases + " " + mOuts + " out(s). " + mInning + ". " + mAway + " leads " + mAwayScore + "-" + mHomeScore);

}

else if (mHomeScore > mAwayScore) {

console.log(M + " " + mAway + " @ " + mHome + ", Pitcher: " + mPitcher + ". " + mBases + " " + mOuts + " out(s). " + mInning + ". " + mHome + " leads " + mHomeScore + "-" + mAwayScore);

}

else {

console.log(M + " " + mAway + " @ " + mHome + ", Pitcher: " + mPitcher + ". " + mBases + " " + mOuts + " out(s). " + mInning + ". " + "Game tied at " + mAwayScore);

};

};

}

else {

if (mAwayScore > mHomeScore) {

console.log(M + " " + mAway + " @ " + mHome + ", Pitcher: " + mPitcher + ". " + mBases + " " + mOuts + " out(s). " + mInning + ". " + mAway + " leads " + mAwayScore + "-" + mHomeScore);

}

else if (mHomeScore > mAwayScore) {

console.log(M + " " + mAway + " @ " + mHome + ", Pitcher: " + mPitcher + ". " + mBases + " " + mOuts + " out(s). " + mInning + ". " + mHome + " leads " + mHomeScore + "-" + mAwayScore);

}

else {

console.log(M + " " + mAway + " @ " + mHome + ", Pitcher: " + mPitcher + ". " + mBases + " " + mOuts + " out(s). " + mInning + ". " + "Game tied at " + mAwayScore);

};

};

m = M;

};

if (N !== n) {

var nAway = document.querySelector("span.last-play-full13").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.classList[4].toUpperCase();

var nHome = document.querySelector("span.last-play-full13").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.classList[5].toUpperCase();

var nPitcher = document.querySelector("span.last-play-full13").parentElement.parentElement.parentElement.firstElementChild.firstElementChild.children[1].firstElementChild.textContent;

if (document.querySelector("span.last-play-full13").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.firstElementChild.className === "first-base runner ") {

if (document.querySelector("span.last-play-full13").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[1].className === "second-base runner ") {

if (document.querySelector("span.last-play-full13").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[2].className === "third-base runner ") {

var nBases = "Bases loaded.";

}

else {

var nBases = "Runners on first and second.";

};

}

else if (document.querySelector("span.last-play-full13").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[2].className === "third-base runner ") {

var nBases = "Runners on corners.";

}

else {

var nBases = "Runner on first.";

};

}

else if (document.querySelector("span.last-play-full13").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[1].className === "second-base runner ") {

if (document.querySelector("span.last-play-full13").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[2].className === "third-base runner ") {

var nBases = "Runners on second and third.";

}

else {

var nBases = "Runner on second.";

};

}

else if (document.querySelector("span.last-play-full13").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[2].className === "third-base runner ") {

var nBases = "Runner on third.";

}

else {

var nBases = "Bases empty.";

};

var nOuts = document.querySelector("span.last-play-full13").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.children[1].firstElementChild.children[2].textContent.substring(0,1);

var nInning = document.querySelector("span.last-play-full13").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[1].textContent;

var nAwayScore = document.querySelector("span.last-play-full13").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.children[1].children[11].children[2].textContent;

var nHomeScore = document.querySelector("span.last-play-full13").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.children[2].children[11].children[2].textContent;

if (filterStatus === true) {

if (filteredTeam.indexOf(nAway) !== -1 || filteredTeam.indexOf(nHome) !== -1) {

if (nAwayScore > nHomeScore) {

console.log(N + " " + nAway + " @ " + nHome + ", Pitcher: " + nPitcher + ". " + nBases + " " + nOuts + " out(s). " + nInning + ". " + nAway + " leads " + nAwayScore + "-" + nHomeScore);

}

else if (nHomeScore > nAwayScore) {

console.log(N + " " + nAway + " @ " + nHome + ", Pitcher: " + nPitcher + ". " + nBases + " " + nOuts + " out(s). " + nInning + ". " + nHome + " leads " + nHomeScore + "-" + nAwayScore);

}

else {

console.log(N + " " + nAway + " @ " + nHome + ", Pitcher: " + nPitcher + ". " + nBases + " " + nOuts + " out(s). " + nInning + ". " + "Game tied at " + nAwayScore);

};

};

}

else {

if (nAwayScore > nHomeScore) {

console.log(N + " " + nAway + " @ " + nHome + ", Pitcher: " + nPitcher + ". " + nBases + " " + nOuts + " out(s). " + nInning + ". " + nAway + " leads " + nAwayScore + "-" + nHomeScore);

}

else if (nHomeScore > nAwayScore) {

console.log(N + " " + nAway + " @ " + nHome + ", Pitcher: " + nPitcher + ". " + nBases + " " + nOuts + " out(s). " + nInning + ". " + nHome + " leads " + nHomeScore + "-" + nAwayScore);

}

else {

console.log(N + " " + nAway + " @ " + nHome + ", Pitcher: " + nPitcher + ". " + nBases + " " + nOuts + " out(s). " + nInning + ". " + "Game tied at " + nAwayScore);

};

};

n = N;

};

if (O !== o) {

var oAway = document.querySelector("span.last-play-full14").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.classList[4].toUpperCase();

var oHome = document.querySelector("span.last-play-full14").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.classList[5].toUpperCase();

var oPitcher = document.querySelector("span.last-play-full14").parentElement.parentElement.parentElement.firstElementChild.firstElementChild.children[1].firstElementChild.textContent;

if (document.querySelector("span.last-play-full14").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.firstElementChild.className === "first-base runner ") {

if (document.querySelector("span.last-play-full14").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[1].className === "second-base runner ") {

if (document.querySelector("span.last-play-full14").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[2].className === "third-base runner ") {

var oBases = "Bases loaded.";

}

else {

var oBases = "Runners on first and second.";

};

}

else if (document.querySelector("span.last-play-full14").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[2].className === "third-base runner ") {

var oBases = "Runners on corners.";

}

else {

var oBases = "Runner on first.";

};

}

else if (document.querySelector("span.last-play-full14").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[1].className === "second-base runner ") {

if (document.querySelector("span.last-play-full14").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[2].className === "third-base runner ") {

var oBases = "Runners on second and third.";

}

else {

var oBases = "Runner on second.";

};

}

else if (document.querySelector("span.last-play-full14").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[2].className === "third-base runner ") {

var oBases = "Runner on third.";

}

else {

var oBases = "Bases empty.";

};

var oOuts = document.querySelector("span.last-play-full14").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.children[1].firstElementChild.children[2].textContent.substring(0,1);

var oInning = document.querySelector("span.last-play-full14").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[1].textContent;

var oAwayScore = document.querySelector("span.last-play-full14").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.children[1].children[11].children[2].textContent;

var oHomeScore = document.querySelector("span.last-play-full14").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.children[2].children[11].children[2].textContent;

if (filterStatus === true) {

if (filteredTeam.indexOf(oAway) !== -1 || filteredTeam.indexOf(oHome) !== -1) {

if (oAwayScore > oHomeScore) {

console.log(O + " " + oAway + " @ " + oHome + ", Pitcher: " + oPitcher + ". " + oBases + " " + oOuts + " out(s). " + oInning + ". " + oAway + " leads " + oAwayScore + "-" + oHomeScore);

}

else if (oHomeScore > oAwayScore) {

console.log(O + " " + oAway + " @ " + oHome + ", Pitcher: " + oPitcher + ". " + oBases + " " + oOuts + " out(s). " + oInning + ". " + oHome + " leads " + oHomeScore + "-" + oAwayScore);

}

else {

console.log(O + " " + oAway + " @ " + oHome + ", Pitcher: " + oPitcher + ". " + oBases + " " + oOuts + " out(s). " + oInning + ". " + "Game tied at " + oAwayScore);

};

};

}

else {

if (oAwayScore > oHomeScore) {

console.log(O + " " + oAway + " @ " + oHome + ", Pitcher: " + oPitcher + ". " + oBases + " " + oOuts + " out(s). " + oInning + ". " + oAway + " leads " + oAwayScore + "-" + oHomeScore);

}

else if (oHomeScore > oAwayScore) {

console.log(O + " " + oAway + " @ " + oHome + ", Pitcher: " + oPitcher + ". " + oBases + " " + oOuts + " out(s). " + oInning + ". " + oHome + " leads " + oHomeScore + "-" + oAwayScore);

}

else {

console.log(O + " " + oAway + " @ " + oHome + ", Pitcher: " + oPitcher + ". " + oBases + " " + oOuts + " out(s). " + oInning + ". " + "Game tied at " + oAwayScore);

};

};

o = O;

};

if (P !== p) {

var pAway = document.querySelector("span.last-play-full15").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.classList[4].toUpperCase();

var pHome = document.querySelector("span.last-play-full15").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.classList[5].toUpperCase();

var pPitcher = document.querySelector("span.last-play-full15").parentElement.parentElement.parentElement.firstElementChild.firstElementChild.children[1].firstElementChild.textContent;

if (document.querySelector("span.last-play-full15").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.firstElementChild.className === "first-base runner ") {

if (document.querySelector("span.last-play-full15").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[1].className === "second-base runner ") {

if (document.querySelector("span.last-play-full15").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[2].className === "third-base runner ") {

var pBases = "Bases loaded.";

}

else {

var pBases = "Runners on first and second.";

};

}

else if (document.querySelector("span.last-play-full15").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[2].className === "third-base runner ") {

var pBases = "Runners on corners.";

}

else {

var pBases = "Runner on first.";

};

}

else if (document.querySelector("span.last-play-full15").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[1].className === "second-base runner ") {

if (document.querySelector("span.last-play-full15").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[2].className === "third-base runner ") {

var pBases = "Runners on second and third.";

}

else {

var pBases = "Runner on second.";

};

}

else if (document.querySelector("span.last-play-full15").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[2].className === "third-base runner ") {

var pBases = "Runner on third.";

}

else {

var pBases = "Bases empty.";

};

var pOuts = document.querySelector("span.last-play-full15").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.children[1].firstElementChild.children[2].textContent.substring(0,1);

var pInning = document.querySelector("span.last-play-full15").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[1].textContent;

var pAwayScore = document.querySelector("span.last-play-full15").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.children[1].children[11].children[2].textContent;

var pHomeScore = document.querySelector("span.last-play-full15").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.children[2].children[11].children[2].textContent;

if (filterStatus === true) {

if (filteredTeam.indexOf(pAway) !== -1 || filteredTeam.indexOf(pHome) !== -1) {

if (pAwayScore > pHomeScore) {

console.log(P + " " + pAway + " @ " + pHome + ", Pitcher: " + pPitcher + ". " + pBases + " " + pOuts + " out(s). " + pInning + ". " + pAway + " leads " + pAwayScore + "-" + pHomeScore);

}

else if (pHomeScore > pAwayScore) {

console.log(P + " " + pAway + " @ " + pHome + ", Pitcher: " + pPitcher + ". " + pBases + " " + pOuts + " out(s). " + pInning + ". " + pHome + " leads " + pHomeScore + "-" + pAwayScore);

}

else {

console.log(P + " " + pAway + " @ " + pHome + ", Pitcher: " + pPitcher + ". " + pBases + " " + pOuts + " out(s). " + pInning + ". " + "Game tied at " + pAwayScore);

};

};

}

else {

if (pAwayScore > pHomeScore) {

console.log(P + " " + pAway + " @ " + pHome + ", Pitcher: " + pPitcher + ". " + pBases + " " + pOuts + " out(s). " + pInning + ". " + pAway + " leads " + pAwayScore + "-" + pHomeScore);

}

else if (pHomeScore > pAwayScore) {

console.log(P + " " + pAway + " @ " + pHome + ", Pitcher: " + pPitcher + ". " + pBases + " " + pOuts + " out(s). " + pInning + ". " + pHome + " leads " + pHomeScore + "-" + pAwayScore);

}

else {

console.log(P + " " + pAway + " @ " + pHome + ", Pitcher: " + pPitcher + ". " + pBases + " " + pOuts + " out(s). " + pInning + ". " + "Game tied at " + pAwayScore);

};

};

p = P;

};

if (Q !== q) {

var qAway = document.querySelector("span.last-play-full16").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.classList[4].toUpperCase();

var qHome = document.querySelector("span.last-play-full16").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.classList[5].toUpperCase();

var qPitcher = document.querySelector("span.last-play-full16").parentElement.parentElement.parentElement.firstElementChild.firstElementChild.children[1].firstElementChild.textContent;

if (document.querySelector("span.last-play-full16").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.firstElementChild.className === "first-base runner ") {

if (document.querySelector("span.last-play-full16").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[1].className === "second-base runner ") {

if (document.querySelector("span.last-play-full16").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[2].className === "third-base runner ") {

var qBases = "Bases loaded.";

}

else {

var qBases = "Runners on first and second.";

};

}

else if (document.querySelector("span.last-play-full16").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[2].className === "third-base runner ") {

var qBases = "Runners on corners.";

}

else {

var qBases = "Runner on first.";

};

}

else if (document.querySelector("span.last-play-full16").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[1].className === "second-base runner ") {

if (document.querySelector("span.last-play-full16").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[2].className === "third-base runner ") {

var qBases = "Runners on second and third.";

}

else {

var qBases = "Runner on second.";

};

}

else if (document.querySelector("span.last-play-full16").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[2].className === "third-base runner ") {

var qBases = "Runner on third.";

}

else {

var qBases = "Bases empty.";

};

var qOuts = document.querySelector("span.last-play-full16").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.children[1].firstElementChild.children[2].textContent.substring(0,1);

var qInning = document.querySelector("span.last-play-full16").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[1].textContent;

var qAwayScore = document.querySelector("span.last-play-full16").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.children[1].children[11].children[2].textContent;

var qHomeScore = document.querySelector("span.last-play-full16").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.children[2].children[11].children[2].textContent;

if (filterStatus === true) {

if (filteredTeam.indexOf(qAway) !== -1 || filteredTeam.indexOf(qHome) !== -1) {

if (qAwayScore > qHomeScore) {

console.log(Q + " " + qAway + " @ " + qHome + ", Pitcher: " + qPitcher + ". " + qBases + " " + qOuts + " out(s). " + qInning + ". " + qAway + " leads " + qAwayScore + "-" + qHomeScore);

}

else if (qHomeScore > qAwayScore) {

console.log(Q + " " + qAway + " @ " + qHome + ", Pitcher: " + qPitcher + ". " + qBases + " " + qOuts + " out(s). " + qInning + ". " + qHome + " leads " + qHomeScore + "-" + qAwayScore);

}

else {

console.log(Q + " " + qAway + " @ " + qHome + ", Pitcher: " + qPitcher + ". " + qBases + " " + qOuts + " out(s). " + qInning + ". " + "Game tied at " + qAwayScore);

};

};

}

else {

if (qAwayScore > qHomeScore) {

console.log(Q + " " + qAway + " @ " + qHome + ", Pitcher: " + qPitcher + ". " + qBases + " " + qOuts + " out(s). " + qInning + ". " + qAway + " leads " + qAwayScore + "-" + qHomeScore);

}

else if (qHomeScore > qAwayScore) {

console.log(Q + " " + qAway + " @ " + qHome + ", Pitcher: " + qPitcher + ". " + qBases + " " + qOuts + " out(s). " + qInning + ". " + qHome + " leads " + qHomeScore + "-" + qAwayScore);

}

else {

console.log(Q + " " + qAway + " @ " + qHome + ", Pitcher: " + qPitcher + ". " + qBases + " " + qOuts + " out(s). " + qInning + ". " + "Game tied at " + qAwayScore);

};

};

q = Q;

};

if (R !== r) {

var rAway = document.querySelector("span.last-play-full17").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.classList[4].toUpperCase();

var rHome = document.querySelector("span.last-play-full17").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.classList[5].toUpperCase();

var rPitcher = document.querySelector("span.last-play-full17").parentElement.parentElement.parentElement.firstElementChild.firstElementChild.children[1].firstElementChild.textContent;

if (document.querySelector("span.last-play-full17").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.firstElementChild.className === "first-base runner ") {

if (document.querySelector("span.last-play-full17").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[1].className === "second-base runner ") {

if (document.querySelector("span.last-play-full17").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[2].className === "third-base runner ") {

var rBases = "Bases loaded.";

}

else {

var rBases = "Runners on first and second.";

};

}

else if (document.querySelector("span.last-play-full17").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[2].className === "third-base runner ") {

var rBases = "Runners on corners.";

}

else {

var rBases = "Runner on first.";

};

}

else if (document.querySelector("span.last-play-full17").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[1].className === "second-base runner ") {

if (document.querySelector("span.last-play-full17").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[2].className === "third-base runner ") {

var rBases = "Runners on second and third.";

}

else {

var rBases = "Runner on second.";

};

}

else if (document.querySelector("span.last-play-full17").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[2].className === "third-base runner ") {

var rBases = "Runner on third.";

}

else {

var rBases = "Bases empty.";

};

var rOuts = document.querySelector("span.last-play-full17").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.children[1].firstElementChild.children[2].textContent.substring(0,1);

var rInning = document.querySelector("span.last-play-full17").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[1].textContent;

var rAwayScore = document.querySelector("span.last-play-full17").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.children[1].children[11].children[2].textContent;

var rHomeScore = document.querySelector("span.last-play-full17").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.children[2].children[11].children[2].textContent;

if (filterStatus === true) {

if (filteredTeam.indexOf(rAway) !== -1 || filteredTeam.indexOf(rHome) !== -1) {

if (rAwayScore > rHomeScore) {

console.log(R + " " + rAway + " @ " + rHome + ", Pitcher: " + rPitcher + ". " + rBases + " " + rOuts + " out(s). " + rInning + ". " + rAway + " leads " + rAwayScore + "-" + rHomeScore);

}

else if (rHomeScore > rAwayScore) {

console.log(R + " " + rAway + " @ " + rHome + ", Pitcher: " + rPitcher + ". " + rBases + " " + rOuts + " out(s). " + rInning + ". " + rHome + " leads " + rHomeScore + "-" + rAwayScore);

}

else {

console.log(R + " " + rAway + " @ " + rHome + ", Pitcher: " + rPitcher + ". " + rBases + " " + rOuts + " out(s). " + rInning + ". " + "Game tied at " + rAwayScore);

};

};

}

else {

if (rAwayScore > rHomeScore) {

console.log(R + " " + rAway + " @ " + rHome + ", Pitcher: " + rPitcher + ". " + rBases + " " + rOuts + " out(s). " + rInning + ". " + rAway + " leads " + rAwayScore + "-" + rHomeScore);

}

else if (rHomeScore > rAwayScore) {

console.log(R + " " + rAway + " @ " + rHome + ", Pitcher: " + rPitcher + ". " + rBases + " " + rOuts + " out(s). " + rInning + ". " + rHome + " leads " + rHomeScore + "-" + rAwayScore);

}

else {

console.log(R + " " + rAway + " @ " + rHome + ", Pitcher: " + rPitcher + ". " + rBases + " " + rOuts + " out(s). " + rInning + ". " + "Game tied at " + rAwayScore);

};

};

r = R;

};

if (S !== s) {

var sAway = document.querySelector("span.last-play-full18").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.classList[4].toUpperCase();

var sHome = document.querySelector("span.last-play-full18").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.classList[5].toUpperCase();

var sPitcher = document.querySelector("span.last-play-full18").parentElement.parentElement.parentElement.firstElementChild.firstElementChild.children[1].firstElementChild.textContent;

if (document.querySelector("span.last-play-full18").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.firstElementChild.className === "first-base runner ") {

if (document.querySelector("span.last-play-full18").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[1].className === "second-base runner ") {

if (document.querySelector("span.last-play-full18").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[2].className === "third-base runner ") {

var sBases = "Bases loaded.";

}

else {

var sBases = "Runners on first and second.";

};

}

else if (document.querySelector("span.last-play-full18").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[2].className === "third-base runner ") {

var sBases = "Runners on corners.";

}

else {

var sBases = "Runner on first.";

};

}

else if (document.querySelector("span.last-play-full18").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[1].className === "second-base runner ") {

if (document.querySelector("span.last-play-full18").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[2].className === "third-base runner ") {

var sBases = "Runners on second and third.";

}

else {

var sBases = "Runner on second.";

};

}

else if (document.querySelector("span.last-play-full18").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[2].className === "third-base runner ") {

var sBases = "Runner on third.";

}

else {

var sBases = "Bases empty.";

};

var sOuts = document.querySelector("span.last-play-full18").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.children[1].firstElementChild.children[2].textContent.substring(0,1);

var sInning = document.querySelector("span.last-play-full18").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.firstElementChild.firstElementChild.firstElementChild.firstElementChild.children[1].textContent;

var sAwayScore = document.querySelector("span.last-play-full18").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.children[1].children[11].children[2].textContent;

var sHomeScore = document.querySelector("span.last-play-full18").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementChild.children[2].children[11].children[2].textContent;

if (filterStatus === true) {

if (filteredTeam.indexOf(sAway) !== -1 || filteredTeam.indexOf(sHome) !== -1) {

if (sAwayScore > sHomeScore) {

console.log(S + " " + sAway + " @ " + sHome + ", Pitcher: " + sPitcher + ". " + sBases + " " + sOuts + " out(s). " + sInning + ". " + sAway + " leads " + sAwayScore + "-" + sHomeScore);

}

else if (sHomeScore > sAwayScore) {

console.log(S + " " + sAway + " @ " + sHome + ", Pitcher: " + sPitcher + ". " + sBases + " " + sOuts + " out(s). " + sInning + ". " + sHome + " leads " + sHomeScore + "-" + sAwayScore);

}

else {

console.log(S + " " + sAway + " @ " + sHome + ", Pitcher: " + sPitcher + ". " + sBases + " " + sOuts + " out(s). " + sInning + ". " + "Game tied at " + sAwayScore);

};

};

}

else {

if (sAwayScore > sHomeScore) {

console.log(S + " " + sAway + " @ " + sHome + ", Pitcher: " + sPitcher + ". " + sBases + " " + sOuts + " out(s). " + sInning + ". " + sAway + " leads " + sAwayScore + "-" + sHomeScore);

}

else if (sHomeScore > sAwayScore) {

console.log(S + " " + sAway + " @ " + sHome + ", Pitcher: " + sPitcher + ". " + sBases + " " + sOuts + " out(s). " + sInning + ". " + sHome + " leads " + sHomeScore + "-" + sAwayScore);

}

else {

console.log(S + " " + sAway + " @ " + sHome + ", Pitcher: " + sPitcher + ". " + sBases + " " + sOuts + " out(s). " + sInning + ". " + "Game tied at " + sAwayScore);

};

};

s = S;

};

if (T !== t) {

var tAway = document.querySelector("span.last-play-full19").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.classList[4].toUpperCase();

var tHome = document.querySelector("span.last-play-full19").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.classList[5].toUpperCase();

var tPitcher = document.querySelector("span.last-play-full19").parentElement.parentElement.parentElement.firstElementChild.firstElementChild.children[1].firstElementChild.textContent;

if (document.querySelector("span.last-play-full19").parentElement.parentElement.parentElement.parentElement.parentElement.firstElementChild.firstElementCh