aboutsummaryrefslogtreecommitdiff
path: root/p/scripts/main.js
AgeCommit message (Collapse)Author
2019-10-20Comply with LibreJS (#2576)Gravatar Alexandre Alapetite
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-01Workaround for Firefox favicon glitch (#2543)Gravatar Alexandre Alapetite
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-09-28Optimize dynamic favicon for HiDPI screens (#2539)Gravatar rocka
This PR leveraging `window.devicePixelRatio` to generate high resolution favicons for HiDPI screens.
2019-08-22IE11 / Edge keyboard compatibility (#2507)Gravatar Alexandre Alapetite
https://github.com/FreshRSS/FreshRSS/pull/2506#issuecomment-523544684
2019-08-21Prevent window opener vulnerability with space shortcut (#2506)Gravatar ArthurHoaro
* 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-04-16Add theme to print pageGravatar Alexis Degrugillier
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-07Alow mix of auto read options (#2354)Gravatar Alexandre Alapetite
Fix https://github.com/FreshRSS/FreshRSS/pull/2349#issuecomment-480540126
2019-04-06Fix menu warning (#2353)Gravatar Alexandre Alapetite
confirm is only for labels, not for feeds
2019-04-06Fix autoremove again (#2352)Gravatar Alexandre Alapetite
Fix https://github.com/FreshRSS/FreshRSS/pull/2349
2019-04-06Fix hide articles + batch option (#2349)Gravatar Alexandre Alapetite
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-06Better handling of bad request and fast unload (#2346)Gravatar Alexandre Alapetite
* 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-04Fix scroll functions in Edge (#2337)Gravatar Alexandre Alapetite
Use more standard / robust document.scrollingElement
2019-04-03Fix shortcut problem when showing articles unfolded (#2336)Gravatar Alexandre Alapetite
Fix https://github.com/FreshRSS/FreshRSS/issues/2328
2019-04-03Fix auto_remove_article (#2334)Gravatar Alexandre Alapetite
* Fix auto_remove_article https://github.com/FreshRSS/FreshRSS/issues/2323 * Second attempt * Third attempt
2019-04-02Fix control click (#2330)Gravatar Alexandre Alapetite
https://github.com/FreshRSS/FreshRSS/issues/2310
2019-04-01Fix ASC load more (#2318)Gravatar Alexandre Alapetite
https://github.com/FreshRSS/FreshRSS/issues/2314
2019-03-27Minor code simplificationGravatar Alexandre Alapetite
https://github.com/FreshRSS/FreshRSS/pull/2300
2019-03-25Wait for mark-as-read queue before click (#2300)Gravatar Alexandre Alapetite
2019-03-22Rework CSRF interaction with sessions (#2290)Gravatar Alexandre Alapetite
* 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-09Improved auto load more articlesGravatar Alexandre Alapetite
Fixed bug + ealier trigger of load more (half of the window height instead of 0)
2019-02-23JavaScript fixes + new navigation loop behaviour (#2255)Gravatar Alexandre Alapetite
* 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-13Less jQuery (#2234)Gravatar Alexandre Alapetite
* 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-01-26Merge branch 'dev' into dev-1.14.0Gravatar Alexandre Alapetite
2019-01-24Add a JavaScript event when opening an article (#2222)Gravatar Alexandre Alapetite
* 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-15Manual merge /devGravatar Alexandre Alapetite
2019-01-15Comment about Gecko scrollbar bug in Firefox 64Gravatar Alexandre Alapetite
https://bugzilla.mozilla.org/show_bug.cgi?id=1514498
2018-12-27IE11 fixesGravatar Alexandre Alapetite
2018-12-27Optimise onscroll routinesGravatar Alexandre Alapetite
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-25Send item queue as POSTGravatar Alexandre Alapetite
Which also simplifies the request
2018-12-25Semove superfluous window. objectGravatar Alexandre Alapetite
2018-12-25First version of batch scroll as readGravatar Alexandre Alapetite
Mark-as-read requests are queued and sent max once per second
2018-12-25jQuery ES6 partial refactoringGravatar Alexandre Alapetite
Prefix jQuery variables with $ Start avoiding jQuery in easy cases Use let/const
2018-12-25Prepare for batch mark as readGravatar Alexandre Alapetite
2018-12-16Remove simple-scrollbar fallback (#2182)Gravatar Alexandre Alapetite
https://github.com/FreshRSS/FreshRSS/pull/2181#issuecomment-447636787
2018-12-16JavaScript-free scrollbar (#2181)Gravatar Alexandre Alapetite
* 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-15Add aside_feed to reader view (#2180)Gravatar Patrick Crandol
* 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-12Decouple scrolling of feeds and articles (#2117)Gravatar Patrick Crandol
* 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 https://github.com/FreshRSS/FreshRSS/pull/2117/commits/3c509989e890b88852e52c67c1c5507d1e0bf28c * 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-11-26Fix print for unfolded articles (#2148)Gravatar Alexandre Alapetite
Fix https://github.com/FreshRSS/FreshRSS/issues/2130 `.current` might not exist in views for which all articles are already expanded
2018-11-18[fix] Finishing touches for next/previous without focus (#2140)Gravatar Frans de Jonge
* [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-18Add shortcuts for focusing next and previous without opening articles. (#1767)Gravatar Matt DeMoss
* 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-10-30reallow items kept unread to be interactive (#2085)Gravatar Patrick Crandol
Remove .keep_unread from classes that do nothing.
2018-10-26Fix manual refresh commit (#2081)Gravatar Alexandre Alapetite
Commit was performed too early, potentially before the last feeds were done refreshing
2018-10-14init confirm also for configuration pages (#2048)Gravatar Alexandre Alapetite
There are some actions that require confirmation also in the configuration pages, such as delete user.
2018-10-14Remove some preload / prefetch (#2040)Gravatar Alexandre Alapetite
* Remove next prefetch This approach was only efficient in the specific case when no change was made (no mark-as-read, favourites, tags), and useless in the other situations. Removed to reduce server load. * Remove next prefetch from JavaScript too * Remove some preload / prefetch While useful for the first request, those preload / prefetch hints are slightly negative for the following requets, especially server-side, e.g. generating one log entry in Apache, and a bit more network traffic. * Revert mistake * Remove comment https://github.com/FreshRSS/FreshRSS/pull/2040#discussion_r223214915
2018-09-29Custom labels (#2027)Gravatar Alexandre Alapetite
* First draft of custom tags https://github.com/FreshRSS/FreshRSS/issues/928 https://github.com/FreshRSS/FreshRSS/issues/1367 * SMALLINT to BIGINT for id_entry And uppercase SQL types * Fix layout for unreads * Start UI menu * Change menu order * Clean database helpers https://github.com/FreshRSS/FreshRSS/pull/2027#discussion_r217971535 * Travis rules do not understand PostgreSQL constants Grrr * Tag controller + UI * Add column attributes to tags * Use only favicon for now, for label * Fix styling for different themes * Constant for maximum InnoDB index length in Unicode https://github.com/FreshRSS/FreshRSS/pull/2027#discussion_r219052200 (I would have personnally prefered keeping the readability of a real value instead of a constant, in this case of many SQL fields) * Use FreshRSS_Factory::createCategoryDao * Add view of all articles containing any tag * Fix search in tags * Mark as read tags * Partial auto-update unread tags * More auto update tag unreads * Add tag deletion * Do not purge tagged articles * Minor comment * Fix SQLite and UI bug * Google Reader API support for user tags Add SQL check that tag names must be distinct from category names * whitespace * Add missing API for EasyRSS * Compatibility SQLite Problematic parentheses * Add SQL DISTINCT for cases with multiple tags * Fix for PostgreSQL PostgreSQL needs some additional type hint to avoid "could not determine data type of parameter $1" http://www.postgresql-archive.org/Could-not-determine-data-type-of-parameter-1-tp2171092p2171094.html
2018-09-16Improve authors (#2025)Gravatar Alexandre Alapetite
* Links for authors and multiple authors Favour ';' as a separator instead of ',' to better cope with multi-author scientific articles. Follow-up of https://github.com/FreshRSS/FreshRSS/pull/1997 , https://github.com/FreshRSS/FreshRSS/issues/1968, https://github.com/FreshRSS/FreshRSS/pull/2023 * Change i18n authors * Update layout * Unicode-compatible search Example for `author:Loïc` * author <em> styling * Final details * Minor spacing
2018-01-26Fix shortcuts for view switchingGravatar Alexis Degrugillier
I've introduced shortcuts to switch between view in #1755. They have been broken by #1714. Then I've made an ugly fix in #1758. This change revert all changes to have something better. See #1757
2018-01-02Fix shortcuts triggering view switchingGravatar Alexis Degrugillier
2018-01-01Add shortcuts to switch views (#1755)Gravatar Alexis Degrugillier
2017-11-04Add a Mastodon share (#1674)Gravatar Alexis Degrugillier
See #1521