Wikipedia talk:WikiProject User scripts/Scripts/Search links
Installing
editTo install this script, you add the following line to your skin.js.
importScript('Wikipedia:WikiProject User scripts/Scripts/Search links');
As a final step, you need to bypass your cache after installation.
Discussion
editScript won't import
editThis script can't be installed using the "importScript" command because it includes <syntaxhighlight lang=""> tags, which cause an error (see this discussion). Is anyone opposed to removing those tags, since their only purpose is to provide syntax highlighting? If desired, syntax highlighting can be achieved by moving the page to have a ".js" extension. — jwillbur 10:17, 22 July 2010 (UTC)
- Thanks to TheDJ (talk · contribs) for resolving this. PhilKnight (talk) 20:28, 31 August 2010 (UTC)
Style suggestion
editMay I suggest that someone who has edit privileges change the Toolbox item titles for this script to "verb noun", to match the existing Toolbox style ("Upload file"), and to match the tooltip text.
- 'Search web'
- 'Search news'
- 'Search books'
- 'Search scholar'
- 'Search images'
I'd do it, I had edit privileges on this page ;) --Lexein (talk) 14:08, 11 October 2010 (UTC)
Commons and Flickr search
editThis is a great script, thanks for writing it! A suggestion for the image search buttons:
addPortletLink('p-tb', 'http://commons.wikimedia.org/w/index.php?title=Special:Search&search='+query, 'Commons search', 't-commonssearch', 'Search Wikimedia Commons for "'+title+'"', 'C'); addPortletLink('p-tb', 'http://www.flickr.com/search/?l=comm&ss=2&ct=0&mt=all&w=all&adv=1&q='+query, 'Flickr search', 't-flickrsearch', 'Search Flickr for "'+title+'"', 'F');
The first link performs a Wikimedia Commons search; the second searches Flickr for Creative Commons-licensed images that do not include the "noncommercial" (CC-NC) restriction. I find these searches a lot more helpful than a generic Google Images search, since they're more likely to turn up images that are appropriately licensed for Wikipedia. —Tim Pierce (talk) 21:34, 27 March 2011 (UTC)
This script is broken
editI asked Phabricator about this script. I am advised it is broken. Can someone do something? See here: https://phabricator.wikimedia.org/T266993