mirror of
https://github.com/GoogleChrome/chrome-extensions-samples.git
synced 2026-03-27 13:29:34 +07:00
Fix page redder to disregard any chrome internal pages (#651)
This commit is contained in:
committed by
GitHub
parent
e503dee85b
commit
08aa86aca1
@@ -3,8 +3,10 @@ function reddenPage() {
|
||||
}
|
||||
|
||||
chrome.action.onClicked.addListener((tab) => {
|
||||
chrome.scripting.executeScript({
|
||||
target: { tabId: tab.id },
|
||||
function: reddenPage
|
||||
});
|
||||
if(!tab.url.includes("chrome://")) {
|
||||
chrome.scripting.executeScript({
|
||||
target: { tabId: tab.id },
|
||||
function: reddenPage
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user