function morelinks() {
   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;
   }
   document.getElementById('column-content').appendChild(tabs);
 }
 if (window.addEventListener) window.addEventListener("load",morelinks,false);
 else if (window.attachEvent) window.attachEvent("onload",morelinks);

// ---------------------------------------
// BEGIN COMMONSUPLOAD
function linkUploadToCommons()
{
    if (document.getElementById("t-commons")) return;
    var li_current = document.getElementById("t-upload");
    if (!li_current) return;
    var li_next = li_current.nextSibling;
    var ul_node = li_current.parentNode;
    var li = document.createElement("li");
    li.setAttribute("id", "t-commons");
    li.setAttribute("title", "Upload et billede eller en anden mediefil til deling for alle landes Wikipediaer");
    li.appendChild(document.createElement("a"));
    li.firstChild.setAttribute("href","http://commons.wikimedia.org/wiki/Special:Upload");
    li.firstChild.appendChild(document.createTextNode("Læg en fil op på Commons"));
    ul_node.insertBefore(li, li_next);
}
aOnloadFunctions[aOnloadFunctions.length] = linkUploadToCommons;
// 
// END COMMONSUPLOAD
// ---------------------------------------

// Velkomstscript
 document.write('<script type="text/javascript" src="' 
     + 'http://da.wikipedia.org/w/index.php?title=Wikipedia:Velkomstscript/velkomst.js' 
     + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');

/* Seneste nye sider - Oversigt i ny boks over seneste nye sider - gule = upatruljerede */
importScript('Bruger:Sir48/Scripts/NewPagePatrol.js');
//npp_refresh = 180
npp_refresh = 60   /*Opdateres hvert 60. sek */
npp_num_idle_req = 100  /* og dette gøres 100 gange før den lukker igen */
//npp_num_pages = 50
npp_num_pages = 20   /* Viser de seneste 10 nyeste */
 
 
/* Seneste ændrede sider - Oversigt i menu til venstre - gule = upatruljerede */
importScript('Bruger:Sir48/Scripts/RecentChangesPatrol.js');
/* rcp_enabled = false */  /* starter ikke op automatisk */
rcp_num_pages = 25 /* antal sider */
rcp_refresh = 60 /* opdaterings interval i sekunder */

//</source>
 
// Adds a tab allowing you to edit the 0th section of a page (the top area usually used as an introduction).
 
// <source lang=javascript>
 
$(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 = mw.util.addPortletLink('p-cactions', url+"&section=0", '0', 'ca-edit-0',
                           'Edit the lead section of this page', '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';
        }
    }
});
 

// Værktøjspunkt til reparation af links til flertydige artikler

$(function () {
mw.util.addPortletLink('p-tb', "http://toolserver.org/~dispenser/cgi-bin/dab_solver.py?page="+wgContentLanguage+":"+encodeURIComponent(mw.config.get('wgPageName')),  'Flertydige', null,  "Reparerer flertydige WL"); 
});

// gør Seneste ændringer selv-opdaterende
// fra https://wiki.toolserver.org/view/RC_Websocket_server
// virker nok ikke som "personligt" script

mw.loader.load('http://wikisource.org/w/index.php?title=MediaWiki:DynamicRC.js&action=raw&ctype=text/javascript');