mirror of
https://github.com/ryanamay/pint.git
synced 2024-09-20 01:50:34 +00:00
28 lines
No EOL
560 B
JavaScript
28 lines
No EOL
560 B
JavaScript
let accent1 = "#ff0000";
|
|
|
|
const filter = {
|
|
url: [{
|
|
urlMatches: 'https://*.google.com/*',
|
|
}, ],
|
|
};
|
|
|
|
chrome.runtime.onInstalled.addListener(() => {
|
|
chrome.storage.sync.set({
|
|
a1: accent1
|
|
});
|
|
})
|
|
|
|
chrome.action.onClicked.addListener((tab) => {
|
|
chrome.scripting.executeScript({
|
|
target: { tabId: tab.id },
|
|
files: ['popup.js']
|
|
});
|
|
});
|
|
|
|
|
|
chrome.tabs.onUpdated.addListener((tabId, changeInfo, tab) => {
|
|
chrome.scripting.executeScript({
|
|
target: { tabId: tabId },
|
|
files: ['onload.js']
|
|
});
|
|
}); |