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.
// [[User:Dschwen/coordinates.js]] - please include this linemw.loader.load('https://commons.wikimedia.org/w/index.php?title=User:Dschwen/coordinates.js'+'&action=raw&ctype=text/javascript');//[[MediaWiki talk:HotCat.js]]mw.loader.load('https://commons.wikimedia.org/w/index.php?title=MediaWiki:HotCat.js'+'&action=raw&ctype=text/javascript');// [[:en:User:Lupin/popups.js]]// Traduction de [[Utilisateur:Leag|Leag]] : [[Utilisateur:Leag/Navigation popups|Navigation popups]]mw.loader.load('https://fr.wikipedia.org/w/index.php?title=User:Leag/popups-strings-fr.js'+'&action=raw&ctype=text/javascript');mw.loader.load('https://en.wikipedia.org/w/index.php?title=User:Lupin/popups.js'+'&action=raw&ctype=text/javascript&dontcountme=s');// Revert tools by LorianfunctiongetElementsByClass(searchClass,node,tag){// Function from http://www.dustindiaz.com/getelementsbyclass/varclassElements=newArray();if(node==null)node=document;if(tag==null)tag='*';varels=node.getElementsByTagName(tag);varelsLen=els.length;varpattern=newRegExp("(^|\\s)"+searchClass+"(\\s|$)");for(i=0,j=0;i<elsLen;i++){if(pattern.test(els[i].className)){classElements[j]=els[i];j++;}}returnclassElements;}// _GET code from NoGray JS Library http://www.nogray.com/new_site/var_GET=newArray();var_uri=location.href;var_temp_get_arr=_uri.substring(_uri.indexOf('?')+1,_uri.length).split("&");var_temp_get_arr_1=newArray();for(_get_arr_i=0;_get_arr_i<_temp_get_arr.length;_get_arr_i++){_temp_get_arr_1=_temp_get_arr[_get_arr_i].split("=");_GET[decodeURI(_temp_get_arr_1[0])]=decodeURI(_temp_get_arr_1[1]);}delete_uri;delete_temp_get_arr;delete_temp_get_arr_1;functiongetMessage(where,user1,user2){varmessage=prompt('What message would you like to leave?','');window.location='http://en.wikipedia.org/w/index.php?title='+_GET['title']+'&action=edit&oldid='+_GET['oldid']+'&'+where+'=2&user1='+user1+'&user2='+user2+'&message='+message;}$(function(){if(location.href.match(/diff=/)){// Get username of submittervaruser1=getElementsByClass('diff-otitle',null,'td');user1=user1[0].getElementsByTagName('a')[2].innerHTML;varuser2=getElementsByClass('diff-ntitle',null,'td');user2=user2[0].getElementsByTagName('a')[2].innerHTML;document.getElementById('contentSub').innerHTML='(<a href="http://en.wikipedia.org/w/index.php?title='+_GET['title']+'&action=edit&oldid='+_GET['oldid']+'&revert=1&user1='+user1+'&user2='+user2+'">Revert</a> / <a href="javascript:var message = getMessage(\'revert\', \''+user1+'\', \''+user2+'\');">Message</a>) (<a href="http://en.wikipedia.org/w/index.php?title='+_GET['title']+'&action=edit&oldid='+_GET['oldid']+'&vandalism=1&user1='+user1+'&user2='+user2+'">Vandalism</a> / <a href="javascript:var message = getMessage(\'vandalism\', \''+user1+'\', \''+user2+'\');">Message</a>) (Warn: <a href="http://en.wikipedia.org/w/index.php?title=User_talk:'+user2+'&action=edit§ion=new&warn=1">Test</a> / <a href="http://en.wikipedia.org/w/index.php?title=User_talk:'+user2+'&action=edit§ion=new&warn=2">Blatant</a> / <a href="http://en.wikipedia.org/w/index.php?title=User_talk:'+user2+'&action=edit§ion=new&warn=3">Nonsense</a> / <a href="http://en.wikipedia.org/w/index.php?title=User_talk:'+user2+'&action=edit§ion=new&warn=4">Blanking</a>)';}elseif(location.href.match(/revert=1/)){document.getElementById('wpSummary').value='Reverted edits by [[Special:Contributions/'+_GET['user2']+'|'+_GET['user2']+']] to version '+_GET['oldid']+' by [[Special:Contributions/'+_GET['user1']+'|'+_GET['user1']+']]';document.getElementById('editform').submit();}elseif(location.href.match(/revert=2/)){document.getElementById('wpSummary').value='Reverted edits by [[Special:Contributions/'+_GET['user2']+'|'+_GET['user2']+']] to version '+_GET['oldid']+' by [[Special:Contributions/'+_GET['user1']+'|'+_GET['user1']+']] ('+_GET['message']+')';document.getElementById('editform').submit();}elseif(location.href.match(/vandalism=1/)){document.getElementById('wpSummary').value='Reverted vandalism by [[Special:Contributions/'+_GET['user2']+'|'+_GET['user2']+']] to version '+_GET['oldid']+' by [[Special:Contributions/'+_GET['user1']+'|'+_GET['user1']+']]';document.getElementById('editform').submit();}elseif(location.href.match(/vandalism=2/)){document.getElementById('wpSummary').value='Reverted vandalism by [[Special:Contributions/'+_GET['user2']+'|'+_GET['user2']+']] to version '+_GET['oldid']+' by [[Special:Contributions/'+_GET['user1']+'|'+_GET['user1']+']] ('+_GET['message']+')';document.getElementById('editform').submit();}elseif(location.href.match(/warn=1/)){document.getElementById('wpSummary').value='Vandalism warning';document.getElementById('wpTextbox1').value='{{sub'+'st:test}} ~~'+'~~';document.getElementById('editform').submit();}elseif(location.href.match(/warn=2/)){document.getElementById('wpSummary').value='Vandalism warning';document.getElementById('wpTextbox1').value='{{sub'+'st:blatantvandal}} ~~'+'~~';document.getElementById('editform').submit();}elseif(location.href.match(/warn=3/)){document.getElementById('wpSummary').value='Vandalism warning';document.getElementById('wpTextbox1').value='{{sub'+'st:test2}} ~~'+'~~';document.getElementById('editform').submit();}elseif(location.href.match(/warn=4/)){document.getElementById('wpSummary').value='Vandalism warning';document.getElementById('wpTextbox1').value='{{sub'+'st:test2a}} ~~'+'~~';document.getElementById('editform').submit();}});