Skip to content

Commit

Permalink
Start of Manifest V3 Migration
Browse files Browse the repository at this point in the history
For issue #128
  • Loading branch information
XjSv committed May 26, 2022
1 parent ae5be14 commit 993256e
Show file tree
Hide file tree
Showing 13 changed files with 46 additions and 31 deletions.
3 changes: 2 additions & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ Versions that are currently being supported with security updates.

| Version | Supported |
| ------- | ------------------ |
| 2.9.0 | :white_check_mark: |
| 3.0.0 | :white_check_mark: |
| 2.9.0 | :x: |
| 2.8.1 | :x: |
| 2.8.0 | :x: |
| 2.7.0 | :x: |
Expand Down
3 changes: 2 additions & 1 deletion css/content.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 8 additions & 7 deletions js/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,22 +48,22 @@ function updateCount(tabId, isOnRemoved) {
length--;
}

browser.browserAction.setBadgeText({ text: length.toString() });
browser.action.setBadgeText({ text: length.toString() });

if (length > TAB_COUNT_COLOR_LIMIT) {
browser.browserAction.setBadgeBackgroundColor({ 'color': TAB_COUNT_COLOR_HIGH });
browser.action.setBadgeBackgroundColor({ 'color': TAB_COUNT_COLOR_HIGH });
} else {
browser.browserAction.setBadgeBackgroundColor({ 'color': TAB_COUNT_COLOR_LOW });
browser.action.setBadgeBackgroundColor({ 'color': TAB_COUNT_COLOR_LOW });
}
});
} else {
browser.browserAction.setBadgeText({ text: '' });
browser.action.setBadgeText({ text: '' });
}
});
}

function clearCount() {
browser.browserAction.setBadgeText({ text: '' });
browser.action.setBadgeText({ text: '' });
}

function updateContent(tabId) {
Expand Down Expand Up @@ -92,8 +92,9 @@ function updateContent(tabId) {
}

if (urlFound) {
browser.tabs.executeScript(tabId, {
file: '/js/content.min.js'
browser.scripting.executeScript({
target: {tabId: tabId},
files: ['/js/content.min.js']
}).then(() => {
browser.tabs.sendMessage(tabId, {
command: 'addRibbon',
Expand Down
3 changes: 2 additions & 1 deletion js/background.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 993256e

Please sign in to comment.