Commit Graph

264 Commits

Author SHA1 Message Date
Prashant Tholia
6f23999c7b Remember open categories (#3185)
* feature(normal) - Remember opened categories in the left menu

Session storage based implementation to remember opened categories in left menu

Issue Ref: #2248

* lib_phpQuery updates

* Updates covering feedback points and functionality fixes

* Feedback updates

* Revert "lib_phpQuery updates"

This reverts commit dcd23b9418.

* First review

Change variable name to "remember" instead of "open".
Start using localStorage instead of sessionStorage.
Simplify code.

* Simplify remember categories init function

Replace 'session' with 'local' in function names and comment

Set open categories CSS as same as when category is opened in 'active' unfold mode

* Remove URLSearchParams check in remember categories init function

* Delete open categories on login and logout

* JSHint check fix

* Second review

* Make new mode the default for new users
* Always open active category
* Reduce / simplify code

* i18n French

* Revert default value

Wait a bit more for this decision / change

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2020-11-02 12:03:16 +01:00
Alexandre Alapetite
a69a7531b6 Remember sidebar position (#3231)
#fix https://github.com/FreshRSS/FreshRSS/issues/3209
Extracted from https://github.com/FreshRSS/FreshRSS/pull/3185
2020-10-19 11:38:27 +02:00
Alexandre Alapetite
191cda42e6 Misc. minor
Whitespace...
2020-10-11 10:59:43 +02:00
Alexis Degrugillier
dc68783fc8 Add controls on media (#3036)
Now, there is a shortcut to play or pause media available from an
entry. If there is more than one media available, only the first
one will be targeted.

See #1952
2020-06-05 23:37:05 +02:00
Alexandre Alapetite
3bef867a44 Better hide spinner (#2990)
Fix https://github.com/FreshRSS/FreshRSS/issues/2986#issuecomment-631396735
By CSS, and also by JS
https://framagit.org/nicofrand/xextension-threepanesview/-/issues/10
2020-05-21 12:17:21 +02:00
Alexandre Alapetite
0d235cbadd Swap shortcuts for mark all articles as read / mark previous articles as read (#2881)
* Swap shortcuts for mark all articles as read / mark previous articles as read

#fix https://github.com/FreshRSS/FreshRSS/issues/2865
Follow-up of https://github.com/FreshRSS/FreshRSS/pull/2843
* <kbd>⇧ Shift</kbd>+<kbd>R</kbd> to mark all articles as read;
* <kbd>Alt ⎇</kbd>+<kbd>r</kbd> to mark previous articles as read.

* i18n
2020-04-08 13:17:20 +02:00
Alexandre Alapetite
a7b72481e7 Shortcut mark previous articles as read (#2843)
* Shortcut mark previous articles as read

Address part of https://github.com/FreshRSS/FreshRSS/issues/2836
The shortcut [shift]+[r] now marks previous articles as read;
The previous action of marking all articles as read is now achieved by
[alt]+[r]
So this is a slight breaking change, but I like the logic of the
upward-facing [shift] arrow to hint at previous articles, while [alt] is
more like "all", at least to my eyes :-)

* Update app/i18n/nl/conf.php

Co-Authored-By: Frans de Jonge <fransdejonge@gmail.com>

* [⇧ Shift] / [Alt ⎇]

With standard Unicode signs

* <kbd> + CSS styling

* Missing themes

Tested with all themes

* Travis CSS

Co-authored-by: Frans de Jonge <fransdejonge@gmail.com>
2020-03-23 23:05:01 +01:00
Alexandre Alapetite
8fabed337a Reset scroll (#2842)
Address some of https://github.com/FreshRSS/FreshRSS/issues/2836
This patch resets the scrollbar to the top when a FreshRSS page is
initialised.
Makes sure that when a FreshRSS page is restored in a Web browser
session, we do not hit the problematic situation when the content is
refreshed but the scrollbar moved back to where it was, potentially
erroneously marking as read many as read, of landing on the wrong focus.
2020-03-23 22:29:26 +01:00
Julien-Pierre Avérous
d30ac40772 Enhance content path feature (#2778)
- Add a maintenance section to be able to clear cache and force reload a feed.
- Add an icon next to path field to show a pop-up with the result of the content path.

Co-authored-by: Frans de Jonge <fransdejonge@gmail.com>
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
Co-authored-by: Marien Fressinaud <dev@marienfressinaud.fr>
2020-02-13 18:22:35 +01:00
Alexis Degrugillier
1ce94136e0 Update navigation on empty feeds (#2687)
When using feed navigation, the previous behavior was to cycle through all
available feeds regardless of their content. To match the behaviour of the
first feed and last feed navigation shortcuts, the navigation now skips
empty feeds. Now it's consistent through out the application.
When using feed navigation with only empty feeds, the new behavior is to
cycle through all available feeds.

See #2385
2019-12-04 08:29:20 +01:00
Alexandre Alapetite
21936c1373 Comply with LibreJS (#2576)
https://www.gnu.org/software/librejs/
https://addons.mozilla.org/firefox/addon/librejs/
Did not touch jquery.min.js because it is a third party script, which is regularly updated, and the add-on does not seem to block it enough to break our statitics page, which remains usable.
2019-10-20 22:10:24 +02:00
Alexandre Alapetite
ec5f7ad554 Workaround for Firefox favicon glitch (#2543)
Observed in Firefox 69: the favicon is sometimes refreshed with an old
favicon that does not have the number of unread items on it. Seems to
depend on load speed.
2019-10-01 18:12:48 +02:00
rocka
1f3672fcc1 Optimize dynamic favicon for HiDPI screens (#2539)
This PR leveraging `window.devicePixelRatio` to generate high resolution favicons for HiDPI screens.
2019-09-28 12:10:51 +02:00
Alexandre Alapetite
125a83efc9 IE11 / Edge keyboard compatibility (#2507)
https://github.com/FreshRSS/FreshRSS/pull/2506#issuecomment-523544684
2019-08-22 20:13:40 +02:00
ArthurHoaro
3f8804f54f Prevent window opener vulnerability with space shortcut (#2506)
* Prevent window opener vulnerability with space shortcut

This change fixes a vulnerability introduced by `window.open()` on untrusted sources. It reproduces the effect of `rel="noreferrer"` with JS.

Cross browser solution from: https://stackoverflow.com/a/40593743

## Reproduction

> tested with Firefox 68

  1. Add this RSS feed
  2. Open the 2nd link "À propos de la faille de sécurité liée à target="_blank" **using the space key shortcut**.
  3. Click on the first of three links "http://bookmarks.ecyseo.net"

Current behaviour: the FreshRSS tab changes.
Expected behaviour: no effect on FreshRSS

* Test for popup blockers
2019-08-21 21:14:22 +02:00
Alexis Degrugillier
d5ea3e96ef Add theme to print page
Before, the printed page didn't have any usable CSS.
Now, it uses the css files available in the application. It means that
custom CSS can be add to target printed page.

See #2149
2019-04-16 18:50:32 +02:00
Alexandre Alapetite
aef3f8d71b Alow mix of auto read options (#2354)
Fix
https://github.com/FreshRSS/FreshRSS/pull/2349#issuecomment-480540126
2019-04-07 00:29:37 +02:00
Alexandre Alapetite
1b7cf6b035 Fix menu warning (#2353)
confirm is only for labels, not for feeds
2019-04-06 17:05:53 +02:00
Alexandre Alapetite
43e3a2d69d Fix autoremove again (#2352)
Fix https://github.com/FreshRSS/FreshRSS/pull/2349
2019-04-06 16:45:21 +02:00
Alexandre Alapetite
0a067dbcd4 Fix hide articles + batch option (#2349)
https://github.com/FreshRSS/FreshRSS/issues/2332
https://github.com/FreshRSS/FreshRSS/issues/2345
Re-introduces the instant-remove article.
Batch mark-as-read only used for fast actions like scroll and keyboard
shortcut for next/previous articles.
2019-04-06 15:51:39 +02:00
Alexandre Alapetite
09a5b4493d Better handling of bad request and fast unload (#2346)
* Better handling of bad request and fast unload

Warnings for bad requests, confirmation before leaving a page with
pending mark-as-read requests (not the others for now)

* Fix callbacks
2019-04-06 09:24:22 +02:00
Alexandre Alapetite
e1bb23ee44 Fix scroll functions in Edge (#2337)
Use more standard / robust document.scrollingElement
2019-04-04 00:02:23 +02:00
Alexandre Alapetite
2efab9893c Fix shortcut problem when showing articles unfolded (#2336)
Fix https://github.com/FreshRSS/FreshRSS/issues/2328
2019-04-03 23:10:33 +02:00
Alexandre Alapetite
452419bf83 Fix auto_remove_article (#2334)
* Fix auto_remove_article

https://github.com/FreshRSS/FreshRSS/issues/2323

* Second attempt

* Third attempt
2019-04-03 23:08:46 +02:00
Alexandre Alapetite
8599dc29a1 Fix control click (#2330)
https://github.com/FreshRSS/FreshRSS/issues/2310
2019-04-02 22:46:56 +02:00
Alexandre Alapetite
e5c8d52aa1 Fix ASC load more (#2318)
https://github.com/FreshRSS/FreshRSS/issues/2314
2019-04-01 23:43:20 +02:00
Alexandre Alapetite
09362f15ee Minor code simplification
https://github.com/FreshRSS/FreshRSS/pull/2300
2019-03-27 00:08:59 +01:00
Alexandre Alapetite
580123fdb0 Wait for mark-as-read queue before click (#2300) 2019-03-25 08:46:31 +01:00
Alexandre Alapetite
ebd8c31c02 Rework CSRF interaction with sessions (#2290)
* Rework CSRF interaction with sessions

Fix https://github.com/FreshRSS/FreshRSS/issues/2288
Improve security in some edge cases
Maybe relevant for
https://github.com/FreshRSS/FreshRSS/issues/2125#issuecomment-474992671

* Forgotten mime type
2019-03-22 19:05:38 +01:00
Alexandre Alapetite
54a86990e6 Improved auto load more articles
Fixed bug + ealier trigger of load more (half of the window height
instead of 0)
2019-03-09 19:15:46 +01:00
Alexandre Alapetite
b869c2944a JavaScript fixes + new navigation loop behaviour (#2255)
* Fixed user configuration 404
https://github.com/FreshRSS/FreshRSS/pull/2234#issuecomment-466561555
* Fixed "SPACE" shortcut bug
https://github.com/FreshRSS/FreshRSS/pull/2234#issuecomment-466626412
* Use next feed / previous feed when reaching last / first article
instead of looping
* Jump to next / previous category when reaching last / first feed
instead of looping
2019-02-23 14:39:20 +01:00
Alexandre Alapetite
2374374ba9 Less jQuery (#2234)
* Less jQuery

Follow-up of https://github.com/FreshRSS/FreshRSS/pull/2199

* Even less jQuery + global view unread title fix

* Even less jQuery

* Yet even less jQuery

* Even less jQuery

* Reduce some events

* Even less jQuery

* jQuery gone from main view

+Fixed English i18n

* Fix feed folded view

* Remove Firefox 64 workaround

Remove workaround for Gecko bug 1514498 in Firefox 64, fixed in Firefox
65

* Split to extra.js

Avoid loading unneeded JavaScript code for the main view.
+ several adjustements

* Improve CSS transition fold category

* Rewrite shortcuts

Remove library. Much faster, shorter, one listener instead of many.
Control of the shortcut context.
Fix https://github.com/FreshRSS/FreshRSS/issues/2215

* Remove debug

* Minor syntax

* Filter out unwanted shortcut modifiers

* Menu overflow fix

* Typo

* Fix unfolding in mobile view

* Remove jQuery from category.js

* Remove jQuery from Global view
2019-02-13 15:06:28 +01:00
Alexandre Alapetite
ef6df8aeca Merge branch 'dev' into dev-1.14.0 2019-01-26 21:08:27 +01:00
Alexandre Alapetite
da4a80b88a Add a JavaScript event when opening an article (#2222)
* Add a JavaScript event when opening an article
https://framagit.org/nicofrand/xextension-threepanesview/issues/4

```javascript
document.body.addEventListener('freshrss:openArticle', function (e) {
		console.log('freshrss:openArticle');
		console.log(e.target);
	});
```
2019-01-24 19:43:28 +01:00
Alexandre Alapetite
6bc49e137e Manual merge /dev 2019-01-15 20:58:53 +01:00
Alexandre Alapetite
9214eeecff Comment about Gecko scrollbar bug in Firefox 64
https://bugzilla.mozilla.org/show_bug.cgi?id=1514498
2019-01-15 18:51:13 +01:00
Alexandre Alapetite
f9555db678 IE11 fixes 2018-12-27 03:49:20 +01:00
Alexandre Alapetite
caa893e14b Optimise onscroll routines
Much lighter rework: auto-mark-as-read, auto-remove-articles,
auto-load-more.
In particular, use a single onscroll event handler with a throtte.
Continue removing jQuery when possible.
2018-12-27 03:34:56 +01:00
Alexandre Alapetite
8f03b370cc Send item queue as POST
Which also simplifies the request
2018-12-25 16:10:20 +01:00
Alexandre Alapetite
6fa09318ce Semove superfluous window. object 2018-12-25 16:09:48 +01:00
Alexandre Alapetite
cd9a9a9309 First version of batch scroll as read
Mark-as-read requests are queued and sent max once per second
2018-12-25 15:34:25 +01:00
Alexandre Alapetite
eefeb23419 jQuery ES6 partial refactoring
Prefix jQuery variables with $
Start avoiding jQuery in easy cases
Use let/const
2018-12-25 05:11:38 +01:00
Alexandre Alapetite
4888f919f1 Prepare for batch mark as read 2018-12-25 01:30:28 +01:00
Alexandre Alapetite
e0e96d6a13 Remove simple-scrollbar fallback (#2182)
https://github.com/FreshRSS/FreshRSS/pull/2181#issuecomment-447636787
2018-12-16 15:04:46 +01:00
Alexandre Alapetite
483c698f9a JavaScript-free scrollbar (#2181)
* JavaScript-free scrollbar

Make scrollbar work without JavaScript
https://github.com/FreshRSS/FreshRSS/pull/2117#discussion_r240804225
Also implies a better support of resize scenarios.
Seems to fix at the same time the occasional glitches
https://github.com/FreshRSS/FreshRSS/pull/2117#issuecomment-447556038

* Firefox 64-66 workaround

Workaround for Gecko bug in Firefox 64-66. Avoid showing the scrollbar
all the time, at the cost of a slight reflow (therefore targetting only
Gecko).

* Improvement of Firefox workaround

* Minor comment

* Unneeded check

* Even better

* Partial Edge fix

* More margin for tree bottom
2018-12-16 12:49:23 +01:00
Patrick Crandol
983aa587ee Add aside_feed to reader view (#2180)
* Add Nav menu to reader mode

At this point, it appears to be non-functional in reader mode.

* Add aside_feed toggle to reader view

* make init_column_categories work in reader view

* Make sidebar links redirect to proper view

* CSS to support toggleable sidebar in reader view

* remove unneeded !important
2018-12-15 10:56:38 +01:00
Patrick Crandol
478d3e6611 Decouple scrolling of feeds and articles (#2117)
* Remove Sticky Kit

Remove sticky-kit, as functionality is unsuitable for separate scrolling.

* Remove sticky-kit load in main.js

Further removing the sticky-kit kruft

* Finish removal of references to Sticky-kit

* CSS Changes to template for Independent Scrolling

* Addition of JS and supporting CSS and html

* More CSS fixes to establish expected behavior

Should be able to scroll navbar without it being in sticky mode now.

* Fix typo in main.js

sortcut.js -> shortcut.js

* Fix unexpected tree scrolling behavior

* Change name of generic JS function

* Improve sticky-aside

* CSS changes in themes to accommodate  independent Scroll

In themes where .aside's width is not the standard 300px, .tree's width must be specified to be equal to .aside

* Remove Sticky-Kit from README files

* Updates to Sticky-Aside

* Update Template to fix screwup

* Make Recalculating height actually work

* Let sidebar fill height if nav buttons aren't visible

* Make accommodating for nav buttons actually work

* update Swage theme for Independent Scroll feature

* Integrate sticky_aside into main.js

* Add Simple Scrollbar

* Patch scrollbar color for themes with dark colored asides

* Increase Visibility of scrollbar on Dark Themes

* Improve async loading, events, and performance

* CSS typo

* Fix double scrollbar on mobile

* Fix regression causing sticky to not be removed

* No $ for non-jQuery variables

* Fix strange condition + option for nice scrollbar

* Initial attempt to use css sticky

* Add stickyfill

* make the correct element sticky

* re-add incorrectly removed sidebar code

* Continue fixing mistaken deletions

* decrease frequency of recalc

* use minified version of simple-scrollbar.

* Load stickyfill instead of injecting

* put recalc back where it belongs

* re-remove script injector

* remove padding

bottom padding was causing the last item in the feed to be hidden under the nav buttons

* Manual merge of css_scrollbar

Add auto-detection of -webkit-scrollbar-thumb, otherwise fall back to
simple-scrollbar.js

* Fix Regression

Sticky recalc is still needed when using css scrollbars

* Replace method of closing dropdowns

Changed from an overlay href to a javascript solution, for better compatibility

* Remove Treepadding

Treepadding was causing dropdown menus at the bottom of the tree to be obscured.

* Undo unnecessary move of dropdown-target

* Move Dropdown Handler to a sensibleish place

* Fix light Scrollbar color not picking up on Firefox

* Minor syntax

* Minor Clarification of CSS/ patch BlueLagoon

* Change logic for native WebKit scrollbar detection

Fix
https://github.com/FreshRSS/FreshRSS/pull/2117#issuecomment-444251419
Tested with Firefox 63, Firefox 65, Chrome 71, IE11, Edge 42

* Fixes for other views

E.g. reader view

* Cleaner way of generating hash for dropdowns

* Make dropdown-toggle an actual toggle

* Prepare for CSS Scrollbars Module Level 1

* Fix regression causing my labels dropdown not to appear

* remove unneeded dropdown-close css rule

* Re-apply some lost changes

3c509989e8

* Add standard scrollbar compatibility

E.g. Firefox 64+

* Make All dropdowns click-to-close

* Remove BlueLagoon template

* Try to fix Firefox

https://github.com/FreshRSS/FreshRSS/pull/2117#discussion_r239539984

* Add CSS rules necessary for consistent function of scrollbar in Firefox

* Use inheritance to determine width

* Use overlay scrollbar where possible

* Test Reduced Listener

* Fix Firefox 62

And show subtle scrollbar even when not hovering

* Add margin at bottom

To allow opening the menus
https://github.com/FreshRSS/FreshRSS/pull/2117#issuecomment-444571218

* Minor - tab correction

* Spaces -> tabs

* Remove unneeded inheritance

* Fix indenting

* Revert bad merge

* Messy WIP to make dropdowns work

* Style Cleanup

* Break it down

* Lets try a move-it move-it

* Update p/scripts/main.js

Co-Authored-By: pattems <patrick@crandol.com>

* Update p/themes/BlueLagoon/BlueLagoon.css

Co-Authored-By: pattems <patrick@crandol.com>

*  separate ALL THE THINGS

* erroneous commas

* and to or

* removing double condition that doesn't do what I want

* More breaking down

* fix var

* Fix variable name again

* Remove magic number

https://github.com/FreshRSS/FreshRSS/pull/2117#discussion_r240052598

* Suuuuper inelegant solution for dropdowns

* lets try that again

* Inelegant Fix For Dropdowns

Now with 100% more working dropdowns

* Make sidebar dropdowns work correctly?

* Fix reversion

* Make JS scrollbar always visible

* Remove unneeded CSS

Added early in this pull request, didn't get pulled out when it was obsolete

* Fix CSS removal I missed

* CSS comment update/consistency for dark themes

* Clean Up Duplicate code

* Make dropdowns properly hide

Downside: Can no longer click on header/nav buttons to close

* Strip unneeded if statement

* jshint -W018

https://github.com/FreshRSS/FreshRSS/pull/2117#discussion_r240392851

* Half-reversion to old dropdown

* make overlay href scale to sidebar width

* remove init of nonexistent method

* remove trailing tabs

* move #close href where it belongs in index.phtml

* Revert all changes to index.phtml

* remove whitespace

accidentally added in last commit

* Move var's in init_column categories

* Finish putting old style dropdowns back

* Make CSS changes to use support statements

* Cleanup Whitespace

* re-add missing class

* spaces -> tabs in main.js

* tabs -> spaces css

* Minor whitespace

* Cleanup per @Alkarex

* Second attempt to add bottom margin

https://github.com/FreshRSS/FreshRSS/pull/2117#discussion_r240820901

* Fix error in IE11

* Simple-scrollbar color match for dark themes
2018-12-12 12:04:31 +01:00
Alexandre Alapetite
5c8eb1e864 Fix print for unfolded articles (#2148)
Fix https://github.com/FreshRSS/FreshRSS/issues/2130
`.current` might not exist in views for which all articles are already
expanded
2018-11-26 08:32:04 +01:00
Frans de Jonge
e20c7ef1b0 [fix] Finishing touches for next/previous without focus (#2140)
* [fix] Finishing touches for next/previous without focus

Cf. #1767.

* Avoid single quote

Alternative: use `’`

* Minor whitespace

* Minor whitespace

* be explicit about skipping

* add todos

* overshot by one
2018-11-18 19:31:36 +01:00
Matt DeMoss
f3a88614ef Add shortcuts for focusing next and previous without opening articles. (#1767)
* add skipping option to toggleContent to use later for 'i' and 'o' hotkeys

* in English config j,k are now 'open' and not 'skip', i,o are called 'focus .. without opening'
2018-11-18 14:08:27 +01:00