Answer the question
In order to leave comments, you need to log in
two-faced google
Good day, dear Khabrovites.
In the process of writing a userscript that adds a couple of goodies to the google.ru search page, I discovered a strange (and very unpleasant) thing. It turns out that the page that I see from my work computer and the page that I go to at home are two big differences. For example, a search form at work has id="tsf" and at home it has id="gbqf". Moreover, the difference is not only at the level of IDs - the DOM structure is also different.
In this regard, I have a question: why is this happening and how many more options for this page can be seen from different places? You understand that writing a userscript for a page with a variable structure is not the most pleasant experience.
Answer the question
In order to leave comments, you need to log in
It all depends on the browser. For some, the form does not have an id at all (for example, ipad).
The same for all is form action="/search" and input name=q.
In my opinion, this is quite enough for any user script.
Of course, in both cases, the input I need comes first.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question