mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 11:50:00 +00:00
Hide News Feed loading option
Configuration option to hide News Feed module if feed is empty instead of showing LOADING status
This commit is contained in:
parent
d26d94b62a
commit
81aca500b3
@ -21,6 +21,7 @@ Module.register("newsfeed",{
|
||||
showSourceTitle: true,
|
||||
showPublishDate: true,
|
||||
showDescription: false,
|
||||
hideLoading: false,
|
||||
reloadInterval: 5 * 60 * 1000, // every 5 minutes
|
||||
updateInterval: 10 * 1000,
|
||||
animationSpeed: 2.5 * 1000,
|
||||
@ -179,12 +180,18 @@ Module.register("newsfeed",{
|
||||
fullArticle.src = this.newsItems[this.activeItem].url;
|
||||
wrapper.appendChild(fullArticle);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if (this.config.hideLoading) {
|
||||
this.show();
|
||||
}
|
||||
|
||||
} else {
|
||||
wrapper.innerHTML = this.translate("LOADING");
|
||||
wrapper.className = "small dimmed";
|
||||
if (this.config.hideLoading) {
|
||||
this.hide();
|
||||
} else {
|
||||
wrapper.innerHTML = this.translate("LOADING");
|
||||
wrapper.className = "small dimmed";
|
||||
}
|
||||
}
|
||||
|
||||
return wrapper;
|
||||
|
Loading…
x
Reference in New Issue
Block a user