Script Summary: Google search... without the crap.
What is it?
NoCrap is a simple and clean HTML bar injected on Google search pages to add some features, but above all to disable a lot of superfluous (IMHO) things!
What does it do? What's the purpose?
NoCrap has an option (that can be disabled) to automatically wrap all search terms with double quotes, so they are forced. This produces way better search results in my opinion, since the search terms need to be somewhere on the pages returned as results by Google. Without those quotes, Google may decide to return a result for a page even if the term you specified is not found on it. Some time ago, you had to use "+" in front of a term to force it. Using double quotes is the new way to do it (see Search single word exactly as is).
Note that NoCrap won't wrap the special terms like: "+term", "-term", "site:term", "OR", etc. so they can still be used without problem.
- Disable Autocomplete (stop Autocomplete)
- Disable Google instant (stop Google instant)
- Disable Live preview (stop Live preview)
- Disable Personalized web search (stop Personalized web search)
- Prevent Google to change a link when you mousedown on it
- Bring back the "Cached" links (show cached links)
Let you disable your cookies on Google, while allowing your preferences to be saved for :
- Number of results per page
- Safe search
- Search type
- Let you choose if you want to display dropdowns below the search field, enabling you to easily modify the default values of the search parameters.
NoCrap will show on those Google pages:
- regular search
- image search
- video search
- news search
- blog search
Why NoCrap Google Search Bar?
- Google is still my favorite search engine (I love you guys, sorry about the name of this script!), but I like it simple.
- I didn't want to use a script that would modify too much of the Google page itself. The NoCrap bar is very simple and can be hidden with one link (or by double-clicking on the bar).
- I always disable all persistent cookies on Google, and I didn't like to have to set my preferences back each time I restarted my browser (for example to set the "number results per page" config)
- But the main reason is that I really prefere my searches to use true "AND"s. If I specify a term, I don't want a result for a page that doesn't contain the term to show in the SERP.
- A limitation of the NoCrap bar is that it may sometimes covers a part of the Google logo. I first tried to shift some HTML elements in the page so they are not covered, but it's hard to deal with all HTML variations and changes Google makes to the pages.
- I'm pretty sure NoCrap only works in Firefox and not in Chrome (didn't really try it yet). To make it work in Chrome will probably be the next feature I'll try to implement for Nocrap...
- I may implement some suggestions, if you see something missing, but I want to keep NoCrap very simple so I won't implement all requests, sorry. Don't be shy to ask, though. In any case you can take the code and modify it as you want!
- If you find a bug, please open a thread on the script forum. I'll try to keep NoCrap as compatible as I can with Google changes.
Version history:2013-09-13 - version 3
In 2.6 a <form> was added around the search input field for the autocomplete feature (from the browser) to work. But the search was actually done by hooking on the submit event of the form, building a search string from the querystring and the selected options, and by calling window.location with this string.
It seems some people had trouble with this new way of launching the search. I think it may have been caused by a conflit between the form submission and the call to window.location. So in version 3, window.location is not used anymore. There is a hook on the form's submit event and options are added to the form itself, as hidden fields... The form submission is then allowed to continue.
Please let me know if you have issues with this new version!
- Renamed the search field "q" so the autocomplete feature (from the browser) is shared with other fields named "q".
- Makes NoCrap "autocomplete" friendly (the "autocomplete" feature of the browser, not the autocomplete of Google search) by wrapping the search input field with a form. Let me know if it breaks something for you...
- Added a configuration to fix NoCrap at the top of the page when scrolling the results.
- Load jquery via https if required.
- Fixed a problem when a search is performed from the url bar directly. The results page was disappearing.
- It seems the method I was using to load jQuery had a problem. Now there shouldn't be any conflit anymore.
- NoCrap in now in sync with the page when the back or forward button is used.
- It is now possible to enable or disable the "add double quotes" feature. Also, the double quotes can be automatically added or removed from a search string, using the "on"/"off" dropdown.
- The "moderate" safe search option is now available.
- Typing done while the page is loading is now managed. That may in some cases result in a blank page with only NoCrap visible (and no sign of Google elements on the page), but the search should still work well.
2012-01-16 - version 1.3
- Prevent Google to change a link when you mousedown on it. This allows you to copy the original link easily using right-click/Copy Link Location. (thanks to Rob W, http://webapps.stackexchange.com/questions/2229... )
- Fix NoCrap handling of the "+" character in a search (ie: "google+")
- Bring back the "Cached" links!
- Added : @include https://encrypted.google.tld/*
- Added a link to NoCrap homepage on userscripts.org, in the config window.
- Some cleanup
- Disable iframes that may battle to get the focus. They are enabled back when NoCrap is closed.
- Fix Google buttons disabling.
- Some code cleaning.
- Version 1.0!
- Fix small focus bug.
- I removed the history for the beta versions.