Solved Allow hiding the search command from address bar dropdown
-
@greybeard said in Address Bar Search: Remove "Search Google":
I do not get this ussue
This is about searching from the address bar, not using the search box as you have enabled shown above.
Enable Search in Address Field and you'll see the what's going on.
-
@7twenty Yep, I get you.
But you are using a Mod, correct?
I am not. -
@greybeard said in Address Bar Search: Remove "Search Google":
But you are using a Mod, correct?
Yes, but the mod doesn't change the way the keyboard works with the dropdown.
Mod disabled:
Enter search term
Down goes to Search [search engine]
Down again goes to bookmarks/typed whatever is thereMod enabled:
Enter search term
Down goes "nowhere", but is actually highlighting the hidden Search [search engine]
Down again goes to bookmarks/typed whatever...Ideally the first down press should go straight to bookmarks/typed whatever...
Might seem a lot of effort for one keypress, and there's a few things i'd prefer fixed/added before this, but this seems one of the simpler ones.
Might have to really get stuck into learning more JS and see what i can come up with.
-
Btw, I thought I'd try asking the AHK team for you, but...
-
I just had a thought, try implementing the mod this way instead of using just display: none. I haven't had any time for myself, so haven't tested it yet, but I wanted to quickly post in case it helps. Let me know if there is any change in the behavior.
.OmniDropdown-Collection:first-child { visibility: collapse; width: 0; margin: 0; height: 0; }
Another thought, isn't there actually 2 lines shown between the address field and the header for search suggestions? The first reads "Search Google" and the next shows the search term, if I recall without being at a computer.
If the above code doesn't do the trick, then perhaps the selector needs to be modified, such that both the first & second child match. Instead of the
:first-child
pseudo-class use thenth-child(n)
pseudo-class to select both lines. I'd only try this if the above code doesn't work, otherwise this might remove the first suggestion.Something like:
.OmniDropdown-Collection:nth-child(1), .OmniDropdown-Collection:nth-child(2) { // insert same code as above here }
Hope this helps.
Edit: it would be good if someone who knows CSS reviews my code in this post. I'm half asleep writing this, but I need to go to bed and deal with the absentee contractor tomorrow morning. Thanks.
-
Option #1 doesn't seem to be any different to the original mod using just
display:none
Option #2 makes things worse. It's hiding the 2nd group of items, bookmarks in my testing. in the dropdown. So you just end up cycling through those in the address bar with no visual clue where they're from.
@bonetone said in Address Bar Search: Remove "Search Google":
isn't there actually 2 lines shown between the address field and the header for search suggestions? The first reads "Search Google" and the next shows the search term
Correct.
.OmniDropdown-Collection
is the selector that contains both.
.OmniDropdown-Label
is the search label,
.omni-clickable.OmniLinkItem.OmniLinkItem--SingleValue
is the next line with the text to be searched.Unless there's someone that knows something more, i'm thinking that JS is the only way to make this happen correctly and remove the selector completely.
EDIT: done some digging and clarified some bits.
-
This page describes how to use JS to remove an element from the page. It points out that it requires using the parent and selecting the child, but we're already doing that with the CSS so no extra work there. But it looks like just a short couple lines of code will get the job done.
If you don't already know how to add JS mods to the browser, the pinned post in the Modifications category explains it. You'll have to reapply the mod after every upgrade so make sure to keep a copy of your code in some other location.
-
I actually found my way to that site a while back. That's how i got the code posted here.
Have been playing around with this, and now it's making more sense in what it does, and how it works....
setTimeout(function wait() { const thingToRemove = document.querySelectorAll('.OmniDropdown-Collection')[0]; if (thingToRemove != null) { thingToRemove.parentNode.removeChild(thingToRemove); } else { setTimeout(wait, 300); } }, 300);
except:
1/ It only works the first time the dropdown is shown, then fails after that. So i'm guessing that's because it's being called bysetTimeout(function wait()
. So needs it's own function and to be called when the dropdown is created.
2/ It still seems to do the same as the original mod, which i don't understand.Regardless, it's been interesting to play around with. It's all making more sense and have been learning to use the Devtools console more instead of updating the .js file and restarting the browser.
So this also got me thinking. We know how to hide the element, which is simple and works. Why can't we just make the
.omni-clickable.OmniLinkItem.OmniLinkItem--SingleValue
a label which isn't selectable and just hide that?Will start looking into that and see if that's a possibility.
-
@bonetone said in Address Bar Search: Remove "Search Google":
... You'll have to reapply the mod after every upgrade so make sure to keep a copy of your code in some other location.
I've no knowledge on .js scripts, but just out of curiosity, is there no way to use, e.g., the custom browser feature to call on a pre-defined script in-line? From what I've seen, the feature works similar to hotstrings and gets applied as a prefix -- in place of whatever string gets defined as a shortcut -- when the search is executed, right? Since .js can be directly invoked through the omnibox, assuming this would work, wouldn't the script be saved persistently?
-
i don't even use suggestions at all, so removing this field would create mayhem
-
I like to bump that thread again
is there a now a plan to disable suggestions at all or at least remove that line for default search?
can i do something to start or improve progress here? -
Bump!
I just like you to know that I'm still interested in an option to remove search suggestions in the address bar (or at least not on the first line) - but still have the search functionality enabled.
It's a bit annoying if I always need to press arrow down twice (instead of 0 times) to have the most frequently visited page selected. -
It was quite annoying indeed. Solved it with just one click.!
Deselect the option "Search in Address Field" and done.
You can copy my setting to make the Vivaldi address bar look like Chrome.
Doing this, the search bar looks like:
Enjoy and don't forget to have a great day.
-
This inspired me to remove Google search altogether: both from Vivaldi itself, and from my Surfingkeys search aliases.
-
Just another request to allow us to remove this, it's redundant and useless.
Typing something and hitting enter is exactly the same as down + enter, it just wasted space and adds clutter to the address bar. -
@randpc It is already removable.
-
@ayespy said in Address Bar Search: Remove "Search Google":
It is already removable.
Can you please elaborate... it's still the same as far as i can tell. Using 4.0.2312.24.
-
@7twenty You can remove the Google search engine, you can turn off search suggestions in the addressbar, you can turn off suggestions in the search bar, you can remove the search bar, you can turn off bookmark preference for drop-down, you can turn off search in the addressbar, etc. Which of these things do you want to do?
-
@ayespy said in Address Bar Search: Remove "Search Google":
Which of these things do you want to do?
None of those.
As stated in the first post - remove the "Search <search engine>" section from the dropdown, while leaving the ability to search from the address bar.
-
@7twenty So I just set up an instance to search from the address bar with no drop down at all. How would you modify that to suit you?