Jump to content
Wikipedia The Free Encyclopedia

User:Malo/monobook.js

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Malo (talk | contribs) at 14:20, 9 September 2021 (removed lupin popups). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision .Revision as of 14:20, 9 September 2021 by Malo (talk | contribs) (removed lupin popups)
Code that you insert on this page could contain malicious content capable of compromising your account. If you import a script from another page with "importScript", "mw.loader.load", "iusc", or "lusc", take note that this causes you to dynamically load a remote script, which could be changed by others. Editors are responsible for all edits and actions they perform, including by scripts. User scripts are not centrally supported and may malfunction or become inoperable due to software changes. A guide to help you find broken scripts is available. If you are unsure whether code you are adding to this page is safe, you can ask at the appropriate village pump.
This code will be executed when previewing this page.
The accompanying .css page for this skin can be added at User:Malo/monobook.css.
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
 importScript('User:Drilnoth/filescripts.js');//See [[User:Drilnoth/filescripts.js/doc]] for details
 //importScript('User:AzaToth/morebits.js'); //This library is required for FurMe and Twinkle to work!
 //importScript('User:AzaToth/twinkleimage.js');
 importScript('User:AWeenieMan/furme.js');
 importScript('User:Howcheng/quickimgdelete.js');
 importScript('User:Drilnoth/delresized.js');




 ///////////////////////////////////////////////////////////////////////////
 // [[User:Celestianpower]]'s monobook.
 // Most of it copied from some place or other and where it is, I've tried to give a source.
 // If you want to copy any of it, I'd be flattered.
 ////////////////////////////////////////////////////////////////////////////

 // [[User:Lupin/popups.js]] - please include this line 
 /*
 mw.loader.load(
  'https://en.wikipedia.org/w/index.php?title=User:Lupin/popups.js'
  + '&action=raw&ctype=text/javascript&dontcountme=s');

 popupImages=false;
 popupPreviews = false;
 popupDelay = 0.65;
 popupNeverGetThumbs = true;
 popupStructure='menus';
 popupFixRedits = true;
 popupFixDabs = true;
 popupAdminLinks = true;
 simplePopups = false;
 popupSummaryData=false;
 */

 //<nowiki>

 //From somewhere
 functionhideafd(){
 vardivs=document.getElementsByTagName("div");
 for(varx=0;x<divs.length;++x)
 if(divs[x].className.indexOf("afd")!=-1)
 divs[x].style.display="none";
 document.getElementById('footer').style.display='none';
 }

 functionshowafd(){
 vardivs=document.getElementsByTagName("div");
 for(varx=0;x<divs.length;++x)
 if(divs[x].className.indexOf("afd")!=-1)
 divs[x].style.display="";
 document.getElementById('footer').style.display='';
 }

 functionaddlilink(tabs,url,name){
 varna=document.createElement('a');
 na.href=url;
 na.appendChild(document.createTextNode(name));
 varli=document.createElement('li');
 li.appendChild(na);
 tabs.appendChild(li);
 returnli;
 }


 //Hybirdization of ABCD afd closer

 functioncloseafd(bold,notbold){
 varform=document.editform;
 vartxt=form.wpTextbox1;
 txt.value="{{subst:at}} '''"+bold+"'''"+notbold+". ~~~~\n"+txt.value+"\n{{subst:ab}}\n";
 form.wpSummary.value="close discussion: "+bold+notbold;
 form.wpWatchthis.checked=false;
 }

 functionafdresult(){
 varres=prompt("Result?");
 if(!res)return;
 varform=document.editform;
 form.wpSummary.value='AFD result';
 vartxt=form.wpTextbox1;
 txt.value+='{{oldafdfull|date=[[DAY MONTH]] [[2005]]|result='+res+'|votepage={{subst:PAGENAME}}}}';
 txt.focus();
 }

 functionafddelete(){
 document.forms.deleteconfirm.wpReason.value='[[Wikipedia:Articles for deletion/'+unescape(window.location.href.replace(/^.*\?title=([^&]+)&action=delete.*$/,'1ドル').replace(/_/g,' ')).replace(/^(Talk|Wikipedia( talk)?):/,'')+']]';
 }

 functionreplace(){
 vars=prompt("Search regexp?");
 if(s){
 varr=prompt("Replace regexp?");
 if(!r&&r!='')return;
 vartxt=document.editform.wpTextbox1;
 txt.value=txt.value.replace(newRegExp(s,"g"),r);
 }
 }

 functionafdresult(){
 varres=prompt("Result?");
 if(!res)return;
 varform=document.editform;
 form.wpSummary.value='AFD result';
 vartxt=form.wpTextbox1;
 txt.value+='{{oldafdfull|date=[[DAY MONTH]] [[2005]]|result='+res+'|votepage={{subst:PAGENAME}}}}';
 txt.focus();
 }

 //////////////////////////////////////////
 // Tabs by Korath
 // returns <li><a href="url">name</a></li>
 /////////////////////////////////////////
 functionaddlilink(url,name)
 {
 varna=document.createElement('a');
 na.setAttribute('href',url);

 vartxt=document.createTextNode(name);
 na.appendChild(txt);

 varli=document.createElement('li');
 li.appendChild(na);
 returnli;
 }

 // appends msg to the currently-editted page, sets the summary to summ,
 // and marks or unmarks the Watch this page checkbox according to watch.
 functionedit_summary_watch(msg,summ,watch)
 {
 varf=document.editform,t=f.wpTextbox1;
 if(t.value.length>0)
 t.value+='\n';
 t.value+=msg;
 f.wpSummary.value=summ;
 }

 functiontestn(number)
 {
 varpage=prompt("Vandalism to which article?")
 varf=document.editform,t=f.wpTextbox1;
 if(t.value.length>0)
 t.value+='\n';
 t.value+="{{subst:"+"test"+number+"-n|"+page+"}} ~"+"~"+"~"+"~";
 if(t.value>2)
 f.wpSummary.value="Vandalism to [["+page+"]] - warning "+number;
 else
 f.wpSummary.value="Regarding [["+page+"]]";
 }

 functionblankwarn(number)
 {
 varpage=prompt("Vandalism to which article?")
 varf=document.editform,t=f.wpTextbox1;
 if(t.value.length>0)
 t.value+='\n';
 t.value+="{{subst:"+"test2a-n|"+page+"}} ~"+"~"+"~"+"~";
 f.wpSummary.value="regarding [["+page+"]]";
 }

 functionbvn(number)
 {
 varpage=prompt("Vandalism to which article?")
 varf=document.editform,t=f.wpTextbox1;
 if(t.value.length>0)
 t.value+='\n';
 t.value+="{{subst:"+"bv-n|"+page+"}} ~"+"~"+"~"+"~";
 f.wpSummary.value="comment on [["+page+"]]";
 }

 // adds various tabs to call the above
 functionadd_tabs()
 {
 varc1=document.getElementById('column-one');
 vartabs=c1.getElementsByTagName('div')[0].getElementsByTagName('ul')[0];

 // Only add for pages with "Editing User talk:" somewhere in the title
 if(document.title.indexOf("Editing User talk:")!=-1)
 {
 tabs.appendChild(addlilink('javascript:edit_summary_watch("{{" + "subst:User:Malo/welcome}} ~" + "~" + "~" + "~", "Welcome!", false, 0)',"Wel"));
 tabs.appendChild(addlilink('javascript:edit_summary_watch("{{" + "subst:usernameblock}} ~" + "~" + "~" + "~", "Username block, please see [[WP:U]]", true, 1)',"UNB"));
 tabs.appendChild(addlilink('javascript:testn(1)',"t1"));
 tabs.appendChild(addlilink('javascript:blankwarn(2)',"t2a"));
 tabs.appendChild(addlilink('javascript:testn(2)',"t2"));
 tabs.appendChild(addlilink('javascript:testn(3)',"t3"));
 tabs.appendChild(addlilink('javascript:testn(4)',"t4"));
 tabs.appendChild(addlilink('javascript:edit_summary_watch("{{" + "subst:test5}} ~" + "~" + "~" + "~", "You have been blocked!", true, 1)',"t5"));
 tabs.appendChild(addlilink('javascript:bvn(1)',"bv-n"));
 tabs.appendChild(addlilink('javascript:edit_summary_watch("{{" + "subst:bv}} ~" + "~" + "~" + "~", "Please stop!", true, 1)',"bv"));


 }

 if(document.title.indexOf("Editing Wikipedia:Articles for deletion")!=-1)
 {
 tabs.appendChild(addlilink('javascript:closeafd("keep", "")','Keep',''));
 tabs.appendChild(addlilink('javascript:closeafd("delete", "")','Delete',''));
 tabs.appendChild(addlilink('javascript:closeafd(prompt("Result?"), "")','Other',''));
 }

 if(document.title.indexOf("Confirm delete")!=-1)
 {
 tabs.appendChild(addlilink('javascript:afddelete()','AFD',''));
 }

 if(document.title.indexOf("Editing ")!=-1){
 tabs.appendChild(addlilink('javascript:replace()','Replace',''));
 }

 if(document.title.indexOf("Editing Talk:")!=-1){
 tabs.appendChild(addlilink('javascript:afdresult()','AFDr',''));
 }

 if(document.title.indexOf("Editing User:")!=-1){
 tabs.appendChild(addlilink('javascript:edit_summary_watch("{{" + "subst:usernameblock}} ~" + "~" + "~" + "~", "Username block, please see [[WP:U]]", true, 1)',"UNB"));
 tabs.appendChild(addlilink('javascript:edit_summary_watch("{{" + "subst:indef}}", "Indefinite block", true, 1)',"indef"));
 }

 }

 if(window.addEventListener)
 window.addEventListener("load",add_tabs,false);
 elseif(window.attachEvent)
 window.attachEvent("onload",add_tabs);

 ///////////////////////////////////////////////////////////////////
 // AutoAFD by Korath
 // This needs to change depending on skin used.
 //////////////////////////////////////////////////////////////////
 functionadd_link2(url,name)
 {
 varna=document.createElement('a');
 na.setAttribute('href',url);
 na.appendChild(document.createTextNode(name));

 varli=document.createElement('li');
 li.appendChild(na);

 vartabs=document.getElementById('p-cactions').getElementsByTagName('ul')[0];
 tabs.appendChild(li);
 }

 functionstrip_namespace(target)
 {
 varcolon=target.indexOf(':');
 if(colon!=-1)
 {
 varspaces=newArray('User','Wikipedia','Image','MediaWiki','Template','Help','Category');
 varns=target.substring(0,colon);
 if(ns==''||ns=='Talk')
 returntarget.substring(colon+1);
 else
 for(vari=0;i<spaces.length;++i)
 {
 if(ns==spaces[i]
 ||ns==spaces[i]+'_talk')
 returntarget.substring(colon+1);
 }
 }

 returntarget;
 }

 functionafd()
 {
 document.editform.wpTextbox1.value='{'+'{'+'subst:afd}}\n'+document.editform.wpTextbox1.value;
 document.editform.wpSummary.value='afd';

 vartarget=document.editform.action;
 target=target.substring(target.indexOf('title=')+6,
 target.lastIndexOf('&action=submit'));

 varmonths=newArray('January','February','March','April','May','June','July','August','September','October','November','December');
 vardate=newDate();
 date=date.getUTCFullYear()+'_'+months[date.getUTCMonth()]+'_'+date.getUTCDate();

 varpagename=strip_namespace(target);

 window.open('/w/index.php?title=Wikipedia:Articles_for_deletion/'+pagename+'&action=edit&fakeaction=afdsub&faketarget='+target,
 'Afd '+unescape(target),
 'status,toolbar,location,menubar,directories,resizeable,scrollbars');
 window.open('/w/index.php?title=Wikipedia:Articles_for_deletion/Log/'+date+'&action=edit&fakeaction=afdlist&faketarget='+pagename,
 'AfdLog '+unescape(target),
 'status,toolbar,location,menubar,directories,resizeable,scrollbars');
 }

 functionautoafd()
 {
 if(document.title.indexOf('Editing ')==0)
 {
 varaction='';
 vartarget='';
 if(location.search)
 {
 varl=location.search.substring(1).split('&');
 for(vari=0;i<l.length;++i)
 {
 vareq=l[i].indexOf('=');
 varname=l[i].substring(0,eq);
 if(name=='fakeaction')
 action=l[i].substring(eq+1);
 elseif(name=='faketarget')
 target=unescape(l[i].substring(eq+1)).replace(/_/g,' ');
 }
 }

 if(action=='afdlist')
 {
 document.editform.wpTextbox1.value+='{{'+'subst:afd3|pg='+target+'}}\n';
 document.editform.wpSummary.value='[[Wikipedia:Articles for deletion/'+target+']]';
 }
 elseif(action=='afdsub')
 {
 if(document.editform.wpTextbox1.value.length>0)
 {
 target=document.editform.action;
 target=unescape(target.substring(target.indexOf('title=')+6,target.lastIndexOf('&action=submit'))).replace(/_/g,' ');
 window.alert("There's an old afd at the default location already.\n\n"+
 'Please either move it out of the way (and update existing links to it), or file the Afd by hand in another location (such as [['+target+' (2)]]).');
 }
 else
 document.editform.wpTextbox1.value+='{'+'{'+'subst:afd2|pg='+target+'|text='+'}'+'}'+
 '-- ~'+'~'+'~'+'~\n'+
 '\n*\'\'\' \'\'\'\n*\'\'\' \'\'\'\n*\'\'\' \'\'\'\n';
 }
 else
 add_link2('javascript:afd()','Afd');
 }
 }

 if(window.addEventListener)
 window.addEventListener('load',autoafd,false);
 elseif(window.attachEvent)
 window.attachEvent('onload',autoafd);

 // Returns <li><a href="url">name</a></li>
 functionaddlilink(url,name)
 {
 varna=document.createElement('a');
 na.setAttribute('href',url);

 vartxt=document.createTextNode(name);
 na.appendChild(txt);

 varli=document.createElement('li');
 li.appendChild(na);
 returnli;
 }

 // Adds a "blocklog" tab and fills in the username field on Special:Blockip, if a "&faketarget=username" is present.
 functiondo_blockip_stuff()
 {
 // focus on Reason field
 document.getElementsByName('wpBlockReason')[0].focus();

 // Look for a &faketarget= for the username/ip
 varl=location.search.substring(1).split('&');
 vartarget='';
 for(vari=0;i<l.length;++i)
 {
 varn=l[i].indexOf('=');
 if(l[i].substring(0,n)=='faketarget')
 {
 target=l[i].substring(n+1);
 break;
 }
 }

 if(target=='')
 return;

 // put account name in "IP Address/username" field
 varaddr=document.getElementsByName('wpBlockAddress')[0];
 addr.value=unescape(target);

 // add "blocklog" tab
 varc1=document.getElementById('column-one');
 vartabs=c1.getElementsByTagName('div')[0].getElementsByTagName('ul')[0];
 tabs.appendChild(addlilink('/w/index.php?title=Special%3ALog&type=block&user=&page=User%3A'+target,'blocklog'));
 }

 // Opens the block log in the current window, and Special:Blockip in a popup.
 // Width, height, top, and left are chosen for a 1600x1200 display., modified for 1152x864
 //function blockpage_and_log(target)
 //{
 // window.open('Special_Blockip.html?foo=blarg&faketarget=' + target, 'Block', 'width=1200,height=600,top=600,left=0');
 // document.location.href = 'http://en.wikipedia.org/w/index.php?title=Special%3ALog&type=block&user=&page=User%3A' + target;
 //}

 // Adds "block" and "blocklog" tabs to User: and User talk: pages.
 functionadd_block_tab()
 {
 varc1=document.getElementById('column-one');
 vartabs=c1.getElementsByTagName('div')[0].getElementsByTagName('ul')[0];

 // use the "edit this page" tab to get already-tidied url
 vareditlk=document.getElementById('ca-edit').getElementsByTagName('a')[0].href;
 // cut everything up to "title=" from the start and everything past "&action=edit" from the end
 editlk=editlk.substring(editlk.indexOf('title=')+6,editlk.lastIndexOf('&action=edit'));
 editlk=editlk.substring(editlk.indexOf(':')+1);
 varslloc=editlk.indexOf('/');
 if(slloc>0)
 editlk=editlk.substring(0,slloc);

 // add "block" tab
 tabs.appendChild(addlilink('/w/index.php?title=Special%3ABlockip&faketarget='+editlk,'block'));

 // To open the block page and block log simultaneously, replace the above line with:
 // tabs.appendChild(addlilink('javascript:blockpage_and_log("' + editlk + '")', 'Block'));
 // and uncomment the blockpage_and_log() function above.

 // add "blocklog" tab
 tabs.appendChild(addlilink('/w/index.php?title=Special%3ALog&type=block&user=&page=User%3A'+editlk,'blocklog'));

 }

 functiondo_onload()
 {
 if(document.title.indexOf('User:')==0
 ||document.title.indexOf('User talk:')==0)
 add_block_tab();
 elseif(document.title.indexOf('Block user')==0)// could stand to be more robust
 do_blockip_stuff();
 }

 //From User:Func
 if(window.addEventListener)
 window.addEventListener("load",do_onload,false);
 elseif(window.attachEvent)
 window.attachEvent("onload",do_onload);

 if(document.createElement&&window.addEventListener)
 {
 functionSoFixItInit()// pre-load, (don't want to slow down loading of article's content, though)
 {

 }

 functionSoFixItLoad()// post-load
 {
 UserMenu=newPortletMenu('p-personal');
 PageMenu=newPortletMenu('p-cactions');
 NavMenu=newPortletMenu('p-navigation');
 //ToolMenu = new PortletMenu( 'p-tb' );

 //	This is inefficient and not particularly robust.
 //	This comes first, I want this link to come up as
 //	fast as possible.
 //
 functionGetByClass(sElem,sClass)
 {vari,a2=[],a=document.getElementsByTagName(sElem);
 for(i=0;i<a.length;i++)
 if(a[i].className==sClass)
 a2.push(a[i]);
 returna2;
 }
 vara,td=GetByClass('td','diff-otitle');
 if((td=td[0])&&(a=td.getElementsByTagName('a')[0]))
 a.href=a.href+'&action=edit';// need to change text, later

 varuserName=UserMenu.getText('pt-userpage');

 // personal (top-most) menu
 //
 //		Drini Háblame Prefs Watchlist Contribs Kate VAN ESP Log out <UTCdate>
 //
 UserMenu.setText('pt-mytalk','Háblame');
 UserMenu.setText('pt-preferences','Prefs');
 UserMenu.setText('pt-watchlist','Watchlist');
 UserMenu.setText('pt-mycontris','Contribs');
 UserMenu.setText('pt-logout','Log out');
 //
 UserMenu.setHref('pt-mycontris',
 'http://en.wikipedia.org/w/index.php?title=Special:Contributions&target='+
 userName+'&offset=0&limit=500');
 //
 //
 //	it seems there is a stylesheet that makes them lowercase
 //
 //		ok, the lowercased menu items are starting to really bug me:
 //
 document.getElementById('p-personal').getElementsByTagName('ul')[0].style.textTransform='none';
 UserMenu.insertBefore('pt-logout','pt-logs','Logs','/w/index.php?title=Special%3ALog&user='+userName);
 //
 //UserMenu.insertBefore( 'pt-logout' , 'pt-irc' , 'ESP', 'irc://irc.freenode.net/wikipedia-esperanza' );
 //UserMenu.insertBefore( 'pt-irc' , 'pt-vandal' , 'VAN', 'irc://irc.freenode.net/wikipedia-en-vandalism' );
 UserMenu.insertBefore('pt-logs','pt-redsox','redsox',
 'http://toolserver.org/~soxred93/count/index.php?name='+userName+'&lang=en&wiki=wikipedia');
 if(document.getElementById('ca-edit'))
 document.getElementById('ca-edit').firstChild.innerHTML='Edit';

 //	so I always know what time it is in UTC land:
 //
 UserMenu.insertBefore('pt-redsox','pt-ipblocks','blocklist','/wiki/Special:Ipblocklist');
 UserMenu.insertBefore('pt-redsox','pt-blockage','block','/wiki/Special:Blockip');
 UserMenu.append('pt-utc',UTCTime(),'javascript:void UserMenu.setText("pt-utc",UTCTime())');

 //	article-actions menu, (the "tabs")
 //
 if(PageMenu['ca-history'])// theory: if it has a history tab, then it's purgable
 {
 PageMenu.insertBefore('ca-history','ca-lastdiff','diff',
 PageMenu.getHref('ca-history').replace(/action=history/,'diff=0'));

 PageMenu.append('ca-purge','Pur',
 PageMenu.getHref('ca-history').replace(/action=history/,'action=purge'));

 PageMenu.setText('ca-edit','Ed');

 PageMenu.setText('ca-history','Hst');

 PageMenu.setText('ca-delete','Del');
 }

 varx=1;
 NavMenu.append('n-'+x++,'monobook.js','/wiki/User:'+userName+'/monobook.js');
 NavMenu.append('n-'+x++,'Vandalism Fighter','http://www.csclub.uwaterloo.ca/~dawill03/cdvf/vf.jar');
 NavMenu.append('n-'+x++,'AfDs to be closed','http://en.wikipedia.org/wiki/Wikipedia:Articles_for_deletion/Old');
 }

 functionPortletMenu(id)// constructor
 {
 this.menu=document.getElementById(id);
 this.list=this.menu.getElementsByTagName('ul')[0];// bypass "<h5>Views</h5>", etc.

 //	sigh...as far as I can figure, there is empty whitespace being treated
 //	as TextNodes....
 //
 varLIs=this.list.getElementsByTagName('li');

 for(vari=0;i<LIs.length;i++)
 {
 this[LIs[i].id]=LIs[i];
 }

 this.newItem=function(id,txt,url)
 {varli=document.createElement('li');li.id=id;
 vara=document.createElement('a');a.href=url;

 a.appendChild(document.createTextNode(txt));
 li.appendChild(a);

 this[id]=li;// watch this!!!

 returnli;
 }

 this.append=function(id,txt,url)
 {this.list.appendChild(this.newItem(id,txt,url));
 }

 this.insertBefore=function(old,id,txt,url)
 {this.list.insertBefore(this.newItem(id,txt,url),this[old]);
 }

 //	the ByTagName here is a bit annoying, but in Safari, I was picking
 //	up TextNodes by using this[ id ].firstChild.firstChild
 //
 this.getText=function(id){returnthis[id].getElementsByTagName('a')[0].firstChild.data}
 this.setText=function(id,txt){this[id].getElementsByTagName('a')[0].firstChild.data=txt}

 this.getHref=function(id){returnthis[id].getElementsByTagName('a')[0].href}
 this.setHref=function(id,url){this[id].getElementsByTagName('a')[0].href=url}

 //	I add em as I need em....
 }

 functionInlineredsox(user)
 {
 varredsox=
 'http://toolserver.org/~soxred93/count/index.php?name='+user+'&lang=en&wiki=wikipedia';

 vardiv=document.createElement('div');
 div.id='inlineredsoxDiv';
 div.style.position='absolute';
 div.style.zIndex=1000;
 div.style.left='20px';
 div.style.top='20px';
 div.style.backgroundColor='#FFFFFF';
 div.style.borderStyle='solid';
 div.style.borderWidth=' medium';
 div.style.borderColor='#000000';

 vartop=document.createElement('div');
 top.id='inlineredsoxTop';
 top.style.textAlign='right';
 top.style.margin='8px';
 top.style.backgroundColor='#DDDDDD';

 vara=document.createElement('a');
 a.appendChild(document.createTextNode("Go to redsox's"));
 a.href=redsox;
 a.target='_parent';
 a.style.margin='8px';

 top.appendChild(a);

 a=document.createElement('a');
 a.appendChild(document.createTextNode('Close'));
 a.href="javascript:void RemoveNode('inlineredsoxDiv')";
 a.style.margin='8px';

 top.appendChild(a);

 div.appendChild(top);

 variframe=document.createElement('iframe');
 iframe.id='inlineKateBot';
 iframe.style.width='300px';
 iframe.style.height='400px';
 iframe.style.margin='8px';
 iframe.style.borderStyle='solid';
 iframe.style.borderWidth='thin';
 iframe.style.borderColor='#000000';
 iframe.src=kate;

 div.appendChild(iframe);

 document.body.appendChild(div);
 }

 functionRemoveNode(id)
 {varnode=document.getElementById(id)
 node.parentNode.removeChild(node);
 }

 functionUTCTime()
 {
 //	Get a date stamp for the time in UTC-land.
 //
 //	for the future: a format arg
 //
 vars='',
 d=newDate(),
 a='Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec'.split(' ');
 returnd.getUTCDate()+' '+
 a[d.getUTCMonth()]+' '+
 d.getUTCFullYear()+' '+
 ('0'+d.getUTCHours()).substr(-2)+':'+
 ('0'+d.getUTCMinutes()).substr(-2)+' '+'UTC';
 }

 SoFixItInit();
 window.addEventListener('load',SoFixItLoad,false);
 }

 functionNUPatrol()
 {
 if((window.location.href.indexOf('Special%3ALog&type=newusers')==-1)&&
 (window.location.href.indexOf('Special:Log/newusers')==-1))
 return;// make more robust???

 varitems,item,i,links,user,name,talk,contribs,insertLoc,link;

 items=document.getElementById('bodyContent').getElementsByTagName('ul')[0].getElementsByTagName('li');

 functionNewLink(txt,url,plainlinks,linkColor)
 {vara=document.createElement('a');
 a.appendChild(document.createTextNode(txt));
 a.href=url;
 if(plainlinks)a.className='plainlinks';
 if(linkColor)
 {if(typeoflinkColor=="string")
 a.style.color=linkColor;
 elsea.style.color='#FF0000';// old default behavior
 }
 returna;
 }

 for(i=0;i<items.length;i++)
 {
 item=items[i];

 links=item.getElementsByTagName('a');

 user=links[0];name=user.firstChild.nodeValue;
 talk=links[2];talk.firstChild.nodeValue='talk';// lowercase 'Talk' for consistency
 contribs=links[3];

 insertLoc=user.nextSibling;// ' newusers '

 item.insertBefore(document.createTextNode(' ( '),insertLoc);

 item.insertBefore(talk,insertLoc);
 item.insertBefore(document.createTextNode(', '),insertLoc);

 item.insertBefore(contribs,insertLoc);
 item.insertBefore(document.createTextNode(', '),insertLoc);

 item.insertBefore(NewLink('actions','/w/index.php?title=Special%3ALog&user='+name,true,'#000088'),insertLoc);
 item.insertBefore(document.createTextNode(', '),insertLoc);

 item.insertBefore(NewLink('blocks','/w/index.php?title=Special%3ALog&type=block&page=User%3A'+name,true,'#008800'),insertLoc);
 item.insertBefore(document.createTextNode(', '),insertLoc);

 item.insertBefore(NewLink('is blocked?','/wiki/Special:Ipblocklist?action=search&ip='+name,true,'#888800'),insertLoc);
 item.insertBefore(document.createTextNode(', '),insertLoc);

 item.insertBefore(NewLink('do block!','/wiki/Special:Blockip/'+name,true,'#880000'),insertLoc);

 item.insertBefore(document.createTextNode(' )'),insertLoc);

 item.removeChild(insertLoc.nextSibling);// should remove the span
 item.removeChild(insertLoc);// should remove ' newusers ' text
 }
 }
 if(window.addEventListener)window.addEventListener('load',NUPatrol,false);
 elseif(window.attachEvent)window.attachEvent('onload',NUPatrol);

 //---------------------------------------------------------------------------------
 functionremoveAccessKeys(keylist){
 vart=document.getElementsByTagName('A'),u=document.getElementsByTagName('input');
 for(vari=0;i<t.length+u.length;++i){
 vars=((i<t.length)?t[i]:u[i-t.length]);
 for(varj=0;j<keylist.length;++j)if(s.accessKey==keylist[j])s.accessKey='';
 }
 };

 functionremoveDeleteKey(){removeAccessKeys(['d']);};

 if(window.addEventListener)window.addEventListener("load",removeDeleteKey,false);
 elseif(window.attachEvent)window.attachEvent("onload",removeDeleteKey);

 //Interiot's javascript edit counter
 if(document.title.indexOf('User:Interiot/Tool2/code.js')!=-1){
 document.write('<script type="text/javascript" src="'
 +'http://en.wikipedia.org/w/index.php?title=User:Interiot/Tool2/code.js'
 +'&action=raw&ctype=text/javascript&dontcountme=s"></script>');}

 //</nowiki>

AltStyle によって変換されたページ (->オリジナル) /