//

// Adds toolbox links to search Google web, news archive, books, scholar, and images for the title of the page.

addOnloadHook(function () {
    if (wgCanonicalNamespace == "Special")
        return;  // no links for special pages

    var title = wgTitle;
    if (wgCanonicalNamespace != "")
        title = title.replace(/^.*\//, "");  // subpage name only

    var query = encodeURIComponent('"'+title+'" -Wikipedia' );
    mw.util.addPortletLink('p-tb', 'http://www.google.com/search?&q='+query,
                   'आंतरजाल शोध', 't-googlesearch', 'Search Google for "'+title+'"', 'W');
    mw.util.addPortletLink('p-tb', 'http://news.google.com/archivesearch?&as_price=p1&as_src=-newswire+-wire+-presswire+-PR+-press+-release&q='+query,
                   'बातमी शोध', 't-googlenewssearch', 'Search Google News Archive for "'+title+'"', 'N');
    mw.util.addPortletLink('p-tb', 'http://books.google.com/books?&as_brr=0&as_pub=-icon&q='+query,
                   'पुस्तक शोध', 't-googlebookssearch', 'Search Google Books for "'+title+'"', 'B');
    mw.util.addPortletLink('p-tb', 'http://scholar.google.com/scholar?&q='+query,
                   'स्कॉलर शोध', 't-googlescholarsearch', 'Search Google Scholar for "'+title+'"', 'S');
    mw.util.addPortletLink('p-tb', 'http://images.google.com/images?q='+query,
                   'चित्र शोध', 't-googleimagesearch', 'Search Google Images for "'+title+'"', 'I');
});

//