User:AndyZ/monobook.js/footnote.js

winc('User:Omegatron/monobook.js/addlink.js');

function convertToFootnote{ var usure = confirm("Are you sure you wish to convert all of the external links into footnotes? Remember that this script converts external links underneath =External links= section into footnotes also if run.") if (usure) convertingnow }

function convertingnow{ var memory = document.editform.wpTextbox1.value theText = document.editform.wpTextbox1.value

//the first line converts the beginning of an external link, the second converts the end theText = theText.replace(/\[htt/g," $2") if(memory==theText){ alert("Matched!") } document.editform.wpTextbox1.value = theText }

addOnloadHook(function {    if(document.forms.editform) {        addLink('p-cactions', 'javascript:convertToFootnote', 'Ref', 'ca-unitfixer', 'Converts inline external links to the cite.php footnote system', , );    } });