-
-
Save WebDevBooster/24a498b2dbd43459101b9be9592be37e to your computer and use it in GitHub Desktop.
Setup Page Action on Certain URLS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
chrome.runtime.onInstalled.addListener(function() { | |
chrome.declarativeContent.onPageChanged.removeRules(undefined, function() { | |
chrome.declarativeContent.onPageChanged.addRules([ | |
{ | |
conditions: [ | |
new chrome.declarativeContent.PageStateMatcher({ | |
pageUrl: { urlContains: 'slides.com' }, | |
}) | |
], | |
actions: [ | |
new chrome.declarativeContent.ShowPageAction() | |
] | |
} | |
]); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment