Usuário(a):Boivie/monobook.js
Nota: Depois de publicar, poderá ter de contornar a cache do seu navegador para ver as alterações.
- Firefox / Safari: Pressione Shift enquanto clica Recarregar, ou pressione Ctrl-F5 ou Ctrl-R (⌘-R no Mac)
- Google Chrome: Pressione Ctrl-Shift-R (⌘-Shift-R no Mac)
- Internet Explorer / Edge: Pressione Ctrl enquanto clica Recarregar, ou pressione Ctrl-F5
- Opera: Pressione Ctrl-F5.
// Script som försvårar skapandet av lokala filbeskrivningssidor. Ursprungligen skrivet av Daedalus
$(function () {
var nstabimage = document.getElementById("ca-nstab-image");
var talk = document.getElementById('ca-talk');
var edit = document.getElementById('ca-edit');
var hist = document.getElementById('ca-history');
if(wgCanonicalNamespace == "File" && !hist){
//Página descritiva da imagem...
nstabimage.childNodes[0].href = "http://commons.wikimedia.org/wiki/File:" + wgTitle; //ändra bildlänk
nstabimage.childNodes[0].setAttribute('class', 'extiw'); //lägg till .extiw
//Ficheiro Discussão...
if(talk.className == "new") {
talk.removeAttribute('class');
talk.childNodes[0].href = "http://commons.wikimedia.org/wiki/File_talk:" + wgTitle;
talk.childNodes[0].setAttribute('class', 'extiw');
}
//Editar...
edit.childNodes[0].href = "http://commons.wikimedia.org/w/index.php?title=File:" + wgTitle + "&action=edit";
edit.childNodes[0].setAttribute('class', 'extiw');
edit.childNodes[0].innerHTML = 'editar';
}
});