Answer the question
In order to leave comments, you need to log in
Userscripts in Chrome
I'm trying to learn user scripting. I am writing the simplest script with an alert. Alert should take off only when we go to the google site. The code:
// ==UserScript==
// @name GA
// @description Google alert
// @include http://www.google.com/*
// @include http://google.com/*
// @include https://www.google.com/*
// @include http://www.google.com/*
// @include http://www.google.ru/*
// @include http://google.ru/*
// @include https://www.google.ru/*
// @include http://www.google.ru/*
// ==/UserScript==
alert ("Привет, мир!");
Answer the question
In order to leave comments, you need to log in
I could have forgotten something, but the user script must be installed via Greasemonkey, which just knows how to read these include . Otherwise, it reads like a regular script that starts executing right away.
You can also write www.google.tld/ * if you want to include all countries.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question