mirror of
https://github.com/anatolykopyl/vk-mute.git
synced 2026-03-26 12:55:13 +00:00
Refactoring and add build-tools
This commit is contained in:
14
src/background/background.js
Normal file
14
src/background/background.js
Normal file
@@ -0,0 +1,14 @@
|
||||
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()]
|
||||
}]);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user