
/* Global styles */
.titles {
font-size:30px;
vertical-align:middle;
}
.headers {
border:1px dotted #ccc;
border-radius:5px;
margin-bottom:5px;
cursor:pointer;
}
.sports-icons {
height:30px;
width:30px;
padding-left:5px;
vertical-align:middle;
display:inline-block;
}
.loser {
color:#999;
}
.logos {
width:20px;
margin-right:0.5em;
display:inline-block;
vertical-align:middle;
}
.bottom-row {
border-left:1px solid #ccc;
min-height:60px!important;
}
.status {
text-align:center;
padding-top:18px!important;
font-size:0.7em;
}
.status-link {
text-align:center;
padding-top:5px;
font-size:0.7em;
}
.header-sprites {
background: url(“https://media.wkbn.com/nxs-wkbntv-media-us-east-1/html/sports/scores/logos/headers/header-sprites.png”) no-repeat;
}
.winner {
font-weight:bold;
}
#ie-only {
display:none;
}
/* Media queries */
@media only screen and (max-width : 600px) {
/* Styles for screens 600px and below */
.titles {
font-size:15px !important;
}
.glyphicon {
line-height:2 !important;
}
}
/* Styles for Internet Explorer */
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
#ie-only {
display:block !important;
}
#main-browsers {
display:none;
}
}
/* Other section-specific styles */
#Football, #HSFOOTBALL, #FootballSat, #BOYSBB, #GIRLSBB, #HSBASEBALL, #CollegeBaseball, #CollegeSoftball, #HSSOFTBALL, #BOYSSOCCER, #GIRLSSOCCER, #BOYSGOLF, #GIRLSGOLF, #BOYSTENNIS, #GIRLSTENNIS, #VOLLEYBALL, #CollegeBasketballWeb, #WCollegeBasketballWeb, #CollegeFootballWeb, #NCAAFCS, #NCAATop25, #NFLWEB, #NBAWEB, #MLBWEB, #DRAFTLEAGUE, #NHLWEB, #HoleinOne, #NCAAMBBTop25, #NCAAWBBTop25, #NCAAD3, #BoysLacrosse, #GirlsLacrosse, #USHL, #HSHockey {
display:none;
}
/* Other miscellaneous styles */
.tooBig {
font-size:0.8em!important;
}
.toolong {
font-size: 0.8em!important;
}
Read more:
View all stories/recaps
Have a score to report?
Email it to WKBN Sports
High School Football Thursday
High School Football
High School Football Saturday
High School Boys Basketball
High School Girls Basketball
High School Baseball
College Baseball
College Softball
High School Softball
High School Boys Soccer
High School Girls Soccer
High School Boys Golf
High School Girls Golf
High School Boys Tennis
High School Girls Tennis
High School Boys Lacrosse
High School Girls Lacrosse
High School Girls Volleyball
NCAA Men’s Basketball Top 25
NCAA Men’s Basketball
NCAA Women’s Basketball Top 25
NCAA Women’s Basketball
NCAA Football FCS
MLB
NFL
College Football
NCAA Football Top 25
NCAA Football Division 3
NBA
Scrappers
NHL
USHL
Hole-in-One
High School Hockey
$(document).ready(function(){
$.get(‘https://media.psg.nexstardigital.net/wkbn/sports/scores.xml?’, function(xml){
function findGame(a){
$(xml).find(‘RECORD’).each(function(){
var $this = $(this);
var sport = $this.find(‘LEAGUE_NAME1’).text();
var vteam = $this.find(‘FORCED_VISIT_TEAM’).text();
var vscore = Number($this.find(‘VISIT_SCORE’).text());
var hteam = $this.find(‘FORCED_HOME_TEAM’).text();
var hscore = Number($this.find(‘HOME_SCORE’).text());
var status = $this.find(‘FORCED_PERIOD’).text();
var final = $this.find(‘FORCED_PERIOD’).text();
var isfinal = $this.find(‘FINAL’).text();
var trimsport = sport.replace(/\s+/g, ”); /*Remove all white space from sport variable*/
var vrank = $this.find(‘vteamrank’).text();
var hrank = $this.find(‘hteamrank’).text();
var vstring = $this.find(‘VISIT_SCORE’).text();
var hstring = $this.find(‘HOME_SCORE’).text();
var storylink = $this.find(‘NOTES_ALL’).text();
var storytext = $this.find(‘vteamrecord’).text();
var altstorylink = $this.find(‘highlight’).text();
var storyipid = “?ipid=scorespagestory”
/*Checking every game to see if the sport matches param from findGame function call*/
if (trimsport == a) {
createDiv = function(){
var condition = 0;
const finalStatuses = [“F”, “F/OT”, “F/2OT”, “F/5”, “F/GM1”, “F/GM2”, “Final”];
const hasStoryLink = storylink || altstorylink;
$(‘#’ + a).append(“”);
var array = [];
array.push(‘
if (trimsport == ‘HoleinOne’){
array.push(‘
}
else {
array.push(‘
}
if (finalStatuses.includes(final)){
if (hscore > vscore){
if(vteam.length > 15){
array.push(‘‘);
}
else {
array.push(‘‘);
}
if (condition == 0){
if (trimsport == ‘NCAATop25’ || trimsport == ‘NCAAMBBTop25’ || trimsport == ‘NCAAWBBTop25’){
if (vrank){
array.push(vrank + ‘ ‘);
}
}
array.push(vteam + ‘‘);
}
array.push(‘‘ + vscore + ‘‘);
} else {
if(vteam.length > 15){
array.push(‘‘);
}
else{
array.push(‘‘);
}
if (condition == 0){
if (trimsport == ‘NCAATop25’ || trimsport == ‘NCAAMBBTop25’ || trimsport == ‘NCAAWBBTop25’){
if (vrank){
array.push(vrank + ‘ ‘);
}
}
array.push(vteam + ‘‘);
}
array.push(‘‘ + vscore + ‘‘);
}
} else {
if (trimsport == ‘HoleinOne’){
array.push(‘‘);
array.push(vteam + ‘‘);
array.push(‘‘ + vstring + ‘‘);
}
else{
if (vteam.length > 15){
array.push(‘‘);
}
else {
array.push(‘‘);
}
if (condition == 0){
if (trimsport == ‘NCAATop25’ || trimsport == ‘NCAAMBBTop25’ || trimsport == ‘NCAAWBBTop25’){
if (vrank){
array.push(vrank + ‘ ‘);
}
}
array.push(vteam + ‘‘);
}
array.push(‘‘ + vscore + ‘‘);
}
}
if (final == “F”){
if (vscore > hscore){
if (hteam.length > 15){
array.push(‘‘);
}
else {
array.push(‘‘);
}
if (condition == 0){
if (trimsport == ‘NCAATop25’ || trimsport == ‘NCAAMBBTop25’ || trimsport == ‘NCAAWBBTop25’){
if (hrank){
array.push(hrank + ‘ ‘);
}
}
array.push(hteam + ‘‘);
}
array.push(‘‘ + hscore + ‘‘);
} else {
if (hteam.length > 15){
array.push(‘‘);
}
else {
array.push(‘‘);
}
if (condition == 0){
if (trimsport == ‘NCAATop25’ || trimsport == ‘NCAAMBBTop25’ || trimsport == ‘NCAAWBBTop25’){
if (hrank){
array.push(hrank + ‘ ‘);
}
}
array.push(hteam + ‘‘);
}
array.push(‘‘ + hscore + ‘‘);
}
} else {
if (trimsport == ‘HoleinOne’){
array.push(‘‘);
array.push(hteam + ‘‘);
array.push(‘‘ + hstring + ‘‘);
}
else {
if (hteam.length > 15) {
array.push(‘‘);
}
else {
array.push(‘‘);
}
if (condition == 0){
if (trimsport == ‘NCAATop25’ || trimsport == ‘NCAAMBBTop25’ || trimsport == ‘NCAAWBBTop25’){
if (hrank){
array.push(hrank + ‘ ‘);
}
}
array.push(hteam + ‘‘);
}
array.push(‘‘ + hscore + ‘‘);
}
}
array.push(‘
‘);
if (trimsport != ‘HoleinOne’){
array.push(‘
if (finalStatuses.includes(final)){
if (hasStoryLink){
array.push(‘‘ + status + ‘‘);
array.push(‘‘ + “Recap” + ‘‘);
}
else {
array.push(‘‘ + status + ‘‘);
}
} else {
if (hasStoryLink){
array.push(‘‘ + status + ‘‘);
array.push(‘‘ + “Story” + ‘‘);
}
else {
array.push(‘‘ + status + ‘‘);
}
}
array.push(‘
‘);
}
array.push(‘
‘);
array.push(‘
array.push(‘
‘);
$(‘#’ + a).append(array.join(”));
}; /*End createDiv function*/
createDiv(); /*Call the function*/
$(‘#’ + a).css(‘display’, ‘block’); /*Take all of the current sports for the day and show them*/
} /*End ‘trimsport is a’ if statement*/
}); /*End find game function*/
} /*Close find game function*/
/*Creates a non-changing variable (contstant) to hold all of the types of sports*/
const games=[‘Football’,’HSFOOTBALL’,’FootballSat’,’BOYSBB’,’GIRLSBB’,’HSBASEBALL’,’CollegeBaseball’,’CollegeSoftball’,’HSSOFTBALL’,’BOYSSOCCER’,’GIRLSSOCCER’,’BOYSGOLF’,’GIRLSGOLF’,’BOYSTENNIS’,’GIRLSTENNIS’,’VOLLEYBALL’,’NCAAMBBTop25′,’CollegeBasketballWeb’,’NCAAWBBTop25′,’WCollegeBasketballWeb’,’CollegeFootballWeb’,’NCAATop25′,’NFLWEB’,’NBAWEB’,’MLBWEB’,’DRAFTLEAGUE’,’NHLWEB’,’HoleinOne’,’NCAAD3′,’BoysLacrosse’,’GirlsLacrosse’,’USHL’,’HSHockey’];
/*Loops through those constants to find which ones have content*/
games.forEach(game => {
findGame(game);
});
}); /*Close get scores.xml function*/
}); /*Close get ready function*/
// Testing AJAX call