You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
600 B
20 lines
600 B
chrome.runtime.onInstalled.addListener(function () {
|
|
chrome.storage.sync.set({color: '#3aa757'}, function () {
|
|
console.log("The color is green.");
|
|
});
|
|
|
|
chrome.declarativeContent.onPageChanged.removeRules(undefined, function () {
|
|
chrome.declarativeContent.onPageChanged.addRules([{
|
|
conditions: [new chrome.declarativeContent.PageStateMatcher({
|
|
pageUrl: {hostEquals: 'www.youtube.com'},
|
|
})
|
|
],
|
|
actions: [new chrome.declarativeContent.ShowPageAction()]
|
|
}]);
|
|
});
|
|
|
|
let i = 0;
|
|
setInterval(() => {
|
|
console.log(`${++i}s since start`)
|
|
}, 1000);
|
|
});
|