14 lines
434 B
TypeScript
14 lines
434 B
TypeScript
|
/// <reference types="chrome"/>
|
||
|
|
||
|
chrome.runtime.onInstalled.addListener(function () {
|
||
|
// Make extension work on all pages
|
||
|
chrome.declarativeContent.onPageChanged.removeRules(undefined, function () {
|
||
|
chrome.declarativeContent.onPageChanged.addRules([
|
||
|
{
|
||
|
conditions: [new chrome.declarativeContent.PageStateMatcher({})],
|
||
|
actions: [new chrome.declarativeContent.ShowPageAction()],
|
||
|
},
|
||
|
]);
|
||
|
});
|
||
|
});
|