FC-softwares/baseball-scoreboard

View on GitHub
app/js/appOfficials.js

Summary

Maintainability
A
0 mins
Test Coverage

Showing 0 of 4 total issues

Identical blocks of code found in 2 locations. Consider refactoring.
Invalid

function activeDeactiveScoreboard(data,url){
if (data !== undefined && document.URL.includes(url)) {
if (data) {
document.querySelector("div.scoreboard").classList.remove("disabled");
} else {
Severity: Major
Found in app/js/appOfficials.js and 1 other location - About 2 hrs to fix
app/js/app.js on lines 248..256

Similar blocks of code found in 2 locations. Consider refactoring.
Invalid

function updateActive(json){
const obj = JSON.parse(json);
activeDeactiveScoreboard(obj?.umpires, 'umpires.html');
activeDeactiveScoreboard(obj?.scorers, 'scorers.html');
activeDeactiveScoreboard(obj?.commentator, 'commentator.html');
Severity: Major
Found in app/js/appOfficials.js and 1 other location - About 1 hr to fix
app/js/app.js on lines 241..247

Similar blocks of code found in 2 locations. Consider refactoring.
Wontfix

commentor.surname || commentor.surname=="" ? document.querySelector(".commentator > span#surname").innerHTML = commentor.surname : null;
Severity: Minor
Found in app/js/appOfficials.js and 1 other location - About 30 mins to fix
app/js/appOfficials.js on lines 130..130

Similar blocks of code found in 2 locations. Consider refactoring.
Wontfix

commentor.name || commentor.name=="" ? document.querySelector(".commentator > span#name").innerHTML = commentor.name : null;
Severity: Minor
Found in app/js/appOfficials.js and 1 other location - About 30 mins to fix
app/js/appOfficials.js on lines 129..129

There are no issues that match your filters.

Category
Status