pint/background.js

28 lines
624 B
JavaScript
Raw Normal View History

2022-01-10 03:26:26 +00:00
let accent1 = "#ff0000";
const filter = {
url: [{
urlMatches: 'https://*.google.com/*',
}, ],
};
chrome.runtime.onInstalled.addListener(() => {
chrome.storage.sync.set({
a1: accent1
});
})
2022-01-08 04:49:42 +00:00
chrome.action.onClicked.addListener((tab) => {
chrome.scripting.executeScript({
target: { tabId: tab.id },
2022-01-10 03:26:26 +00:00
files: ['popup.js']
2022-01-10 22:43:45 +00:00
}, () => chrome.runtime.lastError);
2022-01-10 03:26:26 +00:00
});
chrome.tabs.onUpdated.addListener((tabId, changeInfo, tab) => {
chrome.scripting.executeScript({
target: { tabId: tabId },
files: ['onload.js']
2022-01-10 22:43:45 +00:00
}, () => chrome.runtime.lastError);
2022-01-08 04:49:42 +00:00
});