Originally created by: KirtiRamchandani
The global_context_search sample still demonstrates country-specific Google searches by switching between Google country-code domains. That no longer produces a meaningful visible difference in Google Search results, which makes the sample feel outdated.
The sample stores country choices as Google TLDs and builds search URLs like https://google.ca/search. Google Search now generally localizes results independently from the selected domain.
Keep the same chrome.contextMenus flow, but model the popup/menu choices as country regions and open https://www.google.com/search with the cr=countryXX search parameter. The README and manifest description now describe country-restricted Google results instead of different country domains.
npx eslint api-samples/contextMenus/global_context_search/background.js api-samples/contextMenus/global_context_search/locales.js api-samples/contextMenus/global_context_search/popup.jsnpm exec --yes --package prettier@3.3.3 -- prettier --check api-samples/contextMenus/global_context_search/README.md api-samples/contextMenus/global_context_search/manifest.json api-samples/contextMenus/global_context_search/background.js api-samples/contextMenus/global_context_search/locales.js api-samples/contextMenus/global_context_search/popup.jsgit diff --checkFixes [#1653]
Originally posted by: KirtiRamchandani
Closing this as a duplicate of [#1689], which already covers [#1653] with the same country-restricted search update and broader sample copy refresh.
Related
Tickets: #1653
Tickets:
#1689Ticket changed by: KirtiRamchandani