User:Nohat/test.js



x(?!y)

function IPAgenCustomIPAKeys { var idnum = 0; var ipaSpans = getElementsByClassName(document, "span", "IPA"); for (var i = 0; i < ipaSpans.length ; i++) { var span = ipaSpans[i]; if (!span.id) { span.setAttribute('id','IPA_text_'+idnum); idnum++; }       var IPAre = /(aɪ|aʊ|ɑ|ɒ|æ|ɔ(?!ɪ)|ɔɪ|dʒ|ð|ə|ɚ|ɛ|ɝ|eɪ|ɡ|i|(?!e|a|ɔ)ɪ|j|ŋ|oʊ|ɹ|(?!t)ʃ|tʃ|θ|(?!o|a)ʊ|u|ʌ|ʒ)/g;

var IPAmatches = IPAre.match(IPA_getInnerText(span));

for (var j = 0; j < IPAmatches.length; j++) { var IPAmatch = IPAmatches[j]; }   } }

function IPA_getInnerText(el) { if (typeof el == "string") return el; if (typeof el == "undefined") { return el }; if (el.innerText) return el.innerText;	// Not needed but it is faster var str = "";

var cs = el.childNodes; var l = cs.length; for (var i = 0; i < l; i++) { switch (cs[i].nodeType) { case 1: //ELEMENT_NODE str += IPA_getInnerText(cs[i]); break; case 3:	//TEXT_NODE str += cs[i].nodeValue; break; }	}	return str; }

aɪ aʊ ɑ ɒ æ ɔ ɔɪ dʒ ð ə ɚ ɛ ɝ eɪ ɡ i j ŋ oʊ ɹ ʃ tʃ θ ʊ u ʌ ʒ

/aɪ/ flY /aʊ/ nOW /ɑ/ spA /ɒ/ rOt /æ/ bAd /ɔ/ lAW /ɔɪ/ tOY /dʒ/ Jump /ð/ THis /ə/ About /ɚ/ winnER /ɛ/ bEd /ɝ/ nURse /eɪ/ pAY /ɡ/ Go /i/  bEE /j/ Yes /ŋ/ siNG /oʊ/ nO /ɹ/ Red /ʃ/ puSH /tʃ/ CHip /θ/ THink /ʊ/ bOOk /u/ fOOd /ʌ/ rUn /ʒ/ beiGE