Merge pull request #585 from roramirez/extra-spaces

fix tabs, remove extra spaces and lines.
This commit is contained in:
Michael Teeuw
2016-12-31 19:12:24 +01:00
committed by GitHub
21 changed files with 82 additions and 83 deletions

View File

@@ -35,7 +35,6 @@ Module.register("alert",{
},
show_notification: function(message) {
if (this.config.effect == "slide") {this.config.effect = this.config.effect + "-" + this.config.position;}
msg = "";
if (message.title) {
msg += "<span class='thin' style='line-height: 35px; font-size:24px' color='#4A4A4A'>" + message.title + "</span>";
@@ -46,7 +45,7 @@ Module.register("alert",{
}
msg += "<span class='light' style='font-size:28px;line-height: 30px;'>" + message.message + "</span>";
}
new NotificationFx({
message: msg,
layout: "growl",

View File

@@ -109,7 +109,7 @@ The following properties can be configured:
<code>
titleReplace: {'Birthday of ' : '', 'foo':'bar'}
</code>
<br><b>Default value:</b>
<br><b>Default value:</b>
<code>
{
"De verjaardag van ": "",
@@ -158,7 +158,7 @@ The following properties can be configured:
<td><code>broadcastEvents</code></td>
<td>If this property is set to true, the calendar will broadcast all the events to all other modules with the notification message: <code>CALENDAR_EVENTS</code>. The event objects are stored in an array and contain the following fields: <code>title</code>, <code>startDate</code>, <code>endDate</code>, <code>fullDayEvent</code>, <code>location</code> and <code>geo</code>.<br>
<br><b>Possible values:</b> <code>true</code>, <code>false</code> <br>
<br><b>Default value:</b> <code>true</code>
<br><b>Default value:</b> <code>true</code>
</td>
</tr>
<tr>

View File

@@ -388,7 +388,7 @@ Module.register("calendar", {
/* broadcastEvents()
* Broadcasts the events to all other modules for reuse.
* The all events available in one array, sorted on startdate.
* The all events available in one array, sorted on startdate.
*/
broadcastEvents: function () {
var eventList = [];

View File

@@ -1,5 +1,5 @@
/* CalendarFetcher Tester
* use this script with `node debug.js` to test the fetcher without the need
* use this script with `node debug.js` to test the fetcher without the need
* of starting the MagicMirror core. Adjust the values below to your desire.
*
* By Michael Teeuw http://michaelteeuw.nl
@@ -30,4 +30,3 @@ fetcher.onError(function(fetcher, error) {
fetcher.startFetch();
console.log("Create fetcher done! ");

View File

@@ -220,7 +220,7 @@ Module.register("clock",{
wrapper.appendChild(digitalWrapper);
} else {
analogWrapper.style.padding = "20px 0 0 0";
wrapper.appendChild(digitalWrapper);
wrapper.appendChild(digitalWrapper);
wrapper.appendChild(analogWrapper);
}
}

View File

@@ -57,7 +57,7 @@ The following properties can be configured:
</td>
</tr>
<tr>
<td><code>remoteFile</code></td>
<td><code>remoteFile</code></td>
<td>External file from which to load the compliments<br>
<br><b>Possible values:</b>Path to a JSON file containing compliments, configured
as per the value of the <i>compliments configuration</i> (see below). An object with three arrays:
@@ -136,7 +136,7 @@ config: {
### External Compliment File
You may specify an external file that contains the three compliment arrays. This is particularly useful if you have a
large number of compliments and do not wish to crowd your `config.js` file with a large array of compliments.
Adding the `remoteFile` variable will override an array you specify in the configuration file.
Adding the `remoteFile` variable will override an array you specify in the configuration file.
This file must be straight JSON. Note that the array names need quotes
around them ("morning", "afternoon", "evening", "snow", "rain", etc.).

View File

@@ -37,7 +37,7 @@ Module.register("currentweather",{
onlyTemp: false,
roundTemp: false,
iconTable: {
"01d": "wi-day-sunny",
"02d": "wi-day-cloudy",

View File

@@ -113,13 +113,13 @@ The following properties can be configured:
removeEndTags: false,
startTags: [],
endTags: []
<tr>
<td><code>removeStartTags</code></td>
<td>Some newsfeeds feature tags at the <B>beginning</B> of their titles or descriptions, such as <em>[VIDEO]</em>.
This setting allows for the removal of specified tags from the beginning of an item's description and/or title.<br>
<br><b>Possible values:</b><code>'title'</code>, <code>'description'</code>, <code>'both'</code>
<br><b>Possible values:</b><code>'title'</code>, <code>'description'</code>, <code>'both'</code>
</td>
</tr>
<tr>
@@ -131,7 +131,7 @@ The following properties can be configured:
<tr>
<td><code>removeEndTags</code></td>
<td>Remove specified tags from the <B>end</B> of an item's description and/or title.<br>
<br><b>Possible values:</b><code>'title'</code>, <code>'description'</code>, <code>'both'</code>
<br><b>Possible values:</b><code>'title'</code>, <code>'description'</code>, <code>'both'</code>
</td>
</tr>
<tr>
@@ -173,7 +173,7 @@ The `feeds` property contains an array with multiple objects. These objects have
<td>The encoding of the news feed.<br>
<br>This property is optional.
<br><b>Possible values:</b><code>'UTF-8'</code>, <code>'ISO-8859-1'</code>, etc ...
<br><b>Default value:</b> <code>'UTF-8'</code>
<br><b>Default value:</b> <code>'UTF-8'</code>
</td>
</tr>

View File

@@ -29,7 +29,7 @@ Module.register("newsfeed",{
removeEndTags: "",
startTags: [],
endTags: []
},
// Define required scripts.
@@ -112,17 +112,17 @@ Module.register("newsfeed",{
//Remove selected tags from the beginning of rss feed items (title or description)
if (this.config.removeStartTags == "title" || "both") {
for (f=0; f<this.config.startTags.length;f++) {
if (this.newsItems[this.activeItem].title.slice(0,this.config.startTags[f].length) == this.config.startTags[f]) {
this.newsItems[this.activeItem].title = this.newsItems[this.activeItem].title.slice(this.config.startTags[f].length,this.newsItems[this.activeItem].title.length);
}
}
}
if (this.config.removeStartTags == "description" || "both") {
if (this.config.showDescription) {
for (f=0; f<this.config.startTags.length;f++) {
if (this.newsItems[this.activeItem].description.slice(0,this.config.startTags[f].length) == this.config.startTags[f]) {
@@ -130,9 +130,9 @@ Module.register("newsfeed",{
}
}
}
}
//Remove selected tags from the end of rss feed items (title or description)
if (this.config.removeEndTags) {
@@ -141,7 +141,7 @@ Module.register("newsfeed",{
this.newsItems[this.activeItem].title = this.newsItems[this.activeItem].title.slice(0,-this.config.endTags[f].length);
}
}
if (this.config.showDescription) {
for (f=0; f<this.config.endTags.length;f++) {
if (this.newsItems[this.activeItem].description.slice(-this.config.endTags[f].length)==this.config.endTags[f]) {
@@ -149,14 +149,14 @@ Module.register("newsfeed",{
}
}
}
}
var title = document.createElement("div");
title.className = "bright medium light";
title.innerHTML = this.newsItems[this.activeItem].title;
wrapper.appendChild(title);
if (this.config.showDescription) {
var description = document.createElement("div");
description.className = "small light";

View File

@@ -72,7 +72,7 @@ module.exports = NodeHelper.create({
},
/* broadcastFeeds()
* Creates an object with all feed items of the different registered feeds,
* Creates an object with all feed items of the different registered feeds,
* and broadcasts these using sendSocketNotification.
*/
broadcastFeeds: function() {

View File

@@ -35,7 +35,7 @@ Module.register("weatherforecast",{
calendarClass: "calendar",
roundTemp: false,
iconTable: {
"01d": "wi-day-sunny",
"02d": "wi-day-cloudy",
@@ -191,15 +191,15 @@ Module.register("weatherforecast",{
}
if (notification === "CALENDAR_EVENTS") {
var senderClasses = sender.data.classes.toLowerCase().split(" ");
if (senderClasses.indexOf(this.config.calendarClass.toLowerCase()) !== -1) {
if (senderClasses.indexOf(this.config.calendarClass.toLowerCase()) !== -1) {
var lastEvent = this.firstEvent;
this.firstEvent = false;
for (e in payload) {
var event = payload[e];
if (event.location || event.geo) {
this.firstEvent = event;
//Log.log("First upcoming event with location: ", event);
//Log.log("First upcoming event with location: ", event);
break;
}
}
@@ -355,4 +355,3 @@ Module.register("weatherforecast",{
return parseFloat(temperature).toFixed(decimals);
}
});