Reputation: 83
I'm using the following code for the chrome extension is to be active for a particular host.
chrome.declarativeContent.onPageChanged.removeRules(undefined, function() {
chrome.declarativeContent.onPageChanged.addRules([{
conditions: [new chrome.declarativeContent.PageStateMatcher({
pageUrl: {hostEquals: 'www.google.com'},
})],
actions: [new chrome.declarativeContent.Sho``wPageAction()]
}]);
});
I want it to be active for all the hosts.
Upvotes: 3
Views: 1233
Reputation: 5557
You can use hostContains: '.'
which activates your extension for all hosts. I've tested this and it's working for all hosts.
Upvotes: 8