Skip to content

Commit

Permalink
Remove browser action
Browse files Browse the repository at this point in the history
  • Loading branch information
joshka committed Dec 5, 2022
1 parent 9548cc5 commit 660357c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 27 deletions.
24 changes: 1 addition & 23 deletions src/background-script.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,3 @@
function onError(error) {
console.error(`Failed to execute follow content script: ${error}`);
}

browser.browserAction.onClicked.addListener(() => {
browser.tabs
.executeScript({file: "follow-user.js"})
.catch(onError);
});

browser.runtime.onInstalled.addListener(() => {
browser.storage.sync
.get('serverUrl')
.then((results) => {
if (!results || !results.serverUrl) {
browser.storage.sync.set({
serverUrl: 'https://mastodon.social'
});
}
});
});

browser.runtime.onInstalled.addListener(async ({ reason, temporary }) => {
// if (temporary) return; // skip during development
switch (reason) {
Expand All @@ -29,4 +7,4 @@ browser.runtime.onInstalled.addListener(async ({ reason, temporary }) => {
}
break;
}
});
});
4 changes: 0 additions & 4 deletions src/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@
"background-script.js"
]
},
"browser_action": {
"default_icon": "mastodon-logo-purple.svg",
"default_title": "Follow Mastodon User"
},
"options_ui": {
"page": "options.html",
"browser_style": true,
Expand Down

0 comments on commit 660357c

Please sign in to comment.