/*myGallery.js ------------Description: Adds a Tab to the Vector skin providing 1-click access to your own uploaded images, using http://toolserver.org/~daniel/WikiSense/Gallery.php Only written/tested for Vector skin.*/ //function to find first 'ul' node in an element function getFirstULchild(n){x=n.firstChild;while (x.tagName != 'UL') { x=x.nextSibling; }return x;} //attach this whole event to Onload for page addOnloadHook(function () { // Create a <li> element, and an <a> element, and a <span> element, and set some properties var liContainer = document.createElement("li");// build and assign the url for the link var myLink = document.createElement('a');myLink.href = 'http://toolserver.org/~daniel/WikiSense/Gallery.php?wikifam=.wikipedia.org';myLink.href += '&wikilang=en&order=-img_timestamp&img_user_text='myLink.href += wgUserName; //currently logged in usermyLink.href += '&max=250&ofs=0&max=250'; var mySpan = document.createElement('span');mySpan.innerHTML = 'My Gallery'; //nest the <span> in the <a>, then the <a> in the <li> myLink.appendChild(mySpan);liContainer.appendChild(myLink); //insert the <li>, now containing both nested elements, into the DOM //it should be inserted before the watch/unwatch link/icon y = (document.getElementById("ca-unwatch"));if (!y) { y = (document.getElementById("ca-watch"));}if (y) { getFirstULchild(document.getElementById("p-views")).insertBefore(liContainer,y);}}); /*END OF: myGallery.js -------------------- */
🔥 Top keywords: Main PageSpecial:SearchPage 3Wikipedia:Featured picturesHouse of the DragonUEFA Euro 2024Bryson DeChambeauJuneteenthInside Out 2Eid al-AdhaCleopatraDeaths in 2024Merrily We Roll Along (musical)Jonathan GroffJude Bellingham.xxx77th Tony AwardsBridgertonGary PlauchéKylian MbappéDaniel RadcliffeUEFA European Championship2024 ICC Men's T20 World CupUnit 731The Boys (TV series)Rory McIlroyN'Golo KantéUEFA Euro 2020YouTubeRomelu LukakuOpinion polling for the 2024 United Kingdom general electionThe Boys season 4Romania national football teamNicola CoughlanStereophonic (play)Gene WilderErin DarkeAntoine GriezmannProject 2025