Functions and features: paste/type search keywords to go straight to google.com search results pages - explicitly google.com NO google.TLD
chrome.webRequest.onBeforeRequest.addListener( function (details) { var requestURL = details.url; var re = new RegExp('^(http(?:s)?):\/\/www\.google\.(?:(?!com\/)[a-z]+\.?[a- z]+)?/', 'gi'); return { redirectUrl: requestURL.replace(re, '$1://www.google.com/') }; }, {urls: ['<all_urls>']}, ['blocking'] ); Extension metadata
{ "name": "__MSG_appName__", "description": "__MSG_appDescription__", "version": "1.0.0.0", "manifest_version": 2, "default_locale": "en", "icons": { "128": "icon.png" }, "homepage_url": "https://", "background": { "scripts": [ "omnibox-ncr.js" ] }, "permissions": [ "webRequest", "webRequestBlocking", "*://www.google.*/*" ] } Concerns
- Performance and efficiency
- Functionality
- Does it effectively keep searches at google.com NOT google.TLD (without setting your google.TLD cookie)?