mirror of
https://github.com/usebruno/bruno.git
synced 2024-11-21 23:43:15 +01:00
feat: chrome extension migrate to manifest v3
This commit is contained in:
parent
d91ee36192
commit
075e9162c2
@ -1,4 +1,3 @@
|
||||
(function () {
|
||||
let currentTab = {
|
||||
id: null,
|
||||
url: null,
|
||||
@ -30,7 +29,7 @@
|
||||
}
|
||||
|
||||
// Open the extension tab when the extension icon is clicked
|
||||
chrome.browserAction.onClicked.addListener(function (tab) {
|
||||
chrome.action.onClicked.addListener(function (tab) {
|
||||
if (!currentTab || !currentTab.id) {
|
||||
createNewTab();
|
||||
} else {
|
||||
@ -51,4 +50,3 @@
|
||||
currentTab = {};
|
||||
}
|
||||
});
|
||||
})();
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"manifest_version": 2,
|
||||
"manifest_version": 3,
|
||||
"version": "0.1.0",
|
||||
"name": "Bruno API Client",
|
||||
"short_name": "Bruno",
|
||||
@ -10,17 +10,17 @@
|
||||
"128": "assets/images/logo-128x128.png"
|
||||
},
|
||||
"background": {
|
||||
"scripts": [
|
||||
"js/background.js"
|
||||
]
|
||||
"service_worker": "js/background.js"
|
||||
},
|
||||
"browser_action": {
|
||||
"action": {
|
||||
"default_icon": "assets/images/logo-128x128.png"
|
||||
},
|
||||
"permissions": [
|
||||
"http://*/",
|
||||
"https://*/",
|
||||
"tabs",
|
||||
"storage"
|
||||
],
|
||||
"host_permissions": [
|
||||
"http://*/",
|
||||
"https://*/"
|
||||
]
|
||||
}
|
@ -17,7 +17,10 @@ cp -r packages/bruno-chrome-extension/* chrome-extension
|
||||
|
||||
# Filenames starting with "_" are reserved for use by the system
|
||||
mv chrome-extension/_next chrome-extension/next
|
||||
sed -i 's@/_next/@/next/@g' chrome-extension/**.html
|
||||
sed -i'' -e 's@/_next/@/next/@g' chrome-extension/**.html
|
||||
|
||||
# Remove sourcemaps
|
||||
find chrome-extension -name '*.map' -type f -delete
|
||||
|
||||
# Compress the chrome-extension directory into a zip file
|
||||
zip -r bruno.zip chrome-extension
|
Loading…
Reference in New Issue
Block a user