<!-- thumbnail: http://i.imgur.com/IbxlW.png -->
<!-- version: 1.0 -->
<!-- tag: search -->
<!-- excerpt: Uses SymbolHound instead of regular search if query begins with "sh:". -->

##Code

	// ==UserScript==
	// @name        StackExchange SymbolHound Search
	// @description Uses SymbolHound instead of regular search if query begins with "sh:".
	// @version     1.0
	// @include     http://stackoverflow.com/*
	// @include     http://*.stackoverflow.com/*
	// @include     http://serverfault.com/*
	// @include     http://*.serverfault.com/*
	// @include     http://superuser.com/*
	// @include     http://*.superuser.com/*
	// @include     http://stackexchange.com/*
	// @include     http://*.stackexchange.com/*
	// @include     http://askubuntu.com/*
	// @include     http://*.askubuntu.com/*
	// @include     http://stackapps.com/*
	// @include     http://*.stackapps.com/*
	// ==/UserScript==

	document.getElementById("search").addEventListener("submit", function(event){
		var q = document.getElementById("search")["q"].value;
		if (!RegExp("^sh:").test(q))
			return;
		event.preventDefault();
		document.location = "http://symbolhound.com/?q=" +
			encodeURIComponent(q.substr(3)) +
			"&l=&e=&n=&u=" +
			document.domain;	
	});

##About

Ever wanted to search for `&&` on Stack Overflow but couldn't? [SymbolHound](http://symbolhound.com/) makes it possible!

From their website:

> SymbolHound is a new **search engine that doesn't ignore special characters**. This means you can easily search the web for symbols like &, %, and ^, or even less common characters such as ©, ¬, and µ.

See also: <http://stackapps.com/questions/2690/symbolhound-search-stack-overflow-for-special-characters>

**With this User Script, you can override the built-in search with SymbolHound's.**

Just begin type in your query as usual in the search in the upper right corner, but prefix it with `sh:`.

Examples:

* `sh:&&`
* `sh:php <<<`
* `sh:difference between == and ===`

###License

I hereby release this script in the public domain.

###Download

Click [here](http://redtwitz.com/stackexchange-symbolhound-search.user.js) to install this script.

###Platform

This user script has been tested in Google Chrome 17.0.963.6 and Mozilla Firefox 8.0 with Greasemonkey 0.9.13.