From da174a10cc07c517c0a3704f917a167e184f092f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Guillot?= Date: Fri, 2 Jan 2015 12:43:17 -0500 Subject: [PATCH] Display the bookmarklet in a text box to be easy to copy and paste --- assets/css/app.css | 8 +++----- assets/js/all.min.js | 36 +++++++++++++++++----------------- assets/js/event.js | 9 +++++++++ locales/cs_CZ/translations.php | 2 +- locales/de_DE/translations.php | 2 +- locales/es_ES/translations.php | 2 +- locales/fr_FR/translations.php | 2 +- locales/it_IT/translations.php | 2 +- locales/pt_BR/translations.php | 2 +- locales/zh_CN/translations.php | 2 +- templates/about.php | 10 ++++++---- 11 files changed, 43 insertions(+), 34 deletions(-) diff --git a/assets/css/app.css b/assets/css/app.css index 327d754..aa7493d 100644 --- a/assets/css/app.css +++ b/assets/css/app.css @@ -346,7 +346,7 @@ span#nav-counter:not(:empty):after, span#page-counter:not(:empty):after, span.it content: ")"; } -@keyframes blinker { +@keyframes blinker { 0% { opacity: 1.0; } 50% { opacity: 0.0; } 100% { opacity: 1.0; } @@ -360,7 +360,7 @@ span#nav-counter:not(:empty):after, span#page-counter:not(:empty):after, span.it } .loading-icon:before { - content: "☀"; + content: "☀"; animation-name: blinker; -webkit-animation-name: blinker; /* Chrome, Safari, Opera */ animation-duration: 500ms; @@ -720,7 +720,7 @@ iframe { padding: 4px; text-decoration: none; color: #333; - background: #fcfcfc; + background: #fff; border: 1px dotted #ccc; border-radius: 4px; cursor: move; @@ -728,9 +728,7 @@ iframe { .bookmarklet:focus, .bookmarklet:hover { - background: #fff; color: #339966; - border: 1px solid #ccc; } /* desktop design */ diff --git a/assets/js/all.min.js b/assets/js/all.min.js index a1d10a1..424766b 100644 --- a/assets/js/all.min.js +++ b/assets/js/all.min.js @@ -1,20 +1,20 @@ var Miniflux={};Miniflux.App=function(){return{Run:function(){Miniflux.Event.ListenKeyboardEvents();Miniflux.Event.ListenMouseEvents()}}}(); -Miniflux.Feed=function(){var d=[];return{Update:function(c,b){var a=c.querySelector("span.items-count");if(a){var d=c.getAttribute("data-feed-id"),e=c.querySelector("h2:first-of-type");e.className="loading-icon";var f=new XMLHttpRequest;f.onload=function(){e.className="";var f=c.querySelector(".feed-last-checked");f&&(f.innerHTML=f.getAttribute("data-after-update"));if(f=c.querySelector(".feed-parsing-error"))f.innerHTML="";var d=JSON.parse(this.responseText);d.result?a.innerHTML=d.items_count.items_unread+ -"/"+d.items_count.items_total:f&&(f.innerHTML=f.getAttribute("data-after-error"));b&&b(d)};f.open("POST","?action=refresh-feed&feed_id="+d,!0);f.send()}},UpdateAll:function(){var c=Array.prototype.slice.call(document.querySelectorAll("article:not([data-feed-disabled])")),b=setInterval(function(){for(;0d.length;){var a=c.shift();d.push(parseInt(a.getAttribute("data-feed-id")));Miniflux.Feed.Update(a,function(a){a=d.indexOf(a.feed_id);0<=a&&d.splice(a,1);0===c.length&&0===d.length&&(clearInterval(b), +Miniflux.Feed=function(){var e=[];return{Update:function(c,b){var a=c.querySelector("span.items-count");if(a){var e=c.getAttribute("data-feed-id"),d=c.querySelector("h2:first-of-type");d.className="loading-icon";var f=new XMLHttpRequest;f.onload=function(){d.className="";var f=c.querySelector(".feed-last-checked");f&&(f.innerHTML=f.getAttribute("data-after-update"));if(f=c.querySelector(".feed-parsing-error"))f.innerHTML="";var e=JSON.parse(this.responseText);e.result?a.innerHTML=e.items_count.items_unread+ +"/"+e.items_count.items_total:f&&(f.innerHTML=f.getAttribute("data-after-error"));b&&b(e)};f.open("POST","?action=refresh-feed&feed_id="+e,!0);f.send()}},UpdateAll:function(){var c=Array.prototype.slice.call(document.querySelectorAll("article:not([data-feed-disabled])")),b=setInterval(function(){for(;0e.length;){var a=c.shift();e.push(parseInt(a.getAttribute("data-feed-id")));Miniflux.Feed.Update(a,function(a){a=e.indexOf(a.feed_id);0<=a&&e.splice(a,1);0===c.length&&0===e.length&&(clearInterval(b), window.location.href="?action=unread")})}},100)}}}(); -Miniflux.Item=function(){function d(e){return item_id=e.getAttribute("data-item-id")}function c(e){if(e&&e.hasAttribute("data-reverse-label")){var b=e.innerHTML;e.innerHTML=e.getAttribute("data-reverse-label");e.setAttribute("data-reverse-label",b)}}function b(e){"mouse"!==Miniflux.Event.lastEventType&&Miniflux.Nav.SelectNextItem();e.parentNode.removeChild(e);if(e=document.getElementById("page-counter")){var b=document.querySelector("section.page"),a=parseInt(e.textContent,10)-1,c=document.getElementsByTagName("article"); -if(0===a||0===c.length)window.location=location.href;e.textContent=a;switch(b.getAttribute("data-item-page")){case "unread":document.title="Miniflux ("+a+")";document.getElementById("nav-counter").textContent=a;break;case "feed-items":document.title="("+a+") "+e.parentNode.firstChild.nodeValue;break;default:document.title=e.parentNode.firstChild.nodeValue+" ("+a+")"}}}function a(e){var a=d(e),g=new XMLHttpRequest;g.onload=function(){if(Miniflux.Nav.IsListing())if(e.getAttribute("data-hide"))b(e); -else{e.setAttribute("data-item-status","read");var a=e.querySelector("a.mark");c(a);(a=e.querySelector("a.mark"))&&a.setAttribute("data-action","mark-unread")}};g.open("POST","?action=mark-item-read&id="+a,!0);g.send()}function h(e){var a=d(e),g=new XMLHttpRequest;g.onload=function(){if(Miniflux.Nav.IsListing())if(e.getAttribute("data-hide"))b(e);else{e.setAttribute("data-item-status","unread");var a=e.querySelector("a.mark");c(a);(a=e.querySelector("a.mark"))&&a.setAttribute("data-action","mark-read")}}; -g.open("POST","?action=mark-item-unread&id="+a,!0);g.send()}return{MarkAsRead:a,MarkAsUnread:h,MarkAsRemoved:function(a){var c=d(a),g=new XMLHttpRequest;g.onload=function(){Miniflux.Nav.IsListing()&&b(a)};g.open("POST","?action=mark-item-removed&id="+c,!0);g.send()},SwitchBookmark:function(a){var f=d(a),g="1"===a.getAttribute("data-item-bookmark")?"0":"1",k=new XMLHttpRequest;k.onload=function(){var f=document.querySelector("section.page");if(Miniflux.Nav.IsListing()&&"bookmarks"===f.getAttribute("data-item-page"))b(a); -else if(a.setAttribute("data-item-bookmark",g),Miniflux.Nav.IsListing())f=a.querySelector("a.bookmark"),c(f);else if((f=a.querySelector("a.bookmark-icon"))&&f.hasAttribute("data-reverse-title")){var d=f.getAttribute("title");f.setAttribute("title",f.getAttribute("data-reverse-title"));f.setAttribute("data-reverse-title",d)}};k.open("POST","?action=bookmark&id="+f+"&value="+g,!0);k.send()},SwitchStatus:function(b){var f=b.getAttribute("data-item-status");"read"===f?h(b):"unread"===f&&a(b)},Show:function(a){(a= -a.querySelector("a.show"))&&a.click()},OpenOriginal:function(b){var f=b.querySelector("a.original");f&&("unread"===b.getAttribute("data-item-status")&&a(b),f.removeAttribute("data-action"),f.click())},DownloadContent:function(a){var b=document.getElementById("download-item");if(b){b.innerHTML=" "+b.getAttribute("data-before-message");b.className="loading-icon";var c=new XMLHttpRequest;c.onload=function(){var a=JSON.parse(c.responseText);b.className="";if(a.result){var e=document.getElementById("item-content"); -e&&(e.innerHTML=a.content);b.innerHTML=b.getAttribute("data-after-message")}else b.innerHTML=b.getAttribute("data-failure-message")};a=d(a);c.open("POST","?action=download-item&id="+a,!0);c.send()}},MarkListingAsRead:function(a){for(var b=document.getElementsByTagName("article"),c=[],k=0,h=b.length;ka-(b.offsetTop+b.offsetHeight)||a-b.offsetTop>document.documentElement.clientHeight)&&window.scrollTo(0,b.offsetTop-10)}function c(){return document.getElementById("listing")?!0:!1}return{OpenNextPage:function(){var b=document.getElementById("next-page");b&&b.click()},OpenPreviousPage:function(){var b=document.getElementById("previous-page");b&&b.click()},SelectNextItem:function(){var b=document.getElementById("next-item"); -if(b)b.click();else if(c())if(b=document.getElementsByTagName("article"),document.getElementById("current-item"))for(var a=0,h=b.length;aa-(b.offsetTop+b.offsetHeight)||a-b.offsetTop>document.documentElement.clientHeight)&&window.scrollTo(0,b.offsetTop-10)}function c(){return document.getElementById("listing")?!0:!1}return{OpenNextPage:function(){var b=document.getElementById("next-page");b&&b.click()},OpenPreviousPage:function(){var b=document.getElementById("previous-page");b&&b.click()},SelectNextItem:function(){var b=document.getElementById("next-item"); +if(b)b.click();else if(c())if(b=document.getElementsByTagName("article"),document.getElementById("current-item"))for(var a=0,g=b.length;a '', // 'Go to subscriptions' => '', // 'Go to preferences' => '', - // 'Bookmarklet:' => '', + // 'Bookmarklet' => '', // 'Subscribe with Miniflux' => '', // 'Drag and drop this link to your bookmarks' => '', // 'Download full content' => '', diff --git a/locales/de_DE/translations.php b/locales/de_DE/translations.php index 3568dd7..b4e3d40 100644 --- a/locales/de_DE/translations.php +++ b/locales/de_DE/translations.php @@ -33,7 +33,7 @@ return array( 'Go to history' => 'Zu dem Verlauf gehen', 'Go to subscriptions' => 'Zu den Abonnements gehen', 'Go to preferences' => 'Zu den Einstellungen gehen', - 'Bookmarklet:' => 'Bookmarklet:', + 'Bookmarklet' => 'Bookmarklet', 'Subscribe with Miniflux' => 'Mit Miniflux abonnieren', 'Drag and drop this link to your bookmarks' => 'Ziehe diesen Link in deine Lesezeichen', 'Download full content' => 'Vollständigen Inhalt herunterladen', diff --git a/locales/es_ES/translations.php b/locales/es_ES/translations.php index bf283bc..d8b3cab 100644 --- a/locales/es_ES/translations.php +++ b/locales/es_ES/translations.php @@ -33,7 +33,7 @@ return array( 'Go to history' => 'Ir al historial', 'Go to subscriptions' => 'Ir a suscripciones', 'Go to preferences' => 'Ir a preferencias', - 'Bookmarklet:' => 'Bookmarklet:', + 'Bookmarklet' => 'Bookmarklet', 'Subscribe with Miniflux' => 'Suscribir con Miniflux', 'Drag and drop this link to your bookmarks' => 'Arrastrar y soltar el enlace en los marcadores', 'Download full content' => 'Descargar contenido completo', diff --git a/locales/fr_FR/translations.php b/locales/fr_FR/translations.php index 03e8d90..bb02745 100644 --- a/locales/fr_FR/translations.php +++ b/locales/fr_FR/translations.php @@ -33,7 +33,7 @@ return array( 'Go to history' => 'Voir l\'historique', 'Go to subscriptions' => 'Voir les abonnements', 'Go to preferences' => 'Voir les préférences', - 'Bookmarklet:' => 'Bookmarklet :', + 'Bookmarklet' => 'Bookmarklet', 'Subscribe with Miniflux' => 'S\'abonner avec Miniflux', 'Drag and drop this link to your bookmarks' => 'Glisser-déposer ce lien dans vos favoris', 'Download full content' => 'Télécharger le contenu complet', diff --git a/locales/it_IT/translations.php b/locales/it_IT/translations.php index 29303b0..3e15259 100644 --- a/locales/it_IT/translations.php +++ b/locales/it_IT/translations.php @@ -33,7 +33,7 @@ return array( // 'Go to history' => '', // 'Go to subscriptions' => '', // 'Go to preferences' => '', - // 'Bookmarklet:' => '', + // 'Bookmarklet' => '', // 'Subscribe with Miniflux' => '', // 'Drag and drop this link to your bookmarks' => '', // 'Download full content' => '', diff --git a/locales/pt_BR/translations.php b/locales/pt_BR/translations.php index 6c6166e..4bd6954 100644 --- a/locales/pt_BR/translations.php +++ b/locales/pt_BR/translations.php @@ -33,7 +33,7 @@ return array( 'Go to history' => 'Ir para histórico', 'Go to subscriptions' => 'Ir para assinaturas', 'Go to preferences' => 'Ir para preferências', - // 'Bookmarklet:' => '', + // 'Bookmarklet' => '', 'Subscribe with Miniflux' => 'Assinar com Miniflux', 'Drag and drop this link to your bookmarks' => 'Arraste e solte este link para seus bookmarks', 'Download full content' => 'Download contéudo completo', diff --git a/locales/zh_CN/translations.php b/locales/zh_CN/translations.php index d6923e4..cc30cc2 100644 --- a/locales/zh_CN/translations.php +++ b/locales/zh_CN/translations.php @@ -33,7 +33,7 @@ return array( // 'Go to history' => '', // 'Go to subscriptions' => '', // 'Go to preferences' => '', - // 'Bookmarklet:' => '', + // 'Bookmarklet' => '', // 'Subscribe with Miniflux' => '', // 'Drag and drop this link to your bookmarks' => '', // 'Download full content' => '', diff --git a/templates/about.php b/templates/about.php index e0709a1..3641f11 100644 --- a/templates/about.php +++ b/templates/about.php @@ -10,16 +10,18 @@
-

+

    -
  • - - ()
+
+

+ () + +