|
@ -1,12 +1,12 @@ |
|
|
chrome.runtime.onInstalled.addListener(function() { |
|
|
|
|
|
chrome.storage.sync.set({color: '#3aa757'}, function() { |
|
|
|
|
|
|
|
|
chrome.runtime.onInstalled.addListener(function () { |
|
|
|
|
|
chrome.storage.sync.set({color: '#3aa757'}, function () { |
|
|
console.log("The color is green."); |
|
|
console.log("The color is green."); |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
chrome.declarativeContent.onPageChanged.removeRules(undefined, function() { |
|
|
|
|
|
|
|
|
chrome.declarativeContent.onPageChanged.removeRules(undefined, function () { |
|
|
chrome.declarativeContent.onPageChanged.addRules([{ |
|
|
chrome.declarativeContent.onPageChanged.addRules([{ |
|
|
conditions: [new chrome.declarativeContent.PageStateMatcher({ |
|
|
conditions: [new chrome.declarativeContent.PageStateMatcher({ |
|
|
pageUrl: {hostEquals: 'developer.chrome.com'}, |
|
|
|
|
|
|
|
|
pageUrl: {hostEquals: 'youtube.com'}, |
|
|
}) |
|
|
}) |
|
|
], |
|
|
], |
|
|
actions: [new chrome.declarativeContent.ShowPageAction()] |
|
|
actions: [new chrome.declarativeContent.ShowPageAction()] |
|
|