Gebruiker:Erik Baas/monobook.js

Uit Wikibooks

Ga naar: navigatie, zoek

Hulp bij het instellen van uw voorkeuren Let op! Nadat u de veranderingen heeft opgeslagen, moet u de cache van uw browser nog legen om ze daadwerkelijk te zien. In onderstaande tabel staat aangegeven hoe u dit doet.

Mozilla reload (of ctrl-r)
IE ctrl-f5
Opera f5
Safari cmd-r
Konqueror ctrl-r
// === Unwatchlink per item op volglijst ===
// Geeft op de volglijst een link "niet volgen" bij elk artikel
// Nieuwe versie d.d. 20070926
 
addOnloadHook(function () {
 
    // Alleen voor "Volglijst":
    if (window.location.href.indexOf("Speciaal:Volglijst") == -1) return; 
 
    // Niet voor "Volglijst bekijken en bewerken":
    if (window.location.href.indexOf("Speciaal:Volglijst&action=edit") > 0) return;
 
    // Idem, via link op "Ruwe volglijst bewerken":
    if (window.location.href.indexOf("Speciaal:Volglijst/edit") > 0) return; 
 
    var query_prefix = "&action=unwatch";
 
    var links = document.getElementById('content').getElementsByTagName('a');
    for (var i = 0; i < links.length; i++) {
        if (links[i].href.substring(links[i].href.length-15) != '&action=history')
            continue;
        var unwatch = document.createElement('a');
        unwatch.href = "/w/index.php?title=" + encodeURIComponent(links[i].title) + query_prefix;
        unwatch.title = "unwatch "+links[i].title;
        unwatch.appendChild(document.createTextNode("niet volgen"));
        links[i].parentNode.insertBefore(unwatch, links[i].nextSibling);
        // kluge to handle case where "diff" is unlinked:
        var delim = links[i].previousSibling;
        delim = (delim.nodeType == 3 ? delim.nodeValue : "");
        links[i].parentNode.insertBefore(document.createTextNode(delim.replace(/^.*diff/, "")), unwatch);
    }
});
 
/* Accesskey "v" voor onderste button op history-pages uitschakelen */
if (wgAction == "history") {
 addOnloadHook(function() {
  var node_list = document.getElementsByTagName('input');
  for (var i = node_list.length - 1; i > -1; i--) {
   var node = node_list[i];
   if (node.getAttribute('type') == 'submit') {
    if (node.value == "Aangevinkte versies vergelijken") {
     node.accessKey="";
     break;
    }
   }
  } 
 });
}
 
/* Extra links in sidebar */
addOnloadHook(function() {
 addPortletLink('p-navigation', "/wiki/Wikibooks:Zandbak", "Zandbak", 'tb-zandbak');
});
addOnloadHook(function() {
 addPortletLink('p-coll-create_a_book', "/wiki/Categorie:Wikibooks:Boeken", "Boeken", 'tb-collecties');
});
 
/* Extra tab: edit section 0 */
addOnloadHook(function () {
    var x;
    if (!(x = document.getElementById('ca-edit') )) return;
    var url;
    if (!(url = x.getElementsByTagName('a')[0] )) return;
    if (!(url = url.href )) return;
    var y = addPortletLink('p-cactions', url+"&section=0", '0', 'ca-edit-0',
                           'Bewerk de eerste sectie van deze pagina', '0', x.nextSibling);
 
    y.className = x.className;  // steal classes from the the edit tab...
    x.className = 'istalk';     // ...and make the edit tab have no right margin
 
    // exception: don't steal the "selected" class unless actually editing section 0:
    if (/(^| )selected( |$)/.test(y.className)) {
        if (!document.editform || !document.editform.wpSection
            || document.editform.wpSection.value != "0") {
            y.className = y.className.replace(/(^| )selected( |$)/g, "$1");
            x.className += ' selected';
        }
    }
});
Informatie afkomstig van http://nl.wikibooks.org Wikibooks NL.
Wikibooks NL is onderdeel van de wikimediafoundation.
Persoonlijke instellingen