155 Commits

Author SHA1 Message Date
Kristjan ESPERANTO
5f38c53260
Revise require imports (#3071)
- order (external first)
- remove superfluous file extensions
- new line after imports
- deconstruct (only one time (in `check_config.js`))
- fix path (only one time (in `global-setup.js`))
2023-03-22 23:53:10 +01:00
Kristjan ESPERANTO
d276a7ddb9
Use template literals instead of string concatenation (#3066)
We have used it inconsistently till now. Template literals are more
modern and easier to maintain in my opinion.

Because that's a large amount of changes, here's a way to reproduce it:
I added the rule `"prefer-template": "error"` to the `.eslintrc.json`
and did an autofix. Since this caused a new problem in line 409 of
`newsfeed.js`, I reversed it in that line and also removed the rule from
the eslint config file.

The rule is described here:
https://eslint.org/docs/latest/rules/prefer-template

Note: I've played around with some other linter rules as well, and some
seem to point to some specific, non-cosmetic, issues. But before I dive
even deeper and then introduce even bigger and hardly understandable
changes at once, I thought I'd start with this simple cosmetic rule.
2023-03-19 14:32:23 +01:00
buxxi
beea754514
Fix empty news feed stopping the feed from ever updating again (#3062)
If a news feed returns an empty file it will cause the feed to only show
the previous entries forever since no new fetch is scheduled.
2023-03-11 16:42:13 +01:00
Kristjan ESPERANTO
b08a4737af
Update stylelint (#3042)
1. Update `stylelint` dependencies
- As of stylelint v15, we do not need `stylelint-config-prettier`
anymore:
https://github.com/prettier/stylelint-config-prettier/releases/tag/v9.0.5
2. Switch to `stylelint-config-standard`:
`stylelint-prettier/recommended` has not been updated for a long time
and still needs the old `stylelint-config-prettier`
3. Handle new `stylelint` issues
2023-02-19 21:36:50 +01:00
Karsten Hassel
7bd944391e
fix cors problems with newsfeed articles (#2940)
solves #2840 as far as possible. There could still be errors on the
embedded iframe when the owner of the site has set `X-Frame-Options` or
`Access-Control-Allow-Origin` headers (as already mentioned in the
docs).
2022-10-17 21:38:08 +02:00
Karsten Hassel
1e934e16af respect rss ttl provided by newsfeed 2022-07-21 22:07:36 +02:00
Karsten Hassel
591f907134 fix newsfeedfetcher using correct stream version (changed with node-18-fetch) 2022-05-28 22:28:37 +02:00
Karsten Hassel
0023c64d59 use internal fetch function of node instead external node-fetch library if node version >= v18 2022-05-27 19:46:28 +02:00
Kristjan SCHMIDT
6f27e5ae07 MagicMirror -> MagicMirror² 2022-01-26 23:47:51 +01:00
Kristjan SCHMIDT
a5668b1b99 Magic Mirror -> MagicMirror²
Consistent spelling
2022-01-26 23:09:26 +01:00
Karsten Hassel
c4e7e42cdd added new config option showTitleAsUrl to newsfeed module 2022-01-22 23:34:57 +01:00
rejas
1996efb183 Add new variable dangerouslyDisableAutoEscaping 2021-12-21 13:31:39 +01:00
rejas
19bb2a0238 Add safe option to newsfeed templates 2021-12-21 08:13:00 +01:00
rejas
2107e7c427 Show empty message when no newsfeed items are available 2021-12-20 13:29:56 +01:00
Karsten Hassel
677dcb87ef fixed User-Agent-Header for newsfeed module (#2729) 2021-12-13 21:24:37 +01:00
veeck
730f2eb0b8 Add fix for chaotic newsfeed display after network connection loss 2021-10-17 16:01:01 +02:00
Robert Ewald
d56a6fb06f disabled by default. 2021-06-03 12:45:08 +02:00
Robert Ewald
bace0ad339 indentation in template fixed. 2021-06-03 12:38:54 +02:00
Robert Ewald
6014eaf8eb Merge remote-tracking branch 'upstream/develop' into feature/newsfeed-show-as-list 2021-06-03 12:27:26 +02:00
Robert Ewald
3e96e8b3f5 newsfeed: showAsList implemented. 2021-06-03 11:40:18 +02:00
Robert Ewald
aa3a3bdf16 server data for newsfeed list. 2021-05-25 09:29:48 +02:00
rejas
4b1c7da171 Update jsdoc 2021-05-19 11:12:56 +02:00
veeck
d43a57af36 Refaktor newsfeed error once again for better messaging to the user 2021-05-19 11:12:56 +02:00
rejas
e9de961a23 Cleanup prohibited words filter code and test data 2021-05-19 11:12:56 +02:00
rejas
b212641069 Move checkFetchStatus into NodelHelper 2021-05-19 11:12:42 +02:00
rejas
90aa50bb11 Add fetcher_helper for calendar and newsfeed 2021-05-19 11:12:42 +02:00
rejas
37fab7ac63 Update error handling for newsfeed and calendar 2021-05-19 11:12:42 +02:00
oemel09
acdcdc55bc Adjusts parenthesis in template to be consistent 2021-04-09 08:07:37 +02:00
oemel09
a49962b8de Moves validation into template 2021-04-08 17:00:15 +02:00
oemel09
799ee8bcfa Check showDescription setting for newsfeed module 2021-04-08 16:59:03 +02:00
Sam Detweiler
e67dc38890 fix newsreader template 2021-03-24 15:06:12 -05:00
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
Karsten Hassel
f09c54184a moved tests to fetch, run prettier 2021-03-02 21:26:25 +01:00
Karsten Hassel
53e300bd31 snapshot 2021-03-02 00:17:13 +01:00
Felix Wiedenbach
b18d98f5ea exposed logger as node module 2021-02-18 19:14:53 +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
rejas
c61fac75e4 Rename Newsfeed Fetcher for clarity 2020-07-12 08:10:43 +02:00