var h=function(){var b=[],d=5;return{j:function(a,c){var d=a.querySelector("span.items-count");if(d){var b=a.getAttribute("data-feed-id"),q=a.querySelector("h2:first-of-type");q.className="loading-icon";var p=new XMLHttpRequest;p.onload=function(){q.className="";a.removeAttribute("data-feed-error");var b=a.querySelector(".feed-last-checked");b&&(b.innerHTML=b.getAttribute("data-after-update"));b=JSON.parse(this.responseText);b.result?d.innerHTML=b.items_count.items_unread+"/"+b.items_count.items_total: a.setAttribute("data-feed-error","1");c?c(b):f.a()};p.open("POST","?action=refresh-feed&feed_id="+b,!0);p.send()}},l:function(a){var c=Array.prototype.slice.call(document.querySelectorAll("article:not([data-feed-disabled])"));a&&(d=a);var k=setInterval(function(){for(;0u[d])u[d]=k.time,"unread"===k.status&&(c=!0)}document.hidden||b.nbUnread===l&&!t?document.hidden&&!a&&c&&(t=!0,document.title="\u21bb "+ document.title):(t=!1,l=b.nbUnread,n())};a.open("POST","?action=latest-feeds-items",!0);a.send()}}}}(),m=function(){function b(a){if(63!==a.keyCode&&63!==a.which&&(a.ctrlKey||a.shiftKey||a.altKey||a.metaKey))return!0;a=a.target||a.srcElement;return"INPUT"===a.tagName||"TEXTAREA"===a.tagName?!0:!1}var d=[];return{c:"",s:function(){document.onclick=function(a){a.target.hasAttribute("data-action")&&"original"!==a.target.className&&a.preventDefault()};document.onmouseup=function(a){if(2!==a.button)if("INPUT"=== a.target.nodeName&&"auto-select"===a.target.className)a.target.select();else{var c=a.target.getAttribute("data-action");if(c){m.c="mouse";var b;a:{for(element=a.target;element&&element.parentNode;)if(element=element.parentNode,element.tagName&&"article"===element.tagName.toLowerCase()){b=element;break a}b=void 0}switch(c){case "refresh-all":h.l(a.target.getAttribute("data-concurrent-requests"));break;case "refresh-feed":b&&h.j(b);break;case "mark-read":b&&f.v(b);break;case "mark-unread":b&&f.A(b); break;case "mark-removed":b&&f.w(b);break;case "bookmark":b&&f.i(b);break;case "download-item":b&&f.h(b);break;case "mark-feed-read":a=document.getElementById("listing").getAttribute("data-feed-id"),f.B(a)}}}}},o:function(){document.onkeypress=function(a){if(!b(a))if(m.c="keyboard",d.push(a.key||a.which),"g"===d[0]||103===d[0])switch(d[1]){case void 0:break;case "u":case 117:window.location.href="?action=unread";d=[];break;case "b":case 98:window.location.href="?action=bookmarks";d=[];break;case "h":case 104:window.location.href= "?action=history";d=[];break;case "s":case 115:window.location.href="?action=feeds";d=[];break;case "p":case 112:window.location.href="?action=config";d=[];break;default:d=[]}else{d=[];var c=document.getElementById("current-item");switch(a.key||a.which){case "d":case 100:c&&f.h(c);break;case "p":case 112:case "k":case 107:v.g();break;case "n":case 110:case "j":case 106:v.f();break;case "v":case 118:c&&f.D(c);break;case "o":case 111:c&&f.H(c);break;case "m":case 109:c&&f.J(c);break;case "f":case 102:c&& f.i(c);break;case "h":case 104:v.F();break;case "l":case 108:v.C();break;case "r":case 114:h.l();break;case "?":case 63:v.I();break;case "z":case 122:f.K()}}};document.onkeydown=function(a){if(!b(a))switch(m.c="keyboard",a.key||a.which){case "ArrowLeft":case "Left":case 37:v.g();break;case "ArrowRight":case "Right":case 39:v.f()}}},u:function(){document.addEventListener("visibilitychange",function(){!document.hidden&&f.L()&&f.a()})}}}(),v=function(){function b(a){var c=pageYOffset+document.documentElement.clientHeight; (0>c-(a.offsetTop+a.offsetHeight)||c-a.offsetTop>document.documentElement.clientHeight)&&window.scrollTo(0,a.offsetTop-10)}function d(){return document.getElementById("listing")?!0:!1}return{C:function(){var a=document.getElementById("next-page");a&&a.click()},F:function(){var a=document.getElementById("previous-page");a&&a.click()},f:function(){var a=document.getElementById("next-item");if(a)a.click();else if(d())if(a=document.getElementsByTagName("article"),document.getElementById("current-item"))for(var c= 0,k=a.length;c