Naar inhoud springen

Gebruiker:Effeietsanders/monobook.js

Uit Wikipedia, de vrije encyclopedie

Opmerking: na het publiceren is het wellicht nodig uw browsercache te legen om de veranderingen te zien.

  • Firefox / Safari: houd Shift ingedrukt terwijl u:je op Vernieuwen klikt of druk op Ctrl-F5 of Ctrl-R (⌘-Shift-R op een Mac)
  • Google Chrome: druk op Ctrl-Shift-R (⌘-Shift-R op een Mac)
  • Edge: houd Ctrl ingedrukt terwijl u:je op Vernieuwen klikt of druk op Ctrl-F5.
/**
 * [[Gebruiker:Effeietsanders]]'s monobook.js, based on [[:en:User:Bookofjude]]'s monobook.js, based on 
 * primarily on [[:en:User:Wayward]]'s, 
 * which in turn is based on [[:en:User:Alphax/monobook.js]]'s
 * with many of [[:en:User:Wayward]]'s own mods
 * Must use [[:en:User:Wayward/monobook.css]] for full tab functionality
 * Forked from [[:en:User:ABCD/monobook.js]] around April 2005
 * Dual licensed under the GFDL and GPL
 * See also: [[:en:User:JesseW/monobook.js]]
 * And best of all: [[:en:WP:US]]
 **/

// <nowiki>

/*** Hooks ***/
$(AddTime);

/*** Adds a link for the clock ***/
function AddTime() {
	var toplinks = document.getElementById('p-personal').getElementsByTagName('ul')[0];
	addlilink(toplinks, '#', '', 'utcdate');
	showtime();
}

/*** Auto-updating clock ***/
function showtime() {
        var timerID;
        var now = new Date();
        var timeValue = now.toLocaleString().replace(/GMT/, "UTC");
        document.getElementById('utcdate').firstChild.innerHTML = timeValue;
        timerID = setTimeout('showtime()', 100);
}

/* <pre><nowiki> */
function addlilink(tabs, url, name, id, title, key){
    var na = document.createElement('a');
    na.href = url;
    na.appendChild(document.createTextNode(name));
    var li = document.createElement('li');
    if(id) li.id = id;
    li.appendChild(na);
    tabs.appendChild(li);
    if(id)
    {
        if(key && title)
        {
            ta[id] = [key, title];
        }
        else if(key)
        {
            ta[id] = [key, ''];
        }
        else if(title)
        {
            ta[id] = ['', title];
        }
    }
    // re-render the title and accesskeys from existing code in wikibits.js
    akeytt();
    return li;
}

//knopje voor eia
if(location.href.match(/action=(edit)|(submit)/)) {
  if (window.addEventListener) {
    window.addEventListener("load", eiaKnopjes, false);
  } else if (window.attachEvent) {
    window.attachEvent("onload", eiaKnopjes);
  }
}

function eiaKnopjes() {
   str = " <input type=button value=WikiPortrait onclick=\"WikiPortrait()\" class=subbutt> <input type=button value=FotoGewenst onclick=\"FotoGewenst()\" class=subbutt>";
   document.getElementById("editpage-copywarn").innerHTML="<form action=\"\">"+str+"</form><br/>"+document.getElementById("editpage-copywarn").innerHTML;
   return false;
}

function WikiPortrait() {
   insertTags('[[','|200px]]','');
   document.forms.editform.wpSummary.value = 'WikiPortrait-uploaded image insertion. See http://commons.wikimedia.org/wiki/Category:Wikiportrait_uploads';
return true;
}

function FotoGewenst() {
   insertTags('{{fotogewenst','}}\n','');
   document.forms.editform.wpSummary.value = '{{fotogewenst}} - nog geen foto beschikbaar';
return true;
}
//</nowiki>