Update variable declaration

Preferable to use 'let' instead of 'var' for variable declaration
This commit is contained in:
Kalinka authored and GitHub committed 2021-12-09 19:16:55 +01:00
1 parent 1959c8ba23
commit 3d9edc26e2
1 file changed
+3 -3
@@ -3,7 +3,7 @@ const DISLIKED_STATE = "DISLIKED_STATE";
const NEUTRAL_STATE = "NEUTRAL_STATE"; const NEUTRAL_STATE = "NEUTRAL_STATE";
if (!storedData) { if (!storedData) {
var storedData = { let storedData = {
likes: 0, likes: 0,
dislikes: 0, dislikes: 0,
previousState: NEUTRAL_STATE, previousState: NEUTRAL_STATE,
@@ -252,12 +252,12 @@ function setEventListeners(evt) {
} }
if (window.location.href.indexOf("watch?") >= 0) { if (window.location.href.indexOf("watch?") >= 0) {
var jsInitChecktimer = setInterval(checkForJS_Finish, 111); let jsInitChecktimer = setInterval(checkForJS_Finish, 111);
} }
} }
function createRateBar(likes, dislikes) { function createRateBar(likes, dislikes) {
var rateBar = document.getElementById("return-youtube-dislike-bar-container"); let rateBar = document.getElementById("return-youtube-dislike-bar-container");
const widthPx = const widthPx =
getLikeButton().clientWidth + getLikeButton().clientWidth +