Skip to content

Commit

Permalink
Closes #907
Browse files Browse the repository at this point in the history
  • Loading branch information
ParticleCore committed Jan 7, 2024
1 parent 909658b commit 0dcb99f
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 32 deletions.
4 changes: 2 additions & 2 deletions bin/update.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
"[email protected]" : {
"updates" : [
{
"version" : "2.0.0",
"version" : "2.0.1",
"update_link" : "https://github.com/ParticleCore/Iridium/raw/master/dist/Iridium.xpi",
"applications" : {
"gecko" : {
"strict_min_version" : "100.0"
"strict_min_version" : "110.0"
}
}
}
Expand Down
Binary file modified dist/Iridium.xpi
Binary file not shown.
23 changes: 2 additions & 21 deletions src/js/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ const Api = {
ini: () => {

browser.runtime.onConnect.addListener(Api.onPortConnect);
browser.action.onClicked.addListener(Util.onBrowserActionClickedListener);
browser.browserAction.onClicked.addListener(Util.onBrowserActionClickedListener);
browser.storage.local.onChanged.addListener(Util.onStorageChangedListener);
browser.storage.sync.get().then(Util.checkSyncStorage);

Expand All @@ -422,23 +422,4 @@ const Api = {
}
}

function checkPermissions() {

const manifestData = browser.runtime.getManifest();
const data = {
origins: manifestData.host_permissions,
permissions: manifestData.permissions
};

browser.permissions.contains(data).then(allAllowed => {
if (allAllowed){
browser.permissions.onAdded.removeListener(checkPermissions);
Api.ini();
} else {
browser.permissions.onAdded.addListener(checkPermissions);
}
});

}

checkPermissions();
Api.ini();
16 changes: 7 additions & 9 deletions src/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"manifest_version": 3,
"manifest_version": 2,
"name": "Iridium for YouTube",
"version": "2.0.0",
"version": "2.0.1",
"description": "YouTube with more freedom",
"default_locale": "en_US",
"options_ui": {
Expand All @@ -15,7 +15,7 @@
"64": "icons/64.png",
"128": "icons/128.png"
},
"action": {
"browser_action": {
"default_icon": {
"16": "icons/16.png",
"32": "icons/32.png",
Expand All @@ -29,7 +29,8 @@
"js/setting-data.js",
"js/background-inject.js",
"js/background.js"
]
],
"persistent": true
},
"content_scripts": [
{
Expand All @@ -46,16 +47,13 @@
"storage",
"webRequest",
"webRequestBlocking",
"webRequestFilterResponse"
],
"host_permissions": [
"*://.youtube.com/*",
"webRequestFilterResponse",
"*://www.youtube.com/*"
],
"browser_specific_settings": {
"gecko": {
"id": "[email protected]",
"strict_min_version": "100.0",
"strict_min_version": "110.0",
"update_url": "https://github.com/ParticleCore/Iridium/raw/master/bin/update.json"
}
}
Expand Down

0 comments on commit 0dcb99f

Please sign in to comment.