MediaWiki:Gadget-searchenginelinks.js
OBS: Efter du har publicerat sidan kan du behöva tömma din webbläsares cache för att se ändringarna.
- Firefox / Safari: Håll ned Skift och klicka på Uppdatera sidan eller tryck Ctrl-F5 eller Ctrl-R (⌘-R på Mac)
- Google Chrome: Tryck Ctrl-Skift-R (⌘-Skift-R på Mac)
- Internet Explorer / Edge: Håll ned Ctrl och klicka på Uppdatera eller tryck Ctrl-F5
- Opera: Tryck Ctrl-F5.
// Sökmotorlänkar
// http://en.wikipedia.org/wiki/Wikipedia:WikiProject_User_scripts/Scripts/Google_link
$(function () {
if (mw.config.get('wgCanonicalNamespace') == "Special")
return; // no links for special pages
var title = mw.config.get('wgTitle');
if (mw.config.get('wgCanonicalNamespace') != "")
title = title.replace(/^.*\//, ""); // subpage name only
var query = encodeURIComponent('"'+title+'"' );
//Googlesökning
mw.util.addPortletLink('p-cactions', 'http://www.google.com/search?ie=utf-8&oe=utf-8&q='+query,
'google', 't-googlesearch', 'Search Google for "'+title+'"', 'G');
//Yahoosökning
mw.util.addPortletLink('p-cactions', 'http://search.yahoo.com/search?ei=UTF-8&p='+query,
'yahoo', 't-yahoosearch', 'Search Yahoo! for "'+title+'"', 'Y');
//Wikiwixsökning
mw.util.addPortletLink('p-cactions', 'http://sv.wikiwix.com/?action='+mw.config.get('wgTitle'),
'wikiwix', 't-yahoosearch', 'Search WikiWix for "'+title+'"', 'W');
});