How to download script content on all Google pages (international)?

For the Google-Chrome extension, I would like to download script content on all Google pages. What is the best way to do this?

I tried this, in manifest.json , but it does not work:

 "matches": ["http://www.google.*/*", "https://www.google.*/*"], 


This "works", but writing a little, and I don't think this is the best practice:

 "matches": ["http://www.google.com/*", "https://www.google.com/*", "http://www.google.fr/*", "https://www.google.fr/*", "http://www.google.de/*", "https://www.google.de/*", etc..."], 
+6
source share
1 answer

See Compare Templates and Globes . Unfortunately, Google-Chrome does not have a good mechanism for top-level domains (TLDs) in its specification matches . Thus, http://www.google.*/* throws an error, and http://www.google.tld/* ( Greasemonkey syntax ) is not supported.

To work around this, extend the matches parameter and filter the results using the include_globs parameter.
For instance:

 "matches": ["http://*/*", "https://*/*"], "include_globs": ["http://www.google.*/*", "https://www.google.*/*"], 
+14
source

Source: https://habr.com/ru/post/943513/


All Articles