mirror of
https://github.com/GoogleChrome/chrome-extensions-samples.git
synced 2026-03-27 13:29:34 +07:00
@@ -1,14 +1,14 @@
|
||||
chrome.runtime.onInstalled.addListener(({ reason, version }) => {
|
||||
chrome.runtime.onInstalled.addListener(({ reason }) => {
|
||||
if (reason === chrome.runtime.OnInstalledReason.INSTALL) {
|
||||
showReadme();
|
||||
}
|
||||
});
|
||||
|
||||
chrome.action.onClicked.addListener((tab) => {
|
||||
chrome.action.onClicked.addListener(() => {
|
||||
showReadme();
|
||||
});
|
||||
|
||||
function showReadme(info, tab) {
|
||||
function showReadme() {
|
||||
const url = chrome.runtime.getURL('readme.html');
|
||||
chrome.tabs.create({ url });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user