User:ياسين الأسطى/Mylanguages.js

function myLanguages {   if (typeof(mylangsArray) == "undefined") //user didn't define array of languages return;

var first; //element to insert before for (var i = 0; i < mylangsArray.length; i++) {       var els = getElementsByClassName(document, "*", "interwiki-"+mylangsArray[i]); if (els.length == 0) //interwiki not found continue; var parent = els[0].parentNode; if (!first) //first loop run first = parent.firstChild; for (var n = 0; n < els.length; n++) {           els[n].style.fontWeight = "bold"; if (first == els[n]) //don't move element before itself first = first.nextSibling; else parent.insertBefore(els[n], first); }   } }

hookEvent("load", myLanguages);