Skip to content

Commit

Permalink
background task to update existing tabs to CSS changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Wang committed Dec 15, 2022
1 parent 623a2ba commit 3440649
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions background.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,10 @@ chrome.runtime.onInstalled.addListener((object) => {
chrome.tabs.create({
url: "https://typefully.com/minimal-twitter/welcome",
});
chrome.tabs.query({ url: "*://twitter.com/*" }, (tabs) => {
tabs.forEach((tab) => {
chrome.tabs.reload(tab.id);
});
});
}
});
2 changes: 1 addition & 1 deletion bundle-extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ let manifest = {
48: "images/MinimalTwitterIcon48.png",
128: "images/MinimalTwitterIcon128.png",
},
permissions: ["storage"],
permissions: ["storage", "tabs"],
options_ui: {
page: "index.html",
open_in_tab: true,
Expand Down

0 comments on commit 3440649

Please sign in to comment.