4 ms·
One feature that I like about DDG is their multiple site search (search string site:123.com,345.com). Startpage or Google, last time I checked a long while bac
by O1111OOO 8y ago
One feature that I like about DDG is their multiple site search (search string site:123.com,345.com).
Startpage or Google, last time I checked a long while back, don't have this feature. Since I use an index.html (as my local home page), I wanted to get something similar to Google's Custom Search (ability to only search a set of specific domains).
At the very top of my index.html, is DDG's search form with radio buttons beneath (for the multiple site searches) - it looks something like this (included a couple of sample radioButtons):
<form method="post" action="https://duckduckgo.com/"> https://duckduckgo.com/">
<center>
<fieldset>
<input type="text" name="q" size="75" maxlength="255" value>
<br>
<input type="submit" name="ddg" value="Search">
<input type="submit" name="local" value="New Tab" formtarget="_blank">
<input type="reset" value="reset">
<br>
<input type="radio" name="sites" value checked>DuckDuckGo
<input type="radio" name="sites" value="github.com,sourceforge.net">FOSS
<input type="radio" name="sites" value="youtube.com,vimeo.com,dailymotion.com,metacafe.com">videos
</fieldset>
</center>
</form>
This is an ad-hoc (poor mans') replacement for Google's CSE (https://cse.google.com/cse/ https://cse.google.com/cse/). Useful for a good number of category types (news, social media, etc) and/or to reduce typing.
It can certainly be improved but it works for me (constantly editing the home page with a lightweight editor so I want to keep it simple).
- komali2 8y agoHah, I never thought to just "write my own" custom homepage, this is so simple and yet so genius. Thanks for the inspiration!
- aasasd 8y agoYou could improve usability by employing ‘submit’ elements instead of all radiobuttons, and offloading the ‘new tab’ functionality to a hotkey: that way, you'd tab-and-enter to fire one of the non-default searches, or Ctrl-enter for a new tab (or Cmd-enter on Mac; though I'm not sure why you'd want to open a new tab from the start page). The hotkey here would have to be implemented with JS. But, in case you're using Firefox, you have an even better option of putting those search options into search keywords such that “ddgv something” would get you to the video search straight from the address bar. In Chrome, IIRC you can do a similar thing by assigning a keyword which would work with “keyword”-tab-searchphrase, but a) I don't remember how it's done, and b) Chrome's address bar doesn't seem to rank searches as domain visits, so a partial keyword entry tends to be replaced with another domain, which is annoying.