Extend browser shortcut to search selected text in file contents

General discussion related to "Everything".
horst.epp
Posts: 1642
Joined: Fri Apr 04, 2014 3:24 pm

Re: Extend browser shortcut to search selected text in file contents

Post by horst.epp »

Native2904 wrote: Sun Apr 12, 2026 1:30 pm But we are talking about the case where the search term in Everything’s search bar is no longer enclosed in square brackets?
I did not read the whole story but for me your updated PSPad line doesn't work
with a bookmark from browser, which is the main topic for this thread.
Why should I ever enter such a string manually in the search bar ?
Native2904
Posts: 112
Joined: Mon Nov 22, 2021 8:36 pm

Re: Extend browser shortcut to search selected text in file contents

Post by Native2904 »

If the value is entered manually (e.g. directly in the Everything search bar), you doesn't have angle brackets around the search term.

The new command allows you to support both scenarios: manual input and values passed from the browser.

However, you must first modify the bookmark in your browser so that when you enter a search term, it is not enclosed in angle brackets in Everything...

............

Old Bookmark:

Code: Select all

javascript:location.href='es:addcol:A   A-label:="Content Count"   A:=STRINGCOUNT($content:,search:) content:<'+document.getSelection()+'>';void(0);
produced
2026-04-12_173758.png
2026-04-12_173758.png (12.23 KiB) Viewed 936 times
.
.

New Bookmark:

Code: Select all

javascript:location.href='es:addcol:A A-label:="Content Count" A:=STRINGCOUNT($content:,"'+document.getSelection()+'") content:'+document.getSelection()+'';void(0);
produced:
2026-04-12_173855.png
2026-04-12_173855.png (12.36 KiB) Viewed 936 times
horst.epp
Posts: 1642
Joined: Fri Apr 04, 2014 3:24 pm

Re: Extend browser shortcut to search selected text in file contents

Post by horst.epp »

Ok, thanks now I understand :)
Post Reply