User:Peregrine Fisher/monobook.css
From Wikipedia, the free encyclopedia
If a message on your talk page led you here, please be wary of who left it. Code that you insert on this page could contain malicious content capable of compromising your account. If you are unsure whether code you are adding to this page is safe, you can ask at the appropriate village pump. If this is a .js page, the code will be executed when previewing the page.
Note: After saving, you have to bypass your browser's cache to see the changes. In Internet Explorer and Firefox, hold down the Ctrl key and click the Refresh or Reload button. Opera users have to clear their caches through Tools→Preferences, see the instructions for Opera. Konqueror and Safari users can just click the Reload button.
/********************************* * This script will add links to the Free Image Search Tool (FIST) to articles, images, and categories. * Usage : Add importScript('User:Magnus Manske/add_fist_links.js'); * to your monobook.js file. **********************************/ addOnloadHook ( add_fist_links ) ; function add2toolbox ( url , title ) { var out = '<li>' ; out += '<a href="' + url + '">' + title + '</a></li>' ; var tools = document.getElementById("p-tb") ; tools = tools.getElementsByTagName("ul")[0] ; tools.innerHTML += out ; } function add_fist_links () { if ( wgNamespaceNumber == 0 ) { // Article add2toolbox ( 'http://tools.wikimedia.de/~magnus/fist.php?doit=1&language=' + wgContentLanguage + '&project=wikipedia&datatype=articles¶ms[catdepth]=0¶ms[random]=50¶ms[ll_max]=5¶ms[commons_max]=5' + '¶ms[flickr_max]=5¶ms[include_flickr_id]=1¶ms[gimp_max]=5¶ms[forarticles]=all¶ms[lessthan_images]=3' + '¶ms[jpeg]=1¶ms[png]=1¶ms[gif]=1¶ms[svg]=1¶ms[min_width]=80¶ms[min_height]=80&sources[languagelinks]=1' + '&sources[commons]=1&sources[flickr]=1&sources[gimp]=1&data=' + wgPageName , 'Find free images'); } else if ( wgNamespaceNumber == 6 ) { // Image add2toolbox ( 'http://tools.wikimedia.de/~magnus/fist.php?doit=1&language=' + wgContentLanguage + '&project=wikipedia&datatype=replaceimages¶ms[catdepth]=0¶ms[random]=50¶ms[ll_max]=5' + '¶ms[commons_max]=5¶ms[flickr_max]=5¶ms[include_flickr_id]=1¶ms[gimp_max]=5¶ms[forarticles]=all' + '¶ms[lessthan_images]=3¶ms[jpeg]=1¶ms[png]=1¶ms[gif]=1¶ms[svg]=1¶ms[min_width]=80' + '¶ms[min_height]=80&sources[languagelinks]=1&sources[commons]=1&sources[flickr]=1&sources[gimp]=1' + '&data=' + wgPageName , 'Alternative images'); } else if ( wgNamespaceNumber == 14 ) { // Category add2toolbox ( 'http://tools.wikimedia.de/~magnus/fist.php?doit=1&language=' + wgContentLanguage + '&project=wikipedia&datatype=categories¶ms[catdepth]=0¶ms[random]=50¶ms[ll_max]=5¶ms[commons_max]=5' + '¶ms[flickr_max]=5¶ms[include_flickr_id]=1¶ms[gimp_max]=5¶ms[forarticles]=noimage¶ms[lessthan_images]=3' + '¶ms[jpeg]=1¶ms[png]=1¶ms[gif]=1¶ms[svg]=1¶ms[min_width]=80¶ms[min_height]=80&sources[languagelinks]=1' + '&sources[commons]=1&sources[flickr]=1&sources[gimp]=1&data=' + wgPageName , 'Find free images'); } }