Update extension to self-uninstall after update, since Talkdesk now directly support Microsoft Edge

This commit is contained in:
Liam Steckler 2024-10-15 12:34:20 -07:00
parent c67bdecffe
commit 7c3c54bad7
3 changed files with 12 additions and 43 deletions

View file

@ -1,17 +1,8 @@
{ {
"manifest_version": 3, "manifest_version": 3,
"name": "Talkdesk User Agent Switcher", "name": "Talkdesk User Agent Switcher",
"version": "1.0.1", "version": "2.0.0",
"description": "Sets the User Agent header to one from Google Chrome when accessing Talkdesk sites, as they block any other User Agent.", "description": "An extension that previously set the User Agent header to one from Google Chrome when accessing Talkdesk sites, as they blocked any other User Agent. This is no longer required, as Talkdesk has added Microsoft Edge as a supported browser.",
"permissions": [
"declarativeNetRequestWithHostAccess"
],
"host_permissions": [
"*://*.talkdesk.com/*",
"*://*.talkdeskid.com/*",
"*://*.mytalkdesk.com/*",
"*://*.talkdeskapp.com/*"
],
"icons": { "icons": {
"16": "icons/icon-16.png", "16": "icons/icon-16.png",
"32": "icons/icon-32.png", "32": "icons/icon-32.png",
@ -20,14 +11,8 @@
"128": "icons/icon-128.png", "128": "icons/icon-128.png",
"256": "icons/icon-256.png" "256": "icons/icon-256.png"
}, },
"declarative_net_request": { "homepage_url": "https://scm.gruezi.net/buckbanzai/talkdesk-useragent-switcher",
"rule_resources": [ "background": {
{ "service_worker": "service-worker.js"
"id": "talkdesk_useragent_ruleset", }
"enabled": true,
"path": "talkdesk_useragent_rule.json"
}
]
},
"homepage_url": "https://scm.gruezi.net/buckbanzai/talkdesk-useragent-switcher"
} }

View file

@ -0,0 +1,5 @@
chrome.runtime.onInstalled.addListener(() => {
chrome.management.uninstallSelf({
"showConfirmDialog": false
});
});

View file

@ -1,21 +0,0 @@
[
{
"id": 1,
"priority": 1,
"action": {
"type": "modifyHeaders",
"requestHeaders": [
{
"operation": "set",
"header": "User-Agent",
"value": "Mozilla/5.0 (Macintosh; Intel Mac OS X 13_2_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36"
}
]
},
"condition": {
"resourceTypes": [
"main_frame"
]
}
}
]