MediaWiki:Gadget-RTRC.js

mw.loader.getState("ext.gadget.rtrc")?mw.loader.load("ext.gadget.rtrc"):mw.loader.implement("ext.gadget.rtrc",function{!function(a,b){"use strict";function J(a){return 10>a&&(a="0"+a),a}function K(a){var b=a.getDate;return b===p?"":(p=b,' '+a.getDate+" "+s[a.getMonth]+" ")}function L(a){var c,d,e,f,g,h,i,j,l;return c=a.newlen-a.oldlen,d=void 0!==a.unpatrolled,e=void 0!==a.anon,f=" ",g="","new"===a.type&&(f+=' N '),("edit"===a.type||"new"===a.type)&&k&&d&&(f+=' ! '),i=a.parsedcomment,0===i.indexOf('\u2190')&&(g+=" mw-rtrc-item-aes"),g=e?" mw-rtrc-item-anon":" mw-rtrc-item-liu",l=K(x.newDateFromApi(a.timestamp)),l+='',h="edit"===a.type?''+b.message("diff").escaped+"":"new"===a.type?'new':b.message("diff").escaped,l+=" ("+h+") "+f+" ",l+=x.getClocktimeFromApi(a.timestamp)+' '+a.title+" ",l+=' &middot; T &middot; C &middot; '+a.user+" ",l+=' '+i+"  ",c>0?(j=c>399?"strong":"span",l+=" <"+j+' class="mw-plusminus-pos">('+c+") "):0===c?l+='  (0)  ':(j=-399>c?"strong":"span",l+=" <"+j+' class="mw-plusminus-neg">('+c+")</"+j+"> "),l+=" "}function M(a,b){var c=!1;return a.app.massPatrol&&!a.rc.user&&(a.app.massPatrol=!1,c=!0,"quiet"!==b&&alert(z("masspatrol-requires-userfilter"))),a.app.massPatrol&&!a.app.autoDiff&&(a.app.autoDiff=!0,c=!0),!c}function N{var b=a(F.find(".mw-rtrc-settings")[0].elements).filter(":input");w=a.extend(!0,{},v),b.each(function(a,b){var c=b.name;switch(c){case"limit":w.rc[c]=Number(b.value);break;case"namespace":w.rc[c]=b.value.length?Number(b.value):void 0;break;case"user":case"start":case"end":case"tag":w.rc[c]=b.value||void 0;break;case"showAnonOnly":case"showUnpatrolledOnly":case"typeEdit":case"typeNew":w.rc[c]=b.checked;break;case"dir":b.checked&&(w.rc[c]=b.value);break;case"cvnDB":case"massPatrol":case"autoDiff":w.app[c]=b.checked;break;case"refresh":w.app[c]=Number(b.value)}}),M(w)||O(w)}function O(b){var c=a(F.find(".mw-rtrc-settings")[0].elements).filter(":input");b.rc&&a.each(b.rc,function(a,b){var d=c.filter(function{return this.name===a}),e=d[0];if(e)switch(a){case"limit":e.value=b;break;case"namespace":void 0===b?d.find("option").eq(0).prop("selected",!0):d.val(b);break;case"user":case"start":case"end":case"tag":e.value=b||"";break;case"showAnonOnly":case"showUnpatrolledOnly":case"typeEdit":case"typeNew":e.checked=b;break;case"dir":e.value===b&&(e.checked=!0)}}),b.app&&a.each(b.app,function(b,d){var e=c.filter(function{return this.name===b}),f=e[0];if(f||(f=document.getElementById("rc-options-"+b),e=a(f)),f)switch(b){case"cvnDB":case"massPatrol":case"autoDiff":f.checked=d;break;case"refresh":f.value=d}})}function P{var c=new b.Uri(b.util.getUrl(d.wgPageName)),e={};return a.each(w.rc,function(a,b){v.rc[a]!==b&&(e.rc||(e.rc={}),e.rc[a]=b)}),a.each(w.app,function(a,b){v.app[a]!==b&&(e.app||(e.app={}),e.app[a]=b)}),e=a.toJSON(e),c.extend({opt:"{}"===e?void 0:e,kickstart:1}),c.toString}function Q{var c=new b.Uri,d=c.query.opt,e=c.query.kickstart;d=d?a.parseJSON(d):{},d=a.extend(!0,{},v,d),M(d,"quiet"),O(d),w=d,"1"===e&&(V,F[0].scrollIntoView&&F[0].scrollIntoView)}function R(a){var b=["flags","timestamp","user","title","parsedcomment","sizes","ids"],c=["!bot"],d=[],e={};return e.rcdir=a.dir,"older"===a.dir?(void 0!==a.end&&(e.rcstart=a.end),void 0!==a.start&&(e.rcend=a.start)):"newer"===a.dir&&(void 0!==a.start&&(e.rcstart=a.start),void 0!==a.end&&(e.rcend=a.end)),void 0!==a.namespace&&(e.rcnamespace=a.namespace),void 0!==a.user&&(e.rcuser=a.user),void 0!==a.tag&&(e.rctag=a.tag),k&&b.push("patrolled"),e.rcprop=b.join("|"),a.showAnonOnly&&c.push("anon"),a.showUnpatrolledOnly&&c.push("!patrolled"),e.rcshow=c.join("|"),e.rclimit=a.limit,a.typeEdit&&d.push("edit"),a.typeNew&&d.push("new"),e.rctype=d.length?d.join("|"):"edit|new",e}function S(b){b.filter(".mw-rtrc-item").each(function{var b=a(this),c=Number(b.data("rcid"));-1!==a.inArray(c,q)?b.addClass("mw-rtrc-item-skipped"):-1!==a.inArray(c,r)?b.addClass("mw-rtrc-item-patrolled"):c===E&&b.addClass("mw-rtrc-item-current")})}function T(b){G.removeClass("placeholder"),H.find(".mw-rtrc-feed-update").html(y("lastupdate-rc",(new Date).toLocaleString).escaped+' | <a href="'+P+'">'+y("permalink").escaped+"</a>"),b.rawHtml!==t&&(t=b.rawHtml,S(b.$feedContent),H.find(".mw-rtrc-feed-content").empty.append(b.$feedContent)),o=setTimeout(W,1e3*w.app.refresh),a("#krRTRC_loader").hide}function U(b,c){var d;return d=[],b.filter(".mw-rtrc-item").each(function{var b=a(this).attr("user");b&&-1===a.inArray(b,d)&&d.push(b)}),d.length?(a.ajax({url:f,data:{users:d.join("|")},timeout:2e3,dataType:"jsonp"}).fail(function{c}).done(function(d){var e;return d.users?(a.each(d.users,function(c,d){var e;"blacklist"===d.type&&(e="",e+=d.comment?z("cvn-reason")+": "+d.comment+". ":z("cvn-reason")+": "+z("cvn-reason-empty"),e+=d.adder?z("cvn-adder")+": "+d.adder:z("cvn-adder")+": "+z("cvn-adder-empty"),b.filter(".mw-rtrc-item").filter(function{return a(this).attr("user")===c}).find(".user").addClass("blacklisted").attr("title",e))}),c,e=new Date,e.setTime(1e3*d.lastUpdate),H.find(".mw-rtrc-feed-cvninfo").text("CVN DB "+z("lastupdate-cvn",e.toUTCString)),void 0):(c,void 0)}),void 0):(c,void 0)}function V{a("#rc-options-pause").prop("checked",!1),clearTimeout(o),W}function W{var b;u||(a("#krRTRC_loader").show,u=!0,b=R(w.rc),b.format="json",b.action="query",b.list="recentchanges",a.ajax({url:e,dataType:"json",data:b}).fail(function{var b=" Downloading recent changes failed ";T({$feedContent:a(b),rawHtml:b}),u=!1,I.prop("disabled",!1).css("opacity","1.0")}).done(function(b){var c,d,e="";b.error?(G.removeClass("placeholder"),e+="rcpermissiondenied"===b.error.code?' Downloading recent changes failed Please untick the "Unpatrolled only"-checkbox or request the Patroller-right.</a>':' Downloading recent changes failed Please check the settings above and try again. If you believe this is a bug, please <a href="//meta.wikimedia.org/w/index.php?title=User_talk:Krinkle/Tools&action=edit&section=new&preload=User_talk:Krinkle/Tools/Preload" target="_blank"> let me know </a>.'):(c=b.query.recentchanges,c.length?a.each(c,function(a,b){e+=L(b)}):e+=" "+y("nomatches").escaped+" ",p=void 0),d=a(a.parseHTML(e)),w.app.cvnDB?U(d,function{T({$feedContent:d,rawHtml:e}),u=!1}):(T({$feedContent:d,rawHtml:e}),u=!1),I.prop("disabled",!1).css("opacity","1.0")}))}function X{var a=H.find(".mw-rtrc-item:not(.mw-rtrc-item-current, .mw-rtrc-item-patrolled, .mw-rtrc-item-skipped)");a.eq(0).find("a.rcitemlink").click}function Y(b){b===!0&&(D?a(".patrollink a").click:X)}function Z{A=String("true"!==A),a("html").toggleClass("mw-rtrc-navtoggle-collapsed"),localStorage.setItem("mw-rtrc-navtoggle-collapsed",A)}function ${var d,e,f,g=b.config.get("wgFormattedNamespaces");d=" "+b.message("namespacesall").escaped+" ",d+=' '+b.message("blanknamespace").escaped+" ";for(f in g)f>0&&(d+='<option value="'+f+'">'+g[f]+" ");for(e=" "+y("select-placeholder-none").escaped+" ",f=0;f<m.length;f++)e+='<option value="'+b.html.escape(m[f])+'">'+b.html.escape(m[f])+" ";F=a(a.parseHTML(' Real-Time Recent Changes ('+c+") "+' '+(b.user.isAnon?"":'<a target="_blank" href="'+b.util.getUrl("Special:Log/patrol")+"?user="+encodeURIComponent(b.user.name)+'">'+y("mypatrollog").escaped.ucFirst+"</a>")+'<a id="mw-rtrc-toggleHelp">Help</a>'+" "+" "+'<form id="krRTRC_RCOptions" class="mw-rtrc-settings mw-rtrc-nohelp make-switch"> '+' '+' '+'<label for="mw-rtrc-settings-limit" class="head">'+y("limit").escaped+" "+'<select id="mw-rtrc-settings-limit" name="limit">'+' 10 '+' 25 '+' 50 '+' 75 '+' 100 '+' 250 '+' 500 '+" "+" "+' '+' '+y("filter").escaped+" "+' '+" "+'<input type="checkbox" name="showAnonOnly" />'+" "+y("showAnonOnly").escaped+" "+" "+" "+'<input type="checkbox" name="showUnpatrolledOnly" />'+" "+y("showUnpatrolledOnly").escaped+" "+" "+" "+' '+'<label for="mw-rtrc-settings-user" class="head">'+y("userfilter").escaped+' '+" "+' '+'<input type="text" size="16" id="mw-rtrc-settings-user" name="user" />'+" "+'<input class="button button-small" type="button" id="mw-rtrc-settings-user-clr" value="'+y("clear").escaped+'" />'+" "+" "+' '+' '+y("type").escaped+" "+' '+" "+'<input type="checkbox" name="typeEdit" checked />'+" "+y("typeEdit").escaped+" "+" "+" "+'<input type="checkbox" name="typeNew" checked />'+" "+y("typeNew").escaped+" "+" "+" "+' '+' '+y("timeframe").escaped+' '+" "+' '+" "+y("time-from").escaped+": "+'<input type="text" size="18" name="start" />'+" "+" "+" "+y("time-untill").escaped+": "+'<input type="text" size="18" name="end" />'+" "+" "+" "+' '+' '+b.message("namespaces").escaped+" "+'<select class="mw-rtrc-setting-select" name="namespace">'+d+" "+" "+" "+' '+' '+y("order").escaped+" "+' '+" "+' '+" "+'<input type="radio" name="dir" value="newer" />'+" "+y("asc").escaped+" "+" "+" "+'<input type="radio" name="dir" value="older" checked />'+" "+y("desc").escaped+" "+" "+" "+' '+'<label for="mw-rtrc-settings-refresh" class="head">'+"R "+'<span section="Reload_Interval" class="helpicon"> '+" "+'<input type="number" value="3" min="0" max="99" size="2" id="mw-rtrc-settings-refresh" name="refresh" />'+" "+' '+' '+"CVN DB "+'<span section="IRC_Blacklist" class="helpicon"> '+'<input type="checkbox" class="switch" name="cvnDB" />'+" "+" "+' '+'<input class="button" type="button" id="RCOptions_submit" value="'+y("apply").escaped+'" />'+" "+" "+' '+' '+' '+y("tag").escaped+' <select class="mw-rtrc-setting-select" name="tag">'+e+" "+" "+" "+' '+' '+"MassPatrol"+' '+'<input type="checkbox" class="switch" name="massPatrol" />'+" "+" "+' '+' '+"AutoDiff"+' '+'<input type="checkbox" class="switch" name="autoDiff" />'+" "+" "+' '+' '+"Pause"+'<input class="switch" type="checkbox" id="rc-options-pause" />'+" "+" "+" "+" "+'<a name="krRTRC_DiffTop" />'+'<div class="mw-rtrc-diff mw-rtrc-diff-closed" id="krRTRC_DiffFrame"> '+' '+' '+' '+' '+'<small class="mw-rtrc-feed-cvninfo"> '+" "+'<img src="'+i+'" id="krRTRC_loader" style="display: none;" />'+' '+'Colors: '+b.message("markedaspatrolled").escaped+', '+y("currentedit").escaped+" , "+' '+y("skippededit").escaped+" , "+' Edit with an Automatic Edit Summary '+" Abbreviations: T - "+b.message("talkpagelinktext").escaped+", C - "+b.message("contributions",b.user).escaped+" "+" "+' '+' '+' '+"Real-Time Recent Changes by "+'<a href="//meta.wikimedia.org/wiki/User:Krinkle" class="external text" rel="nofollow">Krinkle</a>'+' | <a href="//meta.wikimedia.org/wiki/User:Krinkle/Tools/Real-Time_Recent_Changes" class="external text" rel="nofollow">'+y("documentation").escaped+"</a>"+' | <a href="https://github.com/Krinkle/mw-gadget-rtrc/releases" class="external text" rel="nofollow">'+y("changelog").escaped+"</a>"+' | <a href="https://github.com/Krinkle/mw-gadget-rtrc/issues" class="external text" rel="nofollow">Feedback</a>'+' | <a href="http://krinkle.mit-license.org" class="external text" rel="nofollow">License</a>'+" "+" "+" ")),F.find("input.switch").after(' '),F.find("#krRTRC_DiffFrame").on("click","table.diff a",function{var b=a(this);b.is('[href^="http://"], [href^="https://"], [href^="//"]')&&b.attr("target","_blank")}),a("#content").empty.append(F),C(function{a("html").addClass("mw-rtrc-ready")}),G=F.find(".mw-rtrc-body"),H=G.find(".mw-rtrc-feed")}function _{I=a("#RCOptions_submit"),I.click(function{return I.prop("disabled",!0).css("opacity","0.5"),N,Y(w.app.massPatrol),V,!1}),a("#diffClose").live("click",function{a("#krRTRC_DiffFrame").addClass("mw-rtrc-diff-closed"),D=E=!1}),a("a.diff").live("click",function(c){var e=a(this).closest(".mw-rtrc-item").addClass("mw-rtrc-item-current"),f=e.find(".page").text,g=a(this).attr("href"),h=a("#krRTRC_DiffFrame");H.find(".mw-rtrc-item-current").not(e).removeClass("mw-rtrc-item-current"),D=Number(e.data("diff")),E=Number(e.data("rcid")),h.addClass("mw-rtrc-diff-loading").removeClass("mw-rtrc-diff-newpage mw-rtrc-diff-closed"),a.ajax({url:b.util.wikiScript,dataType:"html",data:{action:"render",diff:D,diffonly:"1",uselang:d.wgUserLanguage}}).fail(function(a){h.append(a.responseText||"Loading diff failed.").removeClass("mw-rtrc-diff-loading")}).done(function(c){var d;d=-1!==a.inArray(E,q)?' <a id="diffUnskip">Unskip</a> ':' <a id="diffSkip">Skip</a> ',h.html(c).prepend(" "+b.html.escape(f)+" "+' '+' <a id="diffClose">X</a> '+' <a href="'+g+'" target="_blank" id="diffNewWindow">Open in Wiki</a> '+(l?"<span class=\"tab\"><a onclick=\"(function{ if($('.patrollink a').length){ $('.patrollink a').click; } else { $('#diffSkip').click; } });\">[mark]</a> ":"")+' <a id="diffNext">'+b.message("next").escaped.ucFirst+" &raquo;</a> "+d+" ").removeClass("mw-rtrc-diff-loading"),w.app.massPatrol&&h.find(".patrollink a").click}),c.preventDefault}),a("a.newPage").live("click",function(c){var e=a(this).closest(".mw-rtrc-item").addClass("mw-rtrc-item-current"),f=e.find(".page").text,g=e.find(".page").attr("href"),h=a("#krRTRC_DiffFrame");H.find(".mw-rtrc-item-current").not(e).removeClass("mw-rtrc-item-current"),E=Number(e.data("rcid")),h.addClass("mw-rtrc-diff-loading mw-rtrc-diff-newpage").removeClass("mw-rtrc-diff-closed"),a.ajax({url:g,dataType:"html",data:{action:"render",uselang:d.wgUserLanguage}}).fail(function(a){h.append(a.responseText||"Loading diff failed.").removeClass("mw-rtrc-diff-loading")}).done(function(c){var d;d=-1!==a.inArray(E,q)?' <a id="diffUnskip">Unskip</a> ':' <a id="diffSkip">Skip</a> ',h.html(c).prepend(" "+f+" "+' '+' <a id="diffClose">X</a> '+' <a href="'+g+'" target="_blank" id="diffNewWindow">Open in Wiki</a> '+' <a onclick="$(\'.patrollink a\').click">[mark]</a> '+' <a id="diffNext">'+b.message("next").escaped.ucFirst+" &raquo;</a> "+d+" ").removeClass("mw-rtrc-diff-loading"),w.app.massPatrol&&h.find(".patrollink a").click}),c.preventDefault}),a(".patrollink").live("click",function{var c=a(this);return c.find("a").text(b.msg("markaspatrolleddiff")+"..."),a.ajax({type:"POST",url:e,dataType:"json",data:{action:"patrol",format:"json",list:"recentchanges",rcid:E,token:l}}).done(function(d){if(!d||d.error)c.empty.append(a(' ').text(b.msg("markedaspatrollederror"))),b.log("Patrol error:",d);else{for(c.empty.append(a(' ').text(b.msg("markedaspatrolled"))),H.find('.mw-rtrc-item[data-rcid="'+E+'"]').addClass("mw-rtrc-item-patrolled"),r.push(E);r.length>j;)r.shift;w.app.autoDiff&&X}}).fail(function{c.empty.append(a(' ').text(b.msg("markedaspatrollederror")))}),!1}),a("#diffNext").live("click",function{X}),a("#diffSkip").live("click",function{H.find('.mw-rtrc-item[data-rcid="'+E+'"]').addClass("mw-rtrc-item-skipped"),q.push(E),X}),a("#diffUnskip").live("click",function{H.find('.mw-rtrc-item[data-rcid="'+E+'"]').removeClass("mw-rtrc-item-skipped"),q.splice(q.indexOf(E),1)}),a("#mw-rtrc-toggleHelp").click(function(b){b.preventDefault,a("#krRTRC_RCOptions").toggleClass("mw-rtrc-nohelp mw-rtrc-help")}),a(".mw-rtrc-settings .helpicon").attr("title",z("helpicon-tooltip")).click(function(b){b.preventDefault,window.open(h+"#"+a(this).attr("section"),"_blank")}),a("#mw-rtrc-settings-user-clr").click(function{a("#mw-rtrc-settings-user").val("")}),a(".mw-rollback-link a").live("click",function{a(".patrollink a").click}),a("#rc-options-pause").click(function{return this.checked?(clearTimeout(o),void 0):(V,void 0)})}function ab{a("#content").empty.append(a(" ").addClass("errorbox").text("This program requires functionality not supported in this browser."))}function bb{a("#content").empty.append(a(" ").addClass("errorbox").text("An unexpected error occurred."))}function cb{var c=a.Deferred,f=[c.promise];return b.loader.using("mediawiki.user",function{b.user.getRights(function(b){-1!==a.inArray("patrol",b)&&(k=!0),c.resolve})}),f.push(a.ajax({url:e,dataType:"json",data:{format:"json",action:"query",list:"recentchanges",rctoken:"patrol",rclimit:1,rctype:"new"}}).done(function(a){l=a.query.recentchanges[0].patroltoken})),f.push(a.ajax({url:e,dataType:"json",data:{action:"query",format:"json",meta:"allmessages",amlang:d.wgUserLanguage,ammessages:["ascending abbrev","blanknamespace","contributions","descending abbrev","diff","hide","markaspatrolleddiff","markedaspatrolled","markedaspatrollederror","namespaces","namespacesall","next","recentchanges-label-bot","recentchanges-label-minor","recentchanges-label-newpage","recentchanges-label-unpatrolled","show","talkpagelinktext"].join("|")}}).done(function(a){a=a.query.allmessages;for(var c=0;c<a.length;c++)b.messages.set(a[c].name,a[c]["*"])})),f.push(a.ajax({url:e,dataType:"json",data:{format:"json",action:"query",list:"tags",tgprop:"displayname"}}).done(function(b){var c=b.query&&b.query.tags;c&&(m=a.map(c,function(a){return a.name}))})),f.push(a.ajax({url:e,dataType:"json",data:{format:"json",action:"query",meta:"siteinfo"}}).done(function(a){n=a.query&&a.query.general.timeoffset||0})),a.when.apply(null,f)}function db{var c,e,f;return document.title="RTRC: "+d.wgDBname,a(function{a("#p-namespaces ul").find("li.selected").removeClass("new").find("a").text("RTRC")}),(f=!(!Date.UTC||!a.support.modernizr4rtrc.generatedcontent))?(a(".vector-animateLayout").removeClass("vector-animateLayout"),a("html").addClass("mw-rtrc-available"),B&&(A=localStorage.getItem("mw-rtrc-navtoggle-collapsed")||"true","true"===A&&a("html").toggleClass("mw-rtrc-navtoggle-collapsed")),c=a.Deferred,b.loader.using(["jquery.json","mediawiki.action.history.diff","mediawiki.jqueryMsg","mediawiki.Uri","mediawiki.user","mediawiki.util"],c.resolve,c.reject),b.libs.getIntuition||(b.libs.getIntuition=a.ajax({url:g,dataType:"script",cache:!0})),e=b.libs.getIntuition.then(function{return b.libs.intuition.load("rtrc")}).done(function{y=a.proxy(b.libs.intuition.message,null,"rtrc"),z=a.proxy(b.libs.intuition.msg,null,"rtrc")}),a.when(cb,c,e,a.ready).fail(bb).done(function{B&&a("body").append(a("#p-logo").clone.removeAttr("id").addClass("mw-rtrc-navtoggle-logo"),a(" ").addClass("mw-rtrc-navtoggle").attr("title",z("navtoggle-tooltip")).on("click",Z)),s=z("months").split(","),$,Q,_}),void 0):(a(ab),void 0)}var n,o,p,s,t,x,y,z,A,D,E,F,G,H,I,c="v0.9.12",d=b.config.get(["skin","wgAction","wgCanonicalSpecialPageName","wgPageName","wgServer","wgTitle","wgUserLanguage","wgDBname","wgScriptPath","wgScriptExtension"]),e=d.wgScriptPath+"/api"+d.wgScriptExtension,f="//cvn.wmflabs.org/api.php",g="//tools.wmflabs.org/intuition/load.php?env=mw",h="//meta.wikimedia.org/wiki/User:Krinkle/Tools/Real-Time_Recent_Changes?uselang="+d.wgUserLanguage,i="//upload.wikimedia.org/wikipedia/commons/d/de/Ajax-loader.gif",j=20,k=!1,l=!1,m=[],q=[],r=[],u=!1,v={rc:{start:void 0,end:void 0,dir:"older",namespace:void 0,user:void 0,tag:void 0,showAnonOnly:!1,showUnpatrolledOnly:!1,limit:25,typeEdit:!1,typeNew:!1},app:{refresh:3,cvnDB:!1,massPatrol:!1,autoDiff:!1}},w=a(!0,{},v),B="vector"===d.skin&&!!window.localStorage,C=window.requestAnimationFrame||setTimeout;String.prototype.ucFirst||(String.prototype.ucFirst=function{return this.charAt(0).toUpperCase+this.substring(1)}),x={newDateFromApi:function(a){var b=Date.UTC(parseInt(a.slice(0,4),10),parseInt(a.slice(5,7),10)-1,parseInt(a.slice(8,10),10),parseInt(a.slice(11,13),10),parseInt(a.slice(14,16),10),parseInt(a.slice(17,19),10));return new Date(b)},applyUserOffset:function(a){var c=b.user.options.get("timecorrection");return c=c?Number(c.split("|")[1]):n,a.setTime(a.getTime+1e3*60*c),a},getClocktimeFromApi:function(a){var b=x.applyUserOffset(x.newDateFromApi(a));return J(b.getUTCHours)+":"+J(b.getUTCMinutes)}},a(function{a("#t-rtrc").length||b.loader.using("mediawiki.util",function{b.util.addPortletLink("p-tb",b.util.getUrl("Special:BlankPage/RTRC"),"RTRC","t-rtrc","Monitor and patrol recent changes in real-time",null,"#t-specialpages")})}),function{function e(a,d,e,f){var g,h,i,j,k=document.createElement("div"),l=document.body,m=l||document.createElement("body");if(parseInt(e,10))for(e--;)i=document.createElement("div"),i.id=f?f[e]:c+(e+1),k.appendChild(i);return g=["&#173;",'<style id="s',c,'">',a," "].join(""),k.id=c,(l?k:m).innerHTML+=g,m.appendChild(k),l||(m.style.background="",m.style.overflow="hidden",j=b.style.overflow,b.style.overflow="hidden",b.appendChild(m)),h=d(k,a),l?k.parentNode.removeChild(k):(m.parentNode.removeChild(m),b.style.overflow=j),!!h}var b=document.documentElement,c="modernizr",d=":)";a.support.modernizr4rtrc={generatedcontent:function{return e(["#",c,"{font:0/0 a}#",c,':after{content:"',d,'";visibility:hidden;font:3px/1 a}'].join(""),function(a){return a.offsetHeight>=3})}}},("Krinkle/RTRC"===d.wgTitle&&"view"===d.wgAction||"Blankpage"===d.wgCanonicalSpecialPageName&&"RTRC"===d.wgTitle.split("/",2)[1])&&db}(jQuery,mediaWiki)},{css:},{});