mirror of
https://github.com/anatolykopyl/vk-mute.git
synced 2026-03-26 12:55:13 +00:00
14 lines
566 B
JavaScript
14 lines
566 B
JavaScript
chrome.runtime.onInstalled.addListener(function () {
|
|
chrome.storage.sync.set({ isExtensionOn: true }, function () {
|
|
console.log('isExtensionOn: ' + true);
|
|
});
|
|
|
|
chrome.declarativeContent.onPageChanged.removeRules(undefined, function () {
|
|
chrome.declarativeContent.onPageChanged.addRules([{
|
|
conditions: [new chrome.declarativeContent.PageStateMatcher({
|
|
pageUrl: { hostEquals: 'vk.com' },
|
|
})],
|
|
actions: [new chrome.declarativeContent.ShowPageAction()]
|
|
}]);
|
|
});
|
|
}); |