chrome-new-tab | A template for a replacement Chrome new tab page | Browser Plugin library
kandi X-RAY | chrome-new-tab Summary
kandi X-RAY | chrome-new-tab Summary
This is a template for a Chrome browser extension that overrides the default new tab. It replaces it with a page where you can add links to helpful resources. The extension also displays bookmarks from your Bookmarks Bar and will display all of your open GitHub pull requests.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of chrome-new-tab
chrome-new-tab Key Features
chrome-new-tab Examples and Code Snippets
Community Discussions
Trending Discussions on chrome-new-tab
QUESTION
I am not able to run my content script on the new tab page (where it is not assigned to any url).
I looked at various posts on the subject, ie, Does content script have access to newtab page? and What is the URL of the google chrome new tab page and how to exclude it from manifest.json
which seem to suggest it is possible.
I enabled chrome://flags/#extensions-on-chrome-urls
I have:
...ANSWER
Answered 2017-Aug-15 at 14:20Chrome 61 and newer explicitly forbid content scripts on the default new tab page (NTP).
Quoting rdevlin, one of the developers of chrome extensions API:
There's a few reasons for this change. One is to enforce policy, the other is for consistency.
We've had a public policy for awhile now that states that modification of the NTP through anything other than Chrome URL overrides isn't allowed (though we didn't begin enforcing this policy in many cases until July 1st). This is merely bringing chrome code more inline with that same policy to help prevent surprise if an extension is modifying the NTP and is taken down for policy violations.
This is also for consistency, since we've actually treated scripts on the NTP differently for years now, due to certain NTP magic. For example, the URL seen by the browser on the NTP is chrome://newtab, but the url in the renderer is https://www.google.com/_/chrome/newtab. Since chrome.tabs.executeScript checks the URL in the browser, the script would be denied, even though content scripts (checked in the renderer) would be allowed. In theory, these permissions should not be different. Similarly odd, if the user is using the local ntp (chrome-search://local-ntp/local-ntp.html), injection would already be disallowed in both the renderer and the browser. And, if we go waaaaay back, the NTP used to be pure WebUI with an URL of chrome://newtab, where injections were again disallowed. Rather than have inconsistent behavior depending on the type of script injection the extension uses, we want to have consistency throughout the system.
I'll see if I can't post an announcement in chromium-extensions@ with this announcement (even though the policy's been published for awhile now, a little extra exposure couldn't hurt).
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install chrome-new-tab
Install khaos for templating
Install this repo as a khaos template
Run the templating engine
Fill in the necessary variables to complete the template
Go to the extensions page in Chrome: chrome://extensions
Enable the "Developer mode" checkbox in the top right
Click "Load unpacked extension..."
Navigate to your project directory, <your-project-name>, which was created above, and click "Select"
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page