Header
From Wiki Lyrics
(Difference between revisions)
Line 1: | Line 1: | ||
- | + | /* Plik z którego korzystałem znajdziesz tutaj: http://meta.wikipedia.org/wiki/User:Lupo/monobook.js */ | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
+ | function catlinksAtTop() { | ||
+ | /* Przemieszcza linki do kategorii przed treść artykułu. */ | ||
+ | var contents = document.getElementById('column-content'); | ||
+ | var catlinks = document.getElementById('catlinks'); | ||
- | + | if (catlinks != null) { | |
- | + | catlinks.parentNode.removeChild (catlinks); | |
- | + | contents.insertBefore(catlinks, contents.firstChild); | |
- | + | } | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | { | + | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | } | + | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
} | } | ||
+ | function languageAtTop() { | ||
+ | /* Przemieszcza linki do innych wikipedii przed treść artykułu. */ | ||
+ | var contents = document.getElementById('column-content'); | ||
+ | var langlinks = document.getElementById('p-lang'); | ||
- | + | if (langlinks != null) { | |
- | { | + | langlinks.parentNode.removeChild (langlinks); |
- | + | contents.insertBefore(langlinks, contents.firstChild); | |
+ | } | ||
} | } | ||
+ | function navAtTop() { | ||
+ | /* Przemieszcza linki nawigacji na samą góre menu. */ | ||
+ | var contents = document.getElementById('column-one'); | ||
+ | var navig = document.getElementById('p-nav'); | ||
- | . | + | if (navig != null) { |
- | + | navig.parentNode.removeChild (navig); | |
- | + | navig.id = 'get-' + navig.id; | |
+ | contents.insertBefore(navig, contents.firstChild); | ||
+ | } | ||
} | } | ||
+ | function personalAtTop() { | ||
+ | /* Przemieszcza linki osobiste na samą góre menu. */ | ||
+ | var contents = document.getElementById('column-content'); | ||
+ | var personal = document.getElementById('p-personal'); | ||
- | . | + | if (personal != null) { |
- | + | personal.parentNode.removeChild (personal); | |
- | + | personal.id = 'get-' + personal.id; | |
+ | contents.insertBefore(personal, contents.firstChild); | ||
+ | } | ||
} | } | ||
- | + | function bottomTabs() { | |
- | { | + | /* Klonuje linki do edycji i 1 przenosi na sam dół artykułu */ |
- | + | var tabs = document.getElementById('p-cactions').cloneNode(true); | |
+ | /* Give all the named items new ids to avoid id clashes with the existing top "tabs". */ | ||
+ | tabs.id = 'mytabs2'; | ||
+ | var listitems = tabs.getElementsByTagName('LI'); | ||
+ | for (i=0;i<listitems.length;i++) { | ||
+ | if(listitems[i].id) listitems[i].id = 'mytabs-' + listitems[i].id; | ||
+ | } | ||
+ | document.getElementById('column-content').appendChild(tabs); | ||
} | } | ||
- | + | function reformatMyPage() { | |
- | { | + | catlinksAtTop(); |
- | + | languageAtTop(); | |
+ | navAtTop(); | ||
+ | personalAtTop() | ||
+ | bottomTabs(); | ||
} | } | ||
+ | if (window.addEventListener) window.addEventListener("load",reformatMyPage,false); | ||
+ | else if (window.attachEvent) window.attachEvent("onload",reformatMyPage); |
Revision as of 07:05, 14 November 2006
/* Plik z którego korzystałem znajdziesz tutaj: http://meta.wikipedia.org/wiki/User:Lupo/monobook.js */
function catlinksAtTop() {
/* Przemieszcza linki do kategorii przed treść artykułu. */ var contents = document.getElementById('column-content'); var catlinks = document.getElementById('catlinks');
if (catlinks != null) { catlinks.parentNode.removeChild (catlinks); contents.insertBefore(catlinks, contents.firstChild); }
} function languageAtTop() { /* Przemieszcza linki do innych wikipedii przed treść artykułu. */
var contents = document.getElementById('column-content'); var langlinks = document.getElementById('p-lang');
if (langlinks != null) { langlinks.parentNode.removeChild (langlinks); contents.insertBefore(langlinks, contents.firstChild); }
} function navAtTop() { /* Przemieszcza linki nawigacji na samą góre menu. */
var contents = document.getElementById('column-one'); var navig = document.getElementById('p-nav');
if (navig != null) { navig.parentNode.removeChild (navig); navig.id = 'get-' + navig.id; contents.insertBefore(navig, contents.firstChild); }
} function personalAtTop() { /* Przemieszcza linki osobiste na samą góre menu. */
var contents = document.getElementById('column-content'); var personal = document.getElementById('p-personal');
if (personal != null) { personal.parentNode.removeChild (personal); personal.id = 'get-' + personal.id; contents.insertBefore(personal, contents.firstChild); }
}
function bottomTabs() {
/* Klonuje linki do edycji i 1 przenosi na sam dół artykułu */ var tabs = document.getElementById('p-cactions').cloneNode(true); /* Give all the named items new ids to avoid id clashes with the existing top "tabs". */ tabs.id = 'mytabs2'; var listitems = tabs.getElementsByTagName('LI'); for (i=0;i<listitems.length;i++) { if(listitems[i].id) listitems[i].id = 'mytabs-' + listitems[i].id; } document.getElementById('column-content').appendChild(tabs);
}
function reformatMyPage() {
catlinksAtTop(); languageAtTop(); navAtTop(); personalAtTop() bottomTabs();
} if (window.addEventListener) window.addEventListener("load",reformatMyPage,false); else if (window.attachEvent) window.attachEvent("onload",reformatMyPage);