From caa835030cd5e3bb6b198a073c2b4c087a239f89 Mon Sep 17 00:00:00 2001 From: denfil Date: Thu, 3 Mar 2016 17:51:47 +0300 Subject: [PATCH] Add js changes --- assets/css/app.css | 10 ---------- assets/js/all.min.js | 38 ++++++++++++++++++------------------ assets/js/item.js | 35 +++++++++++---------------------- templates/bookmark_links.php | 6 +++--- templates/show_item.php | 6 +++--- templates/status_links.php | 6 +++--- 6 files changed, 39 insertions(+), 62 deletions(-) diff --git a/assets/css/app.css b/assets/css/app.css index f80fb6b..141d636 100644 --- a/assets/css/app.css +++ b/assets/css/app.css @@ -757,16 +757,6 @@ ul.item-infos { text-align: center; } -a.icon { - color: #333; - text-decoration: none; -} - -a.icon:focus, -a.icon:hover { - color: #000; -} - #item-content-enclosure { border-bottom: 1px dashed #ccc; margin-bottom: 20px; diff --git a/assets/js/all.min.js b/assets/js/all.min.js index 887ab03..a4723fb 100644 --- a/assets/js/all.min.js +++ b/assets/js/all.min.js @@ -1,19 +1,19 @@ -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;cu[d])u[d]=h.time,"unread"===h.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":k.l(a.target.getAttribute("data-concurrent-requests"));break;case "refresh-feed":b&&k.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:k.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 b=pageYOffset+document.documentElement.clientHeight;(0>b-(a.offsetTop+a.offsetHeight)||b-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,h=a.length;c @@ -11,7 +11,7 @@ class="bookmark-icon" href="?action=bookmark&value=1&id=&menu=&offset=&source=" data-action="bookmark" - data-reverse-label="" + data-reverse-title="" title="" > - \ No newline at end of file + diff --git a/templates/show_item.php b/templates/show_item.php index 4b55adb..47c1f68 100644 --- a/templates/show_item.php +++ b/templates/show_item.php @@ -35,13 +35,13 @@
  • - + >
  • diff --git a/templates/status_links.php b/templates/status_links.php index e67dc92..8725b05 100644 --- a/templates/status_links.php +++ b/templates/status_links.php @@ -3,7 +3,7 @@ class="read-icon" href="?action=mark-item-read&id=&offset=&redirect=&feed_id=" data-action="mark-read" - data-reverse-label="" + data-reverse-title="" title="" > @@ -11,7 +11,7 @@ class="read-icon" href="?action=mark-item-unread&id=&offset=&redirect=&feed_id=" data-action="mark-unread" - data-reverse-label="" + data-reverse-title="" title="" > - \ No newline at end of file +