69 Commits

Author SHA1 Message Date
rejas
f3bdddfaa9 Final es6 notation stuff 2021-03-18 16:55:54 +01:00
rejas
a70bb517e1 Use es6 notation in newsfeed module 2021-03-18 16:55:54 +01:00
rejas
e4f671c898 Update error to use translatable text 2021-03-18 16:55:54 +01:00
rejas
a269b5cd93 Show invalid url error on UI, add test case 2021-03-18 16:55:54 +01:00
rejas
7635dea3e9 Replace valid-url library by standard node method 2021-03-16 19:25:23 +01:00
buxxi
a5bb9d962d Fixing eslint issues 2021-01-16 14:06:07 +01:00
buxxi
69c053a94f refactoring newsfeed to use templates instead of generating dom in the code 2021-01-16 13:37:18 +01:00
buxxi
aaaf1f660c refactoring newsfeed, moving hiding of module while loading away from dom-generation 2021-01-16 12:26:38 +01:00
buxxi
8538d83520 Moving newsfeed styling from js to a new css file 2021-01-16 11:52:55 +01:00
buxxi
132c98b767 refactoring newsfeed, moving tag stripping to loading instead of presentation logic 2021-01-16 11:10:53 +01:00
veeck
078438442a Cleanup some log levels 2020-11-06 11:47:29 +01:00
rejas
3438a5a374 Cleanup newsfeed jsdoc 2020-08-03 11:36:29 +02:00
rejas
476e52e004 Use let/const and arrow functions 2020-07-12 13:21:36 +02:00
rejas
8dc88fe64b Remove unused helper function and its unit test 2020-07-12 10:32:16 +02:00
rejas
d00da790af Move configuration change warning into general translation 2020-07-12 08:25:07 +02:00
Veeck
abb5dc5739 Run prettier over ALL files once
No other changes done in this commit
2020-05-11 22:22:32 +02:00
Veeck
7fc7d626bc Add Module to globals, cleanup comments 2020-05-05 14:55:15 +02:00
rejas
b9d19cfcb4 First round of undef fixes 2020-05-03 12:40:48 +02:00
rejas
e7fc4ef1e7 Replace unsecure links with https ones 2020-04-28 23:05:28 +02:00
Veeck
ec187fe109 Update changelog and commen tags 2020-04-21 12:23:50 +02:00
rejas
d08bd4e866 Fix lots of warnings 2020-04-21 12:23:50 +02:00
Michael Teeuw
f7f4e92e0a Merge branch 'develop' of https://github.com/MichMich/MagicMirror into develop 2020-04-01 09:58:55 +02:00
rejas
5a4ae99283 Add no-multi-spaces rule to eslint and run it 2020-03-15 15:49:34 +01:00
Michael Teeuw
561827e896 Remove logging. 2020-02-01 19:12:05 +01:00
Thierry Nischelwitzer
11c9a50931 send NEWS_FEED notification also for the first newsmessage which are shown 2019-07-09 10:20:02 +02:00
Michael Teeuw
f90bec985a Fix merge issue. 2019-06-27 09:29:01 +02:00
Michael Teeuw
90f911c529 Fix Merge Issue 2019-06-27 09:27:24 +02:00
Josef Spitzlberger
9468749384
added three class names
in order to design the news article better with css, three more class-names were introduced: newsfeed-desc, newsfeed-desc, newsfeed-desc
2019-06-21 13:05:40 +02:00
Veeck
36400c0a83 Fix some eslint errors from previous merges 2019-06-14 14:03:07 +02:00
Michael Teeuw
7a272ef0ab Merge conflict. 2019-06-14 13:19:29 +02:00
rejas
835668d96d Add eslint semi rule 2019-06-05 10:23:58 +02:00
Charles Dyason
aa80c468c4 Added broadcasting of news feeds with incremental updates
Added ability to enable broadcasting of news feed items with `NEWS_FEED` notification and broadcasting updated news feed items with `NEWS_FEED_UPDATE` to other modules. This is merged into the default `newsfeed` module.

One can set ability to broadcast the whole news feed or broadcast only updated news feed items.
2019-05-31 16:37:47 +02:00
Daniel Burr
29c9c92ba6 Add support for the ARTICLE_INFO_REQUEST notification
Upon reception of an ARTICLE_INFO_REQUEST notification, newsfeed will
respond with the notification ARTICLE_INFO_RESPONSE, containing the
fields 'title', 'source', 'date', 'desc' and 'url'.
2019-03-25 01:08:59 +01:00
mschmidt
5b6306671c Initial 2018-12-10 14:02:50 -06:00
Teddy Payet
08fa511d17 Add some translations (mostly french). 2018-07-10 15:03:54 +02:00
Andreas Cederström
d12509957f Abillity to toggle article in fullscreen 2018-07-07 16:50:10 +02:00
Matthew Veno
e56377117b Add option to newsfeed for logging errors
- 'logFeedWarnings' added to newsfeed config, defaulted to false
- Only log parse feed errors when logFeedWarnings is true
- Updated README and CHANGELOG
- Fixes #1329
2018-06-26 20:01:28 -04:00
Edward Shen
55a161fafe
Fixes #1282.
Added a runtime var isShowingDescription that gets reset to user config.
this.config.showDescription no longer mutates during runtime.
Changelog has been updated to include this fix.
2018-05-15 20:37:45 -04:00
Nico Domino
c90a1ab6dc
Updated newsfeed.js - improved fullscreen iframe
Had much better performance using 100vw (viewport width) than 100% (why - idk), but with 100% about 5% of my screen (1080x1920) to the right of the scroll bar was left black/blank, with 100vw I legitimately takes up the whole screen/viewport width. 

With the 10000 height the articles would always load about half way scrolled down. So I reduced the height and style.height to 3000. At my resolution at least, which I assume is fairly common, I had much better results. Unfortunately 3000 also isn't perfect - this still requires some tweaking. The article loads perfectly at the top of the iframe at 2500, but 2500 is much too small for most articles. 3000 seemed a good compromise, I could scroll far enoguh to read most articles on Reuters, and also load far enoguh up to read the beginning of the article.

And finally I added a "scroll back up" button notification. This seems to work flawlessly.
2018-04-17 00:25:58 +02:00
Thomas Bachmann
790249dd1a Merge branch 'MichMich/develop' 2018-01-29 21:37:25 +01:00
Thomas Bachmann
446a201d25 Allow to scroll articles with gesture events 2018-01-29 21:26:34 +01:00
Andreas Cederström
f299ba6218 Put article ifram in front of modules
Before this change the article was brought up in its ifram in fullscreen and you could still see the other modules in front of it
2018-01-20 23:46:58 +01:00
slametps
12110a4442 new options
* truncated description support
* specific reloadInterval for particular feed
2017-11-15 12:21:02 +07:00
Sergey Morozov
0eb1c0cea6 Added ability to set a list of prohibited words that will be filtered out of newsfeed
Resolves #1071

`prohibitedWords` config parameter is an array of words. If set and case insensitive greedy match is found anywhere in the title then that newsfeed item will not be displayed. Readme updated with instructions.

Users should be careful on the words selection as careless setting may remove many or all items from the newsfeed. Some obvious mistakes like `space, comma, dot` etc. can be prevented programatically, but I left it out of this PR

Example:

with `prohibitedWords: ['dodgers']`

Original `newsItems`:
```
0:{title: "New York City, Russia, Los Angeles Dodgers: Your Wednesday Briefing", description: "Here’s what you need to know to start your day.", pubdate: "Wed, 01 Nov 2017 09:37:36 GMT", url: "https://www.nytimes.com/2017/11/01/briefing/new-yo…ssia-los-angeles-dodgers.html?partner=rss&emc=rss", sourceTitle: "New York Times"}
1:{title: "A Mangled School Bus, Bodies Everywhere; ‘It Was Surreal’", description: "A truck ramming bicyclists. The driver emerging wi…e attack, it was as confusing as it was gruesome.", pubdate: "Wed, 01 Nov 2017 09:27:41 GMT", url: "https://www.nytimes.com/2017/10/31/nyregion/nyc-sc…r-attack-truck-witnesses.html?partner=rss&emc=rss", sourceTitle: "New York Times"}
2:{title: "Dodgers 3, Astros 1 | Series tied, 3-3: With a Rally and a Romp, Dodgers Top Astros and Force Game 7", description: "Down by a run with just four innings left in Game …nst a dominating Justin Verlander. Game 7 awaits.", pubdate: "Wed, 01 Nov 2017 07:21:07 GMT", url: "https://www.nytimes.com/2017/11/01/sports/dodgers-win-game-6.html?partner=rss&emc=rss", sourceTitle: "New York Times"}
3:{title: "José Andrés Fed Puerto Rico, and May Change How Aid Is Given", description: "The chef’s huge effort is just the latest led by c…ocally based way to feed people after a disaster.", pubdate: "Wed, 01 Nov 2017 06:40:09 GMT", url: "https://www.nytimes.com/2017/10/30/dining/jose-andres-puerto-rico.html?partner=rss&emc=rss", sourceTitle: "New York Times"}
```

Filtered `newsItems`:
```
0:{title: "A Mangled School Bus, Bodies Everywhere; ‘It Was Surreal’", description: "A truck ramming bicyclists. The driver emerging wi…e attack, it was as confusing as it was gruesome.", pubdate: "Wed, 01 Nov 2017 09:27:41 GMT", url: "https://www.nytimes.com/2017/10/31/nyregion/nyc-sc…r-attack-truck-witnesses.html?partner=rss&emc=rss", sourceTitle: "New York Times"}
1:{title: "José Andrés Fed Puerto Rico, and May Change How Aid Is Given", description: "The chef’s huge effort is just the latest led by c…ocally based way to feed people after a disaster.", pubdate: "Wed, 01 Nov 2017 06:40:09 GMT", url: "https://www.nytimes.com/2017/10/30/dining/jose
```
2017-11-01 03:50:34 -07:00
Johan Hammar
7345807871 Updated documentation and fixed typos for the newsfeed module. Fixes GH-804 2017-03-30 21:15:51 +02:00
42SK
f0db135b1d Added option to ignore old items in the news feed module
Outdated news items can be omitted via the ignoreOldItems and the ignoreOlderThan option.
2017-03-21 19:39:51 +01:00
Michael Teeuw
15b19925f2 Fix Merge 2017-03-17 14:16:35 +01:00
Andrew McOlash
afe0e3c1d6 Add in option to have single line news 2017-03-11 17:36:47 -06:00
BeatIdo
0f27d646bb removed trailing spaces 2017-03-10 17:03:14 +01:00
BeatIdo
81aca500b3 Hide News Feed loading option
Configuration option to hide News Feed module if feed is empty instead of showing LOADING status
2017-03-10 16:56:28 +01:00