Stack Apps is a question and answer site for apps, scripts, and development with the Stack Exchange API. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top


enter image description here


Adds three links next to the search box. Allows to open the regular Stackoverflow search in a new tab, or search using Google, or Symbolhound. Proved useful to find duplicates.


Public Domain




Install | View (


// Add search links (SO, Google, Symbolhound), allowing to open them in a new tab
// ==UserScript==
// @name           Stackoverflow Search in Tab
// @version        0.4
// @description    Adds tab-openable links besides the search box
// @namespace      data:,000000000000000000000000000000003fbf49fdcc8f9ddb8de0d10f6a5c32ca
// @include        http://**
// @include        http://**
// @include        http://**
// @include        http://**
// @include        http://**
// @include        http://**
// ==/UserScript==


    // functionality    
    var main = (function(){

        // append empty links next to search box
        $("#search div").append(
            '<span style="position:absolute">'+
            '<a id="q_search1" href="/search?q=..." target=_blank title="Stacksearch, new tab">⬀</a>'+
            '<a id="q_search2" href="//" title=Google>G</a>' +
            '<a id="q_search3" href="//" title=Symbolhound>$</a>'+

        // register update handler to populate ⬀ G $ links
        $("input[name=q]").bind("change input propertychange", function(){
            $("#q_search1").attr("href", "/search?q="+encodeURI(this.value));
            $("#q_search2").attr("href", """+"+encodeURI(this.value));
            $("#q_search3").attr("href", ""+encodeURI(this.value)+"&l=&e=&n=&u=";

        // temporary fix for missing space after [tag]
        var q =;
        if (q.value && q.value != "search") {
            q.value += " ";


    // inject function as last page script, so jQuery is available
    var script = document.createElement('script');
    script.type = "text/javascript";
    script.textContent = '(' + main.toString() + ')();';



Works with Opera.
Tested in Chrome, but shows the links below the search box there.


Runs as injected script, not in Greasemonkey context. But does not load external resources.
Does not update links with pre-existing search box content on page load.
Supposed to respond to key presses and pasted text, at least works in Opera.


Two similar scripts exist for Google or Symbolhound respectively. Alternative searches can be invoked with sh: or gq: prefixes there:

share|improve this question

You must log in to answer this question.

Browse other questions tagged .