User:Cuckooman4/sandbox.js

/* function addPortlet(before,portletlabel,portletid) { var portletsrc = " " + portletlabel + "  " var portletobj = document.createElement(portletsrc) //document.getElementById("column-one").insertBefore(portletobj,document.getElementById(before)) document.getElementById("column-one").innerHTML += portletsrc } addOnloadHook( function {    addPortlet("p-interaction","favorites","p-fav","f")    mw.util.addPortletLink("p-favorites","javascript:alert","test","f-test","test")  } )