User:Efitu/monobook.js

function efitu_addRawLink{ var pca = document.getElementById("p-cactions"); var pca_li = pca.getElementsByTagName("ul")[0];

if (!(/^Special:/i).test(wgPageName)) pca_li.appendChild( efitu_newLi("download-source", "Download", "Downloads a copy of the page's source code to your computer.", "http://" + wgContentLanguage + ".wikipedia.org" + wgScript + "?title=" + encodeURIComponent(mw.config.get('wgPageName')) + "&action=raw" ));

}

function efitu_newLi(id, text, title, href){ var li = document.createElement("li"); li.id = id; var a = document.createElement("a"); a.appendChild(document.createTextNode(text)); a.href = href; a.title = title; li.appendChild(a); return li; }

window.addEventListener('load', efitu_addRawLink, false);

importScript('User:AzaToth/twinkle.js');