Обсуждения » Обсуждение сайта Greasy Fork

Need a Google script/solution (Google results)

§
Создано: 24.07.2021
Отредактировано: 24.07.2021

Hello friends!

I'm curious, is there a way to customize the Google results page?
For example, when I Google "metal engineering london" I get this:
http://prnt.sc/1f91gmr
When I click "view all" I get this:
http://prnt.sc/1f91uls
What I need to achieve is to show only the left "frame" i.e. no top part with the search bar and the map. Just left side in full width, scrollable (like a regular page).

Is it possible to achieve?
Thank you!

Like that?

#rhs -> display: none;
#center_col -> width: 100%;

Yes, perfect! Maybe even without the top part, so it can be properly scrollable (the whole page).
BTW, where should I put the code?

// ==UserScript==
// @name          Google search: hide map when viewing companies list
// @description   Also removes score and opening hours filters bar
// @author        Konf
// @version       1.0.0
// @namespace     https://greasyfork.org/users/424058
// @icon          https://www.google.com/s2/favicons?domain=google.com&sz=32
// @include       /^http(s|):\/\/(www\.|)google\.(com|net|de|ru|co\.uk)\/search.*(\?|\&)tbm=lcl.*$/
// @compatible    Chrome
// @compatible    Opera
// @compatible    Firefox
// @run-at        document-start
// @grant         GM_addStyle
// @noframes
// ==/UserScript==

GM_addStyle(`
  div#rhs, div#rllhd__fldhc { display: none }
  div#center_col { width: 100% }
`);
§
Создано: 24.07.2021
Отредактировано: 24.07.2021

If you don't need any top bar at all

// ==UserScript==
// @name          Google search: hide stuff when viewing companies list
// @description   The script stretches companies list to full page view
// @author        Konf
// @version       2.0.0
// @namespace     https://greasyfork.org/users/424058
// @icon          https://www.google.com/s2/favicons?domain=google.com&sz=32
// @include       /^http(s|):\/\/(www\.|)google\.(com|net|de|ru|co\.uk)\/search.*(\?|\&)tbm=lcl.*$/
// @compatible    Chrome
// @compatible    Opera
// @compatible    Firefox
// @run-at        document-start
// @grant         GM_addStyle
// @noframes
// ==/UserScript==

GM_addStyle(`
  div#rhs, div#rllhd__fldhc, div#sfcnt, div#searchform { display: none }
  div#center_col { width: 100% }
  div#cnt { padding-top: 0 }
`);

where should I put the code?

https://greasyfork.org/help/installing-user-scripts

Absolutely fantastic!!! You're the best! Thank you very VERY much!!! It'll save hours of my life!!!
God bless you!!!

Ответить

Войдите, чтобы ответить.