User:Kjoonlee/vector.js

popupDelay=0.7; popupHideDelay=0.2;

var moreEditToolsObj = 'editpage-specialchars'; var moreEditToolsList = ['ʼ','p͈','t͈','k͈']; if((mw.config.get('wgAction') == 'edit' || mw.config.get('wgAction') == 'submit') && window.moreEditToolsList) addOnloadHook(moreEditTools) function moreEditTools { var obj = document.getElementById(moreEditToolsObj); var span = document.createElement('span') span.setAttribute('id','edittools_more_ipa'); span.setAttribute('class','IPA'); for(var i=0;i<moreEditToolsList.length;i++) { var a = document.createElement('a'); a.setAttribute('onClick','insertTags("' + moreEditToolsList[i] + '","","")'); a.href = 'javascript:void(0)'; a.appendChild(document.createTextNode(moreEditToolsList[i])) span.appendChild(a); span.appendChild(document.createTextNode(' ')); } obj.appendChild(span); }