Add page for refreshing invidious permissions if it was revoked

Fixes #1354
This commit is contained in:
Ajay
2022-08-16 16:00:34 -04:00
parent eae8485713
commit faeb5dede0
6 changed files with 55 additions and 43 deletions

View File

@@ -107,7 +107,7 @@ chrome.runtime.onMessage.addListener(function (request, _, callback) {
chrome.runtime.onInstalled.addListener(function () {
// This let's the config sync to run fully before checking.
// This is required on Firefox
setTimeout(function() {
setTimeout(async () => {
const userID = Config.config.userID;
// If there is no userID, then it is the first install.
@@ -123,6 +123,12 @@ chrome.runtime.onInstalled.addListener(function () {
// Don't show update notification
Config.config.categoryPillUpdate = true;
}
if (Config.config.supportInvidious) {
if (!(await utils.containsInvidiousPermission())) {
chrome.tabs.create({url: chrome.extension.getURL("/permissions/index.html")});
}
}
}, 1500);
});