Read the statement by Michael Teeuw here.
Default newsfeed - make list?
-
@Pade2204 said in Default newsfeed - make list?:
Im not good to see, where you edit those things you have made? Can you make a dummy guide for me? hehe :)
Sure, but I’d suggest reading – and learning – about the basics of JavaScripts first, or this could get a bit complicated.
I worked directly in the default newsfeed module, which I’d absolutely not suggest doing. a) This could break the default module and you have to rebuild the code. b) With the next update, the code will be reset to its original state and your changes are lost.
Having said that, to experiment with this module, I changed the /MagicMirror/modules/default/newsfeed/newsfeed.js that I opened in an editor. You’ll see the functions I mentioned above. Note that I commented where the original code of a function was left untouched. In the getDom: I put some part of the original code with the else { } part of an if statement.
EDIT: I made a git repository of the changes I made. You can look at my code here: https://github.com/TTigges/newsstack/blob/master/newsfeed.js
-
I just tried your code, with default setting (copy/paste into newsfeed.js)
It looks like this when the feed is loading. Then it counts down and show 1 lines less every second? Is that in purpose?
-
Yes, but you forgot the custom.css.
-
I have the custom.css file in modules/default/newsfeed/
:/and tried to name it custom.css and newsfeed.css
-
The lines are ment for MagicMirror/css/custom.css – just add them.
Alternatively, add this function in the module (probably afterstart: function()
:getStyles: function() { return [ this.file('custom.css') ] },
-
Thanks. This is great. Now it works with .css file.
But:
It does not show the headers title for instance “CNN” - and no timestamps? Is it possible to add short timestamp before the news headline?
These have no effect:
showSourceTitle: true,
showPublishDate: true,And 1 last thing - Do you control the speed of the sliding somewhere - Or maybe just slide in new entries when you reach max entries?
Thanks, man!
-
As I said, this is nowhere near complete, just playing around. Speed is the same as in the config. The rest can be done. I’ll look into it.
-
Thanks man. Its really nice of you.
Thnaks!
-
Had any time to look into this?
-
@doublet said in Default newsfeed - make list?:
As I said, this is nowhere near complete, just playing around. Speed is the same as in the config. The rest can be done. I’ll look into it.
doublet, any chance you have time to fix this? Thanks.