Commit Graph

31 Commits

Author SHA1 Message Date
Frederic Guillot
cd01042f7d
Javascript cleanup 2016-07-30 18:21:01 -04:00
Frederic Guillot
27d094c19e
Do not use anymore Closure compiler for Javascript 2016-07-30 18:01:37 -04:00
Samuel Gyger
fe306b22f8 Added the possibility to swipe to archive an item. 2016-07-29 11:58:47 +02:00
Denis Filimonov
c26418fbae Simple search by items title (#506) 2016-05-03 20:15:20 -04:00
denfil
08ea480402 Replace help window by layer 2016-03-06 19:11:08 +03:00
Kordian Bruck
fb688cfc10 Merge branch 'master' of github.com:miniflux/miniflux into feature-custom-refresh-number
Conflicts:
	assets/js/all.min.js
2015-08-02 18:22:18 +02:00
Kordian Bruck
2c3fd54774 Added a config option to select how many concurrent refreshes are done on the subscription page 2015-08-02 02:23:21 +02:00
Mathias Kresin
32658ef4e1 deduplicate data-feed-id 2015-07-20 13:08:16 +02:00
Mathias Kresin
7ea37a1790 remove unnecessary javascript actions
They do exactly the same as the non javascript version.
2015-04-23 23:37:33 +02:00
Mathias Kresin
ee98a62519 mark items on page 2+ read as well, update tests
Update integration tests, to ensure that all articles are marked read,
instead of only visible.
2015-04-07 22:46:50 +02:00
Mathias Kresin
0c3d8c787f use keyboardevent.key if implemented
Beside other stuff the main reason for this change is the circumstance
that Firefox triggers the "Toggle RTL mode" shortcut if the user press
F11 to switch Firefox into the fullscreen mode.

Each browser sends keycodes that are used by different other keys on
the keyboard for the function keys. Firefox is the only browser which
sends the onkeypress event for the function keys.

The used keyboard event properties event.keyCode and event.which are
already marked as deprecated and has been removed from the Web standards.

The "DOM Level 3 Events" standard specifies event.key as their successor.

Right now event.key is only available for Firefox 29+ and Internet
Explorer 9+. Webkit based browser have support for the former specified
event.keyIdentifier.

The implementation of event.keyIdentifier isn't the same across
different webkit based browsers and buggy:

- the value for the z key is F11 (Chrome - Windows, Linux)
- the value for the F11 key is F11 as well on (Chrome - Windows, Linux)
- the value for latin keys is always the value of the capital letter (Chrome)
- the value for cyrillic keys depends on the shift modifier (Chrome)
- the value for the keypress event is always an empty string (Safari - Mac OS)
- the value for the keydown event matches the keyboard layout dependent character (Safari - Mac OS)
- the value for the keydown event does NOT matches the keyboard layout dependent character (Chrome - Windows, Linux)

Instead of workaround the problems, the event.which is used for every
browser that doesn't support event.key.
2015-03-07 18:23:36 +01:00
Mathias Kresin
4809f736dc implement mark-feed-as-read in javascript 2015-03-01 19:56:28 +01:00
Mathias Kresin
a2686ae21d add option to disable mark as read for original link
fixes #196
2015-01-30 00:14:01 +01:00
Mathias Kresin
cd13efeabf implement frontend autoupdate
Only the unread counter is updated right know.

The AutoUpdate Feature is designed on the premise of don't wasting resources. A
distinction is made between updates when Miniflux is visible or hidden.

To determine the visibility status, the Page Visibility API is used. The API is
available starting with Chrome 33, Firefox 18 and IE10. [https://developer.mozilla.org/en-US/docs/Web/Guide/User_experience/Using_the_Page_Visibility_API]
As IE9 returns an undefined, it doesn't break the compatibility at least.

If Miniflux is visible, the unread counter on the web page is updated as soon as
a mismatch between the counter and the number of unread articles in the database
is found.

If Miniflux is hidden, the timestamp of the most recent article from each feed
is compared with the value from the last run. We have an update If the timestamp
of the latest article is greater than the stored one and the latest article is
unread. The web page title is updated with a ? symbol to notify the user and the
update check pauses till Miniflux gets visible again. If Miniflux gets visible
again, the number of unread articles is queried from the database, the unread
counter on the web page is updated and finally the ? symbol is removed from the
web page title.

This way I can use my fever API client to read new articles (or at least the
latest article) while Miniflux is hidden and as I've seen the new articles
already a new articles notification is prevented.

It's intentionally that the page does not reload automatically as long as
articles are visible. If I'm in hurry, I only scroll through the articles to
spot something interesting. Most of the time I don't reach the last article.
If the page is reloaded while I'm away, I would have to scan from the top again.

If we're on a nothing_to_read page and have unread articles in the database, a
redirect to the unread page will be done.

The default update check interval is 10 minutes and can be changed on the
settings page. A zero value disables the update check entirely.

fixes #213
2015-01-28 05:26:55 +01:00
Mathias Kresin
816b793e4c re-enable help shortcut for Firefox, fix javascript errors 2015-01-18 01:26:28 +01:00
Frederic Guillot
84078bb2a5 Add left/right arrow as keyboard shortcuts 2015-01-12 19:46:21 -05:00
Mathias Kresin
80952f29b0 middle mouse button triggers event for all browser
This is a follow up to #1. The onclick event is triggered by different
mouse buttons across browsers:

Firefox
- all mouse buttons trigger document.onclick (https://bugzilla.mozilla.org/show_bug.cgi?id=430310)
- only left mouse button triggers document.body.onclick

Internet Explorer
- only left mouse button and without any modifier key triggers
  document.onclick

Chrome
- left & middle mouse button trigger document.onclick

Safari
- left mouse button triggers document.onclick
- middle click via mac os?

By switching to the onmouseup event this can be unified for all
mentioned browsers to:

- (CTRL+) left click triggers event
- middle click triggers event
- right click does nothing
2015-01-03 23:17:10 +01:00
Mathias Kresin
1e1e35e38c IE: 'open original' doesn't open article
The 'open original' link marks the item as read but doesn't open the
article.

After double clicking one 'open original' link, all other
'open original' links open the article as expected. Sounds like the IE
blocks the 'popup' silenty here.

The following in #196 reported issues are fixed by the change as well:
- a middle click on an 'open original' link triggers the popup blocker
- original link opened via middle click is always a foreground tab
2015-01-03 23:02:59 +01:00
Frédéric Guillot
da174a10cc Display the bookmarklet in a text box to be easy to copy and paste 2015-01-02 12:43:17 -05:00
Mathias Kresin
9d31eb1a01 Fix feed-last-checked update after refresh-all
I've dropped it accidentally with my last commit. Furthermore I moved
the data-feed-id definition to the article element and dropped multiple
references of the feed id. That's similar to what I've done before with
the data-item-id in 3dae99ac.

The article element holds the information whether a feed is disabled now.

Now it is shown if a feed had errors while updating.
2014-12-31 17:14:19 +01:00
Frédéric Guillot
5690f91fb7 Add keyboard shortcut to toggle RTL mode 2014-12-23 22:13:23 -05:00
Frédéric Guillot
f398694a45 Fix broken keyboard shortcut to display the help 2014-11-23 10:23:28 -05:00
Mathias Kresin
3dae99ac27 remove multiple definition of item id
The item id exists as data attribute or as element.id postfix on multiple
elements in an article.

The basic idea is to traverse the DOM tree - starting from the event firing
element - in reverse order till an article element is found.

This article element is passed to the JavaScript functions. These JavaScript
functions are getting the elements which they want to manipulate starting from
the article utilizing the JavaScript querySelector function.

The bootstrap themes had a conflicting and unused class style definied, which is
removed by now.
2014-11-20 10:43:29 +01:00
Frédéric Guillot
f4efaadad1 Remove Google auth (openid is deprecated) and Persona auth (useless) 2014-11-07 20:53:50 -05:00
Frédéric Guillot
c0ce32094e Do not handle keyboard events for form fields 2014-10-26 10:27:27 -04:00
Jarek Piórkowski
7bf2bab92c keyboard shortcuts won't fire with modifier keys
I had particular problems with Ctrl-N (open new window/tab)
interfering with N (go to next unread item). This change
disregards keyboard shortcuts if Alt, Shift, or Ctrl are used.
It also tries to disregard Win/Super/Meta, though this didn't
work for me in Firefox. Still, just the Ctrl is an improvement
for me.
2014-09-05 02:30:40 -07:00
Frédéric Guillot
8d93fbc48c Remove items via ajax requests (merge pull-request #227) 2014-07-26 08:01:25 -04:00
Frédéric Guillot
555fd9279d Fix bug: open original link doesn't mark item as read 2014-04-04 18:41:24 -04:00
Frédéric Guillot
2d2afcd786 Do not select next item for mouse events only for keyboard shortcuts 2014-02-14 21:37:07 -05:00
chrislemonier
596d69953b Added "r" keyboard shortcut for "Update all subscriptions" 2013-10-31 12:27:33 -07:00
Frédéric Guillot
b3b1e8bef7 Code refactoring (JS and templates) 2013-10-14 22:38:07 -04:00