Difference between revisions 6551656 and 6717047 on simplewikivar UnsignedHelper={ months:['January','February','March','April','May','June','July','August','September','October','November','December'], makeUnsignedTemplate:function(user,ts,anon){ ts=new Date(ts); var h=ts.getUTCHours(); if(h<10) h='0'+h; var m=ts.getUTCMinutes(); if(m<10) m='0'+m; ts=h+':'+m+', '+ts.getUTCDate()+' '+UnsignedHelper.months[ts.getUTCMonth()]+' '+ts.getUTCFullYear()+' (UTC)'; if(anon){ return '\x7b\x7bsubst:UnsignedIP|'+user+'|'+ts+'\x7d\x7d'; } else { return '\x7b\x7bsubst:Unsigned|'+user+'|'+ts+'\x7d\x7d'; } }, addUnsignedTemplate:function(evt){ mw.loader.using(['mediawiki.util','jquery.ui.dialog'], function(){ var f=document.getElementById('editform'); var e=f.elements.wpTextbox1; var pos=$(e).textSelection('getCaretPosition', {startAndEnd:true}); var txt; if(pos[0]!=pos[1]){ txt=e.value.substring(pos[0],pos[1]); pos=pos[1]; (contracted; show full) window.charinsertCustom['Insert']+=' \x7b\x7bunsigned\x7d\x7d\x10UnsignedHelper.addUnsignedTemplate'; if(!window.charinsertCustom['Wiki markup']) window.charinsertCustom['Wiki markup']=''; window.charinsertCustom['Wiki markup']+=' \x7b\x7bunsigned\x7d\x7d\x10UnsignedHelper.addUnsignedTemplate'; if(window.updateEditTools) window.updateEditTools(); All content in the above text box is licensed under the Creative Commons Attribution-ShareAlike license Version 4 and was originally sourced from https://simple.wikipedia.org/w/index.php?diff=prev&oldid=6717047.
![]() ![]() This site is not affiliated with or endorsed in any way by the Wikimedia Foundation or any of its affiliates. In fact, we fucking despise them.
|