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.
This commit is contained in:
AndrewUnderscore authored and GitHub committed 2021-12-20 13:35:01 +01:00
1 parent 10c2f10e5c
commit 559a2e8305
1 file changed
+10
+10
View File
@@ -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",