I want to make a custom landing page for when I open a new private tab.
Manage to do it in normal tab with a custom extension:
{
"manifest_version": 3,
"name": "Black Background New Tab",
"version": "1.0",
"description": "Changes the background color of new tabs to black.",
"permissions": ["tabs", "activeTab", "storage"],
"chrome_url_overrides": {
"newtab": "newtab.html"
},
"host_permissions": ["<all_urls>"],
"incognito": "spanning"
}
newtab.html
:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>────────────────────────────────────────────</title>
<style>
<-- some style here
</style>
</head>
<body>
<-- some code here
</body>
</html>
But I cannot make it work in private windows/tabs.
2
Answers
Solved. Manifest.json:
Background.js:
And the newtab.html, only change to show personal data.
Here’s similar question: Can you determine if Chrome is in incognito mode via a script?