diff --git a/LICENSE b/LICENSE
index 399a003f..de5cf3da 100644
--- a/LICENSE
+++ b/LICENSE
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
\ No newline at end of file
+SOFTWARE.
diff --git a/README.md b/README.md
index 3df3738a..9a972b5a 100644
--- a/README.md
+++ b/README.md
@@ -1,9 +1,9 @@
# MagicMirror V2
-This version of the Magic Mirror software focusses on a modular plugin system. Besides that, the Magic Mirror software now also uses [Electron](http://electron.atom.io/), so no more webserver or browser installs necessary.
+This version of the Magic Mirror software focusses on a modular plugin system. Besides that, the Magic Mirror software now also uses [Electron](http://electron.atom.io/), so no more webserver or browser installs necessary.
#WARNING: THIS VERSION IS IN A VERY EARLY STAGE. IT IS NOT COMPLETED YET. PLEASE USE THE MASTER BRANCH.
-##Usage
+##Usage
1. Install [Node.js](https://nodejs.org/en/)
2. Execute `npm install && npm start`.
@@ -21,7 +21,7 @@ Things that still have to be implemented or changed.
####Documentation
- Write all the documentation. :)
-##Modules
+##Modules
### Default modules:
- [**Clock**](modules/default/clock)
@@ -39,6 +39,3 @@ Things that still have to be implemented or changed.
- **[MMM-Facial-Recognition by PaViRo](https://github.com/paviro/MMM-Facial-Recognition)**
Facial recognition and module swapping based on the current user ...
- **[MMM-Wunderlist by PaViRo](https://github.com/paviro/MMM-Wunderlist)**
Displays your Wunderlist todos on your mirror ...
-
-
-
diff --git a/config/.gitignore b/config/.gitignore
index a2d72a24..1bf4259a 100644
--- a/config/.gitignore
+++ b/config/.gitignore
@@ -1 +1 @@
-config.js
\ No newline at end of file
+config.js
diff --git a/config/config.js.sample b/config/config.js.sample
index c4dc2c62..c18ce671 100644
--- a/config/config.js.sample
+++ b/config/config.js.sample
@@ -24,7 +24,7 @@ var config = {
config: {
calendars: [
{
- symbol: 'calendar-check-o ',
+ symbol: 'calendar-check-o ',
url: 'webcal://www.calendarlabs.com/templates/ical/US-Holidays.ics'
}
]
@@ -60,9 +60,9 @@ var config = {
}
},
]
-
+
};
/*************** DO NOT EDIT THE LINE BELOW ***************/
-if (typeof module !== 'undefined') {module.exports = config;}
\ No newline at end of file
+if (typeof module !== 'undefined') {module.exports = config;}
diff --git a/css/main.css b/css/main.css
index 31dbcee4..d50e9f2c 100644
--- a/css/main.css
+++ b/css/main.css
@@ -135,4 +135,4 @@ sup {
width: 100%;
border-spacing: 0px;
border-collapse: separate;
-}
\ No newline at end of file
+}
diff --git a/fonts/Apache License.txt b/fonts/Apache License.txt
index 63d53024..aa4927d8 100755
--- a/fonts/Apache License.txt
+++ b/fonts/Apache License.txt
@@ -200,4 +200,4 @@ Font data copyright Google 2012
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
- limitations under the License.
\ No newline at end of file
+ limitations under the License.
diff --git a/fonts/robot.css b/fonts/robot.css
index 5f2e8d12..46236428 100644
--- a/fonts/robot.css
+++ b/fonts/robot.css
@@ -45,4 +45,3 @@
font-style: normal;
}
-
diff --git a/fonts/roboto.css b/fonts/roboto.css
index 3af3597b..25c33dfd 100644
--- a/fonts/roboto.css
+++ b/fonts/roboto.css
@@ -91,6 +91,3 @@
font-style: normal;
}
-
-
-
diff --git a/js/class.js b/js/class.js
index cd6cd2dc..726e1abc 100644
--- a/js/class.js
+++ b/js/class.js
@@ -2,24 +2,24 @@
* By John Resig http://ejohn.org/
* MIT Licensed.
*/
-
+
// Inspired by base2 and Prototype
(function(){
var initializing = false, fnTest = /xyz/.test(function(){xyz;}) ? /\b_super\b/ : /.*/;
-
+
// The base Class implementation (does nothing)
this.Class = function(){};
-
+
// Create a new Class that inherits from this class
Class.extend = function(prop) {
var _super = this.prototype;
-
+
// Instantiate a base class (but only create the instance,
// don't run the init constructor)
initializing = true;
var prototype = new this();
initializing = false;
-
+
// Copy the properties over onto the new prototype
for (var name in prop) {
// Check if we're overwriting an existing function
@@ -28,42 +28,42 @@
(function(name, fn){
return function() {
var tmp = this._super;
-
+
// Add a new ._super() method that is the same method
// but on the super-class
this._super = _super[name];
-
+
// The method only need to be bound temporarily, so we
// remove it when we're done executing
- var ret = fn.apply(this, arguments);
+ var ret = fn.apply(this, arguments);
this._super = tmp;
-
+
return ret;
};
})(name, prop[name]) :
prop[name];
}
-
+
// The dummy class constructor
function Class() {
// All construction is actually done in the init method
if ( !initializing && this.init )
this.init.apply(this, arguments);
}
-
+
// Populate our constructed prototype object
Class.prototype = prototype;
-
+
// Enforce the constructor to be what we expect
Class.prototype.constructor = Class;
-
+
// And make this class extendable
Class.extend = arguments.callee;
-
+
return Class;
};
})();
/*************** DO NOT EDIT THE LINE BELOW ***************/
-if (typeof module !== 'undefined') {module.exports = Class;}
\ No newline at end of file
+if (typeof module !== 'undefined') {module.exports = Class;}
diff --git a/js/defaults.js b/js/defaults.js
index 33707784..f8656c44 100644
--- a/js/defaults.js
+++ b/js/defaults.js
@@ -55,4 +55,4 @@ var defaults = {
/*************** DO NOT EDIT THE LINE BELOW ***************/
-if (typeof module !== 'undefined') {module.exports = defaults;}
\ No newline at end of file
+if (typeof module !== 'undefined') {module.exports = defaults;}
diff --git a/js/electron.js b/js/electron.js
index 74192f6c..b3a857a4 100755
--- a/js/electron.js
+++ b/js/electron.js
@@ -61,7 +61,7 @@ function loadModule(module) {
var elements = module.split('/');
var moduleName = elements[elements.length - 1];
var moduleFolder = __dirname + '/../modules/' + module;
-
+
if (defaultModules.indexOf(moduleName) !== -1) {
moduleFolder = __dirname + '/../modules/default/' + module;
}
diff --git a/js/loader.js b/js/loader.js
index 0c6f661c..4f650ac6 100644
--- a/js/loader.js
+++ b/js/loader.js
@@ -41,7 +41,7 @@ var Loader = (function() {
}
};
- loadNextModule();
+ loadNextModule();
};
/* startModules()
@@ -60,7 +60,7 @@ var Loader = (function() {
/* getAllModules()
* Retrieve list of all modules.
*
- * return array - module data as configured in config
+ * return array - module data as configured in config
*/
var getAllModules = function() {
return config.modules;
@@ -82,7 +82,7 @@ var Loader = (function() {
var elements = module.split('/');
var moduleName = elements[elements.length - 1];
var moduleFolder = config.paths.modules + '/' + module;
-
+
if (defaultModules.indexOf(moduleName) !== -1) {
moduleFolder = config.paths.modules + '/default/' + module;
}
@@ -130,8 +130,8 @@ var Loader = (function() {
afterLoad();
});
}
-
- };
+
+ };
/* bootstrapModule(module, mObj)
* Bootstrap modules by setting the module data and loading the scripts & styles.
@@ -154,8 +154,8 @@ var Loader = (function() {
callback();
});
});
-
-
+
+
};
/* loadFile(fileName)
@@ -194,7 +194,7 @@ var Loader = (function() {
};
document.getElementsByTagName("head")[0].appendChild(stylesheet);
- break;
+ break;
}
};
@@ -249,10 +249,3 @@ var Loader = (function() {
};
})();
-
-
-
-
-
-
-
diff --git a/js/logger.js b/js/logger.js
index 27bb5ca5..1389c5f9 100644
--- a/js/logger.js
+++ b/js/logger.js
@@ -9,7 +9,7 @@
*/
-// This logger is very simple, but needs to be extended.
+// This logger is very simple, but needs to be extended.
// This system can eventually be used to push the log messages to an external target.
diff --git a/js/main.js b/js/main.js
index 4bc15d02..a45c56b1 100644
--- a/js/main.js
+++ b/js/main.js
@@ -15,13 +15,13 @@ var MM = (function() {
/* Private Methods */
/* createDomObjects()
- * Create dom objects for all modules that
+ * Create dom objects for all modules that
* are configured for a specific position.
*/
var createDomObjects = function() {
for (var m in modules) {
var module = modules[m];
-
+
if (typeof module.data.position === 'string') {
var wrapper = selectWrapper(module.data.position);
@@ -47,13 +47,11 @@ var MM = (function() {
moduleContent.className = "module-content";
dom.appendChild(moduleContent);
-
-
updateDom(module, 0);
}
}
- sendNotification('DOM_OBJECTS_CREATED');
+ sendNotification('DOM_OBJECTS_CREATED');
};
/* selectWrapper(position)
@@ -99,7 +97,6 @@ var MM = (function() {
if (!module.hidden) {
-
if (!moduleNeedsUpdate(module, newContent)) {
return;
}
@@ -173,7 +170,7 @@ var MM = (function() {
// the .display property.
moduleWrapper.style.position = 'absolute';
- if (typeof callback === 'function') { callback(); }
+ if (typeof callback === 'function') { callback(); }
}, speed);
}
};
@@ -194,10 +191,9 @@ var MM = (function() {
moduleWrapper.style.opacity = 1;
setTimeout(function() {
- if (typeof callback === 'function') { callback(); }
+ if (typeof callback === 'function') { callback(); }
}, speed);
-
}
};
@@ -216,14 +212,14 @@ var MM = (function() {
/* setSelectionMethodsForModules()
* Adds special selectors on a collection of modules.
- *
+ *
* argument modules array - Array of modules.
*/
var setSelectionMethodsForModules = function(modules) {
/* withClass(className)
* filters a collection of modules based on classname(s).
- *
+ *
* argument className string/array - one or multiple classnames. (array or space devided)
*
* return array - Filtered collection of modules.
@@ -245,7 +241,7 @@ var MM = (function() {
if (classes.indexOf(searchClass.toLowerCase()) !== -1) {
newModules.push(module);
}
- }
+ }
}
setSelectionMethodsForModules(newModules);
@@ -254,7 +250,7 @@ var MM = (function() {
/* exceptWithClass(className)
* filters a collection of modules based on classname(s). (NOT)
- *
+ *
* argument className string/array - one or multiple classnames. (array or space devided)
*
* return array - Filtered collection of modules.
@@ -280,7 +276,7 @@ var MM = (function() {
}
if (!foundClass) {
newModules.push(module);
- }
+ }
}
setSelectionMethodsForModules(newModules);
@@ -289,7 +285,7 @@ var MM = (function() {
/* exceptModule(module)
* Removes a module instance from the collection.
- *
+ *
* argument module Module object - The module instance to remove from the collection.
*
* return array - Filtered collection of modules.
@@ -310,7 +306,7 @@ var MM = (function() {
/* enumerate(callback)
* Walks thru a collection of modules and executes the callback with the module as an argument.
- *
+ *
* argument callback function - The function to execute with the module as an argument.
*/
var enumerate = function(callback) {
@@ -320,8 +316,6 @@ var MM = (function() {
}
};
-
-
if (typeof modules.withClass === 'undefined') { Object.defineProperty(modules, 'withClass', {value: withClass, enumerable: false}); }
if (typeof modules.exceptWithClass === 'undefined') { Object.defineProperty(modules, 'exceptWithClass', {value: exceptWithClass, enumerable: false}); }
if (typeof modules.exceptModule === 'undefined') { Object.defineProperty(modules, 'exceptModule', {value: exceptModule, enumerable: false}); }
@@ -329,8 +323,6 @@ var MM = (function() {
};
-
-
return {
/* Public Methods */
@@ -399,7 +391,7 @@ var MM = (function() {
Log.error('updateDom: Sender should be a module.');
return;
}
-
+
// Further implementation is done in the private method.
updateDom(module, speed);
},
@@ -442,8 +434,3 @@ var MM = (function() {
})();
MM.init();
-
-
-
-
-
diff --git a/js/module.js b/js/module.js
index 20609b54..2c2c18d2 100644
--- a/js/module.js
+++ b/js/module.js
@@ -57,11 +57,11 @@ var Module = Class.extend({
*/
getDom: function() {
var nameWrapper = document.createElement("div");
- var name = document.createTextNode(this.name);
+ var name = document.createTextNode(this.name);
nameWrapper.appendChild(name);
var identifierWrapper = document.createElement("div");
- var identifier = document.createTextNode(this.identifier);
+ var identifier = document.createTextNode(this.identifier);
identifierWrapper.appendChild(identifier);
identifierWrapper.className = "small dimmed";
@@ -69,7 +69,7 @@ var Module = Class.extend({
div.appendChild(nameWrapper);
div.appendChild(identifierWrapper);
- return div;
+ return div;
},
/* notificationReceived(notification, payload, sender)
@@ -99,7 +99,6 @@ var Module = Class.extend({
},
-
/*********************************************
* The methods below don't need subclassing. *
*********************************************/
@@ -262,12 +261,12 @@ Module.create = function(name) {
if (obj === null || typeof obj !== 'object') {
return obj;
}
-
+
var temp = obj.constructor(); // give temp the original obj's constructor
for (var key in obj) {
temp[key] = cloneObject(obj[key]);
}
-
+
return temp;
}
@@ -278,13 +277,10 @@ Module.create = function(name) {
var ModuleClass = Module.extend(clonedDefinition);
return new ModuleClass();
-
+
};
Module.register = function(name, moduleDefinition) {
Log.log('Module registered: ' + name);
Module.definitions[name] = moduleDefinition;
};
-
-
-
diff --git a/js/server.js b/js/server.js
index 4440e1aa..aac4d839 100644
--- a/js/server.js
+++ b/js/server.js
@@ -31,4 +31,4 @@ var Server = function(config, callback) {
}
};
-module.exports = Server;
\ No newline at end of file
+module.exports = Server;
diff --git a/js/socket.js b/js/socket.js
index 4badc5f8..8f3abaf1 100644
--- a/js/socket.js
+++ b/js/socket.js
@@ -7,8 +7,6 @@
* MIT Licensed.
*/
-
-
var MMSocket = function(moduleName) {
var self = this;
@@ -18,7 +16,7 @@ var MMSocket = function(moduleName) {
}
self.moduleName = moduleName;
-
+
self.socket = io('http://localhost:8080');
self.socket.on('notification', function (data) {
@@ -35,6 +33,4 @@ var MMSocket = function(moduleName) {
});
}
};
-};
-
-
\ No newline at end of file
+};
diff --git a/js/socketclient.js b/js/socketclient.js
index 32142e94..c834679a 100644
--- a/js/socketclient.js
+++ b/js/socketclient.js
@@ -39,4 +39,4 @@ var MMSocket = function(moduleName) {
}
socket.emit(notification, payload);
};
-};
\ No newline at end of file
+};
diff --git a/modules/default/calendar/README.md b/modules/default/calendar/README.md
index 41d6242e..2c3ad142 100644
--- a/modules/default/calendar/README.md
+++ b/modules/default/calendar/README.md
@@ -1,6 +1,6 @@
# Module: Calendar
The `calendar` module is one of the default modules of the MagicMirror.
-This module displays events from a public .ical calendar. It can combine multiple calendars.
+This module displays events from a public .ical calendar. It can combine multiple calendars.
## Using the module
@@ -13,7 +13,7 @@ modules: [
config: {
// The config property is optional.
// If no config is set, an example calendar is shown.
- // See 'Configuration options' for more information.
+ // See 'Configuration options' for more information.
}
}
]
@@ -100,7 +100,7 @@ The following properties can be configured:
titleReplace
titleReplace: {'Birthday of ' : '', 'foo':'bar'}
@@ -149,4 +149,4 @@ config: {
'http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml'
-
+
showPublishDate
true
or false
reloadInterval
2000
(2.5 seconds)