fix tabs, remove extra spaces and lines.

This commit is contained in:
Rodrigo Ramírez Norambuena
2016-12-29 22:23:08 -03:00
parent 4237d0c7e3
commit 19d906c5e4
17 changed files with 75 additions and 77 deletions

View File

@@ -82,11 +82,11 @@ Any properties defined in the defaults object, will be merged with the module co
*Introduced in version: 2.1.0.*
A string that defines the minimum version of the MagicMirror framework. If it is set, the system compares the required version with the users version. If the version of the user is out of date, it won't run the module. Make sure to also set this value in the Node helper.
A string that defines the minimum version of the MagicMirror framework. If it is set, the system compares the required version with the users version. If the version of the user is out of date, it won't run the module. Make sure to also set this value in the Node helper.
**Note:** Since this check is introduced in version 2.1.0, this check will not be run in older versions. Keep this in mind if you get issue reports on your module.
Example:
Example:
````javascript
requiresVersion: "2.1.0",
````
@@ -117,7 +117,7 @@ The getScripts method is called to request any additional scripts that need to b
getScripts: function() {
return [
'script.js', // will try to load it from the vendor folder, otherwise it will load is from the module folder.
'moment.js', // this file is available in the vendor folder, so it doesn't need to be available in the module folder.
'moment.js', // this file is available in the vendor folder, so it doesn't need to be available in the module folder.
this.file('anotherfile.js'), // this file will be loaded straight from the module folder.
'https://code.jquery.com/jquery-2.2.3.min.js', // this file will be loaded from the jquery servers.
]
@@ -339,7 +339,7 @@ Visiblity locking helps the module system to prevent unwanted hide/show actions.
````javascript
moduleA.hide(0, {lockString: "module_b_identifier"});
````
Module A is now hidden, and has an lock array with the following strings:
Module A is now hidden, and has an lock array with the following strings:
````javascript
moduleA.lockStrings == ["module_b_identifier"]
moduleA.hidden == true
@@ -474,7 +474,7 @@ A string that defines the minimum version of the MagicMirror framework. If it is
**Note:** Since this check is introduced in version 2.1.0, this check will not be run in older versions. Keep this in mind if you get issue reports on your module.
Example:
Example:
````javascript
requiresVersion: "2.1.0",
````

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

@@ -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

@@ -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);
}
});