diff --git a/js/background.js b/js/background.js index c0b8a3e..9430042 100755 --- a/js/background.js +++ b/js/background.js @@ -134,7 +134,8 @@ chrome.runtime.onMessage.addListener(function (request, sender, sendResponse) { }) }) - const LoadStats = function(stats){ + const LoadStats = function(stats){ + const GreatDivideCard = document.getElementById('p+greatdivide_card') if (stats !== null) { let KDR = (stats.Kills / stats.Deaths) if (isNaN(KDR)) { @@ -143,7 +144,7 @@ chrome.runtime.onMessage.addListener(function (request, sender, sendResponse) { KDR = KDR.toFixed(4) } - document.getElementById('p+greatdivide_card').innerHTML = ` + GreatDivideCard.innerHTML = `
This user hasn't participated in The Great Divide.
+ ` } } return true diff --git a/the-great-divide.js b/the-great-divide.js index 84d7026..4075398 100644 --- a/the-great-divide.js +++ b/the-great-divide.js @@ -89,7 +89,7 @@ const PlaceAllowlist = [ GREATEST DIVISION -