User:PawełS/monobook.js

//SearchBox document.write(' ');

// en.wikiUser:Dschwen/wikiminiatlas2.js - please include this line document.write(' ');

// en.wikiUser:Zocky/AutoComplete.js document.write(' ');

// Przyciski na dole addOnloadHook(function {    var tabs = document.getElementById('p-cactions').cloneNode(true);    tabs.id = 'mytabs';    var listitems = tabs.getElementsByTagName('LI');    for (i=0;i<listitems.length;i++) {        if(listitems[i].id) listitems[i].id = 'mytabs-' + listitems[i].id;    }    content = document.getElementById("content");    // Find the content div    content.parentNode.insertBefore(tabs, content.nextSibling);    // Place tab list right after content div });

// Adds a "Changes since last load" link to your watchlist.

$(function {    if (!mw.config.get('wgCanonicalSpecialPageName') || mw.config.get('wgCanonicalSpecialPageName') != "Watchlist") return;    if (!document.forms[0] || !document.forms[0].namespace) return;

var link = document.createElement('a'); link.id = 'listSince'; link.href = '#listSince'; // must have a href to show as link!

var then = +(new Date); var fixLinkHref = function { var url = window.location.href.split('#')[0]; var days = ( +(new Date) - then )/(1000 * 3600 * 24); if (url.match(/[?&]days=/)) this.href = url.replace(/([?&]days=)[^&]*/, '$1'+days); else this.href = url + (url.indexOf('?') < 0 ? '?':'&') + 'days=' + days; return true; };   link.onclick = fixLinkHref; link.onmousedown = fixLinkHref; // react to middle clicks too

var frag = document.createDocumentFragment; frag.appendChild(document.createTextNode(' | ')); frag.appendChild(link); link.appendChild(document.createTextNode('Changes')); frag.appendChild(document.createTextNode(' since last load.'));

// just one little ID attribute would be _so_ nice... var nsSelectForm = document.getElementsByTagName('form')[0]; nsSelectForm.parentNode.insertBefore(frag, nsSelectForm); });

// This script adds "Google search" and "Yahoo! search" links to the toolbox. Requires Wikipedia:WikiProject User scripts/Scripts/addLink.

$(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+'"' ); mw.util.addPortletLink('p-tb', 'http://www.google.com.pl/search?ie=utf-8&oe=utf-8&q='+query,                  'Googluj', 't-googlesearch', 'Search Google for "'+title+'"', 'G'); });

// Note: This is now just a thin wrapper around mw.util.addPortletLink from wikibits.js. Please consider using mw.util.addPortletLink directly instead.

function addLink(where, url, name, id, title, key, after) { // addLink accepts either an id or a DOM node, mw.util.addPortletLink only takes a node if (after && !after.cloneNode) after = document.getElementById(after);

return mw.util.addPortletLink(where, url, name, id, title, key, after); }

//