From 8d8831f64b27b73f0febb49e8b51c25c6f6f65a7 Mon Sep 17 00:00:00 2001 From: David Ralph Date: Fri, 22 Mar 2019 20:05:51 +0000 Subject: [PATCH] Codacy --- README.md | 4 ++-- src/assets/js/modules/message.js | 2 +- src/assets/js/modules/util.js | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 22aad7d6..678557f9 100644 --- a/README.md +++ b/README.md @@ -17,13 +17,13 @@ Fast, open and free-to-use new tab page for most modern browsers ### Chrome -Link: https://chrome.google.com/webstore/detail/mue/bngmbednanpcfochchhgbkookpiaiaid +Link: [Chrome Web Store](https://chrome.google.com/webstore/detail/mue/bngmbednanpcfochchhgbkookpiaiaid) Development: Read the [Development](#development) section ### Firefox -Link: https://addons.mozilla.org/firefox/addon/mue +Link: [Firefox Add-ons](https://addons.mozilla.org/firefox/addon/mue) Development: Read the [Development](#development) section ### Opera/Other diff --git a/src/assets/js/modules/message.js b/src/assets/js/modules/message.js index c2dd34db..8cce383c 100644 --- a/src/assets/js/modules/message.js +++ b/src/assets/js/modules/message.js @@ -123,4 +123,4 @@ module.exports = class Message { else if (hour > 18) time = 'Dod eftermiddag'; // If it's before 6pm, set the time string to "Good afternoon" setHTMLContent('.greeting', time); // Write the string contents to the HTML } -} \ No newline at end of file +}; \ No newline at end of file diff --git a/src/assets/js/modules/util.js b/src/assets/js/modules/util.js index 3edac763..531c9995 100644 --- a/src/assets/js/modules/util.js +++ b/src/assets/js/modules/util.js @@ -20,22 +20,22 @@ module.exports = class Util { // format time static formatTimeUnit(unit) { return unit < 10 ? '0' + unit : unit; - }; + } // setHTMLContent is the kind of function that is referred to as a 'wrapper' static setHTMLContent(selector, content) { return document.querySelector(selector).innerHTML = content; - }; + } // get random item static getRandIndex(array) { return Math.floor(Math.random() * (array.length - 1)); - }; + } // pick random from array static pickFromArray(array) { return array[Math.floor(Math.random() * (array.length - 1))]; - }; + } static contains(needle) { let findNaN = needle !== needle;