Update global context search sample to use country restrictions
Brought to you by:
tomkozak
Originally created by: KirtiRamchandani
Fixes [#1653].
Problem
The global context search sample still described and implemented country-specific Google searches by switching Google domains. That no longer produces a useful visible difference for users, which makes the sample feel outdated even though it still demonstrates the contextMenus API.
Root cause
The sample stored top-level-domain IDs and built URLs such as https://google.ca/search. Modern Google Search localizes results independently of those domains.
Solution
https://www.google.com/search with the cr=countryXX parameter.enabledRegions and update the README/manifest wording to match the new behavior.Tests run
npx eslint api-samples/contextMenus/global_context_search/background.js api-samples/contextMenus/global_context_search/popup.js api-samples/contextMenus/global_context_search/locales.jsnpx prettier --check api-samples/contextMenus/global_context_search/README.md api-samples/contextMenus/global_context_search/background.js api-samples/contextMenus/global_context_search/locales.js api-samples/contextMenus/global_context_search/manifest.json api-samples/contextMenus/global_context_search/popup.jsgit diff --check origin/main..HEAD