Συζητήσεις » Αιτήματα Δημιουργίας

Script creation: Auto-hide or hide Gmail search bar

§
Δημοσιεύτηκε: 03/03/2020
Επεξεργάστηκε: 03/03/2020

Script creation: Auto-hide or hide Gmail search bar

This used to be a feature in Gmelius, but they've since "depreciated" that feature (thanks for asking customers what they wanted) so I'm looking for another option to do this. I've searched and it appears that there was a script that could do this on the old userscripts site.

Can anyone create a script to do this? I'd be eternally grateful.

Thank you!

Deleted user 368327
§
Δημοσιεύτηκε: 06/03/2020
woxxomΣυντονιστής
§
Δημοσιεύτηκε: 06/03/2020
Επεξεργάστηκε: 06/03/2020

You can use any style manager like Stylus extension to add the following CSS:

form[role="search"] {
  display: none;
}

Or autoshow it when hovering the header:

form[role="search"] {
  opacity: 0;
  transition: opacity .25s .25s;
}
header:hover form[role="search"] {
  opacity: 1;
}

You can do it in a userscript as well:

// ==UserScript==
// @name        gmail autohide search
// @match       https://mail.google.com/*
// @grant       GM_addStyle
// ==/UserScript==

GM_addStyle(`
form[role="search"] {
  opacity: 0;
  transition: opacity .25s .25s;
}
header:hover form[role="search"] {
  opacity: 1;
}
`);
§
Δημοσιεύτηκε: 09/03/2020

@wOxxOm

I was looking to hide the entire bar that contains search, but thank you!

woxxomΣυντονιστής
§
Δημοσιεύτηκε: 10/03/2020

Well, you can adjust the selector using devtools so for example it would be .nH.w-asV instead of form[role="search"].

Δημοσίευση απάντησης

Συνδεθείτε για να δημοσιεύσετε μια απάντηση.