Note: After saving, you have to bypass your browser's cache to see the changes. Internet Explorer: press Ctrl-F5, Mozilla: hold down Shift while clicking Reload (or press Ctrl-Shift-R), Opera/Konqueror: press F5, Safari: hold down Shift + Alt while clicking Reload, Chrome: hold down Shift while clicking Reload.
if(mw.config.get('wgNamespaceNumber')==6)addOnloadHook(addFlickrLinks);functionaddFlickrLinks(){mw.util.addPortletLink('p-cactions','javascript:switchDisplay()','Flickr links','ca-myLinks','Links to get Flickr messages');}varisDisplayed=false;//Affiche ou masque la liste des liens.functionswitchDisplay(){if(isDisplayed){document.getElementById('LinksDiv').style.display='none';isDisplayed=false;}else{createLinks();isDisplayed=true;document.getElementById('LinksDiv').style.display='';}}functioncreateLinks(){vardiv=document.getElementById('bodyContent')LinksDiv=document.getElementById('LinksDiv');if(!LinksDiv){LinksDiv=document.createElement('div');LinksDiv.id="LinksDiv";LinksDiv.align="center";div.parentNode.insertBefore(LinksDiv,div);initLinks();vartablinks=document.createElement("table")varline=tablinks.insertRow(-1)for(varj=0,len=linksArray.length;j<len;j++){varcell=line.insertCell(-1)cell.appendChild(linksArray[j]);}LinksDiv.appendChild(tablinks);}}//createLinksfunctioninitLinks(){varpageTitle=encodeURIComponent(mw.config.get('wgTitle').split(" ").join("_"));linksArray=newArray();flickrLink1=document.createElement('a');with(flickrLink1){innerHTML='Message Flickr 1';title='Message de remerciement Flickr sans CheckUsage';setAttribute("value","Thanks for licensing this image as CC-BY-SA! Your choice of a free license has allowed us to use your image in <a href=\"http://commons.wikimedia.org/wiki/File:"+pageTitle+">Wikimedia Commons</a>.\n<a href=\"http://commons.wikimedia.org/\"><img src=\"http://farm4.static.flickr.com/3560/3312955411_23201ab4ed_o.jpg\" title=\"Wikimedia Commons\" /></a>");setAttribute("onclick","window.prompt("+"'Message : ', this.getAttribute('value'));");setAttribute("href","javascript:;");}linksArray.push(flickrLink1)flickrLink2=document.createElement('a');with(flickrLink2){innerHTML='Message Flickr 2';title='Message de remerciement Flickr avec CheckUsage';setAttribute("value","Thanks for licensing this image as CC-BY-SA! Your choice of a free license has allowed us to use your image in <b><a href=\"http://commons.wikimedia.org/wiki/File:"+pageTitle+">Wikimedia Commons</a></b>. The image is now used to illustrate <a href=\"http://tools.wikimedia.de/~daniel/WikiSense/CheckUsage.php?i="+pageTitle+"&w=_100000\">one or more pages</a> on Wikipedia or other free knowledge projects.\n<a href=\"http://commons.wikimedia.org/\"><img src=\"http://farm4.static.flickr.com/3560/3312955411_23201ab4ed_o.jpg\" title=\"Wikimedia Commons\" /></a>");setAttribute("onclick","window.prompt("+"'Message : ', this.getAttribute('value'));");setAttribute("href","javascript:;");}linksArray.push(flickrLink2)}//initLinks