From 64b26237903702187ddc290bfc45780af6d77a7a Mon Sep 17 00:00:00 2001 From: itdominator <1itdominator@gmail.com> Date: Thu, 26 Aug 2021 17:34:29 -0500 Subject: [PATCH] update deprications --- README.md | 1 + src/scripts/betterYoutube.js | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 45dcd25..04b8ca3 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ Better YouTube + works to improve the YouTube experience by providing quick acce # Version: 1.5.8 * Updated attribute search +* Updated getUrl method caller # Download https://addons.mozilla.org/en-US/firefox/addon/better-youtube-plus/ diff --git a/src/scripts/betterYoutube.js b/src/scripts/betterYoutube.js index e1cbd12..fd66a2d 100644 --- a/src/scripts/betterYoutube.js +++ b/src/scripts/betterYoutube.js @@ -281,7 +281,7 @@ clearInterval(ytVideoIntervalLoop); loopingInterval = false; ytLoopBttn.title = "Start Loop..."; - let ipath = browser.extension.getURL("/icons/loopFalse.png"); + let ipath = browser.runtime.getURL("/icons/loopFalse.png"); setbuttonImage(ytLoopBttn, ipath); return ; } @@ -291,13 +291,13 @@ console.log("Setting default loop marker..."); video.loop = true; ytLoopBttn.title = "Stop Loop..."; - let ipath = browser.extension.getURL("/icons/loopTrue.png"); + let ipath = browser.runtime.getURL("/icons/loopTrue.png"); setbuttonImage(ytLoopBttn, ipath); } else { console.log("Unsetting default loop marker..."); video.loop = false; ytLoopBttn.title = "Start Loop..."; - let ipath = browser.extension.getURL("/icons/loopFalse.png"); + let ipath = browser.runtime.getURL("/icons/loopFalse.png"); setbuttonImage(ytLoopBttn, ipath); } return ; @@ -338,7 +338,7 @@ // Setup interval check for 1 sec and compare value of current pos to end ytLoopBttn.title = "Stop Loop..."; - let ipath = browser.extension.getURL("/icons/loopTrue.png"); + let ipath = browser.runtime.getURL("/icons/loopTrue.png"); setbuttonImage(ytLoopBttn, ipath); loopingInterval = true; @@ -458,6 +458,6 @@ } const setbuttonImage = (elm, path) => { - elm.style.backgroundImage = "url('" + browser.extension.getURL(path); + "')"; + elm.style.backgroundImage = "url('" + browser.runtime.getURL(path); + "')"; } }());