From 3f9f19356e7d719787d78f4e71cb8e719b9bd282 Mon Sep 17 00:00:00 2001 From: ManeraKai Date: Sun, 22 May 2022 11:56:00 +0300 Subject: [PATCH] Fixed a typo in Piped Unify Settings, and added more settings --- .../javascripts/helpers/youtube/get_piped_preferences.js | 4 ++++ .../javascripts/helpers/youtube/set_piped_preferences.js | 2 ++ src/assets/javascripts/helpers/youtube/youtube.js | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/assets/javascripts/helpers/youtube/get_piped_preferences.js b/src/assets/javascripts/helpers/youtube/get_piped_preferences.js index 12e92ba..7f090ff 100644 --- a/src/assets/javascripts/helpers/youtube/get_piped_preferences.js +++ b/src/assets/javascripts/helpers/youtube/get_piped_preferences.js @@ -1,12 +1,16 @@ window.browser = window.browser || window.chrome; +console.log('unifying piped'); + browser.storage.local.set( { 'piped_bufferGoal': localStorage.getItem("bufferGoal"), 'piped_comments': localStorage.getItem("comments"), 'piped_disableLBRY': localStorage.getItem("disableLBRY"), 'piped_enabledCodecs': localStorage.getItem("enabledCodecs"), + 'piped_hl': localStorage.getItem("hl"), 'piped_homepage': localStorage.getItem("homepage"), + 'piped_instance': localStorage.getItem("instance"), 'piped_listen': localStorage.getItem("listen"), 'piped_minimizeDescription': localStorage.getItem("minimizeDescription"), 'piped_playerAutoPlay': localStorage.getItem("playerAutoPlay"), diff --git a/src/assets/javascripts/helpers/youtube/set_piped_preferences.js b/src/assets/javascripts/helpers/youtube/set_piped_preferences.js index ffb3e21..b0aa223 100644 --- a/src/assets/javascripts/helpers/youtube/set_piped_preferences.js +++ b/src/assets/javascripts/helpers/youtube/set_piped_preferences.js @@ -23,8 +23,10 @@ browser.storage.local.get( if (r.piped_bufferGoal !== undefined) localStorage.setItem("bufferGoal", r.piped_bufferGoal); if (r.piped_comments !== undefined) localStorage.setItem("comments", r.piped_comments); if (r.piped_disableLBRY !== undefined) localStorage.setItem("disableLBRY", r.piped_disableLBRY); + if (r.piped_hl !== undefined) localStorage.setItem("hl", r.piped_hl); if (r.piped_enabledCodecs !== undefined) localStorage.setItem("enabledCodecs", r.piped_enabledCodecs); if (r.piped_homepage !== undefined) localStorage.setItem("homepage", r.piped_homepage); + if (r.piped_instance !== undefined) localStorage.setItem("instance", r.piped_instance); if (r.piped_listen !== undefined) localStorage.setItem("listen", r.piped_listen); if (r.piped_minimizeDescription !== undefined) localStorage.setItem("minimizeDescription", r.piped_minimizeDescription); if (r.piped_playerAutoPlay !== undefined) localStorage.setItem("playerAutoPlay", r.piped_playerAutoPlay); diff --git a/src/assets/javascripts/helpers/youtube/youtube.js b/src/assets/javascripts/helpers/youtube/youtube.js index 060d149..fc75a11 100644 --- a/src/assets/javascripts/helpers/youtube/youtube.js +++ b/src/assets/javascripts/helpers/youtube/youtube.js @@ -442,7 +442,7 @@ function initPipedLocalStorage(test, url, tabId) { browser.tabs.executeScript( tabId, { - file: "/assets/javascripts/helpers/youtube/get_piped_settings.js", + file: "/assets/javascripts/helpers/youtube/get_piped_preferences.js", runAt: "document_start" } );