From 559a2e8305fad68500f2b5c96b34a051994d4cef Mon Sep 17 00:00:00 2001 From: AndrewUnderscore <71723495+UnderscoreX5@users.noreply.github.com> Date: Mon, 20 Dec 2021 13:35:01 +0100 Subject: [PATCH] taking the chrome manifest's version It seems to work on firefox 95 but stable compatibility is not yet confirmed. Furthermore FF is not the only browser to use the 'browser' namespace, there's also safari. A cross-compatible version is to be preferred. --- Extensions/combined/popup.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Extensions/combined/popup.js b/Extensions/combined/popup.js index 1f2a7e3..c0e7b78 100644 --- a/Extensions/combined/popup.js +++ b/Extensions/combined/popup.js @@ -4,7 +4,17 @@ const config = { showAdvancedMessage: "Show Settings", hideAdvancedMessage: "Hide Settings", disableVoteSubmission: false, +} + function initConfig() { + initializeVersionNumber(); + } + + function initializeVersionNumber() { + const version = chrome.runtime.getManifest().version; + document.getElementById('ext-version').innerHTML = 'v' + version; +} + links: { website: "https://returnyoutubedislike.com", github: "https://github.com/Anarios/return-youtube-dislike",