new
|
@ -0,0 +1,59 @@
|
|||
{
|
||||
"env": {
|
||||
"es6": true,
|
||||
"amd": true,
|
||||
"node": true,
|
||||
"browser": true,
|
||||
"commonjs": true
|
||||
},
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 9,
|
||||
"sourceType": "module",
|
||||
"ecmaFeatures": {
|
||||
"jsx": true,
|
||||
"forOf": true,
|
||||
"spread": true,
|
||||
"modules": true,
|
||||
"classes": true,
|
||||
"generators": true,
|
||||
"restParams": true,
|
||||
"regexUFlag": true,
|
||||
"regexYFlag": true,
|
||||
"globalReturn": true,
|
||||
"destructuring": true,
|
||||
"impliedStrict": true,
|
||||
"blockBindings": true,
|
||||
"defaultParams": true,
|
||||
"octalLiterals": true,
|
||||
"arrowFunctions": true,
|
||||
"binaryLiterals": true,
|
||||
"templateStrings": true,
|
||||
"superInFunctions": true,
|
||||
"unicodeCodePointEscapes": true,
|
||||
"objectLiteralShorthandMethods": true,
|
||||
"objectLiteralComputedProperties": true,
|
||||
"objectLiteralDuplicateProperties": true,
|
||||
"objectLiteralShorthandProperties": true
|
||||
}
|
||||
},
|
||||
"plugins": [],
|
||||
"rules": {
|
||||
"semi": "error",
|
||||
"indent": [ 0, 2 ],
|
||||
"strict": "off",
|
||||
"eqeqeq": "error",
|
||||
"no-var": "warn",
|
||||
"no-undef": "warn",
|
||||
"comma-dangle": "warn",
|
||||
"no-dupe-args": "warn",
|
||||
"no-dupe-keys": "warn",
|
||||
"require-await": "warn",
|
||||
"no-global-assign": "warn",
|
||||
"no-duplicate-imports": "error",
|
||||
"no-dupe-class-members": "error"
|
||||
},
|
||||
"globals": {
|
||||
"_config": false,
|
||||
"console": false
|
||||
}
|
||||
}
|
|
@ -1,3 +1,5 @@
|
|||
<img src='assets/logo/logo_horizontal.png'>
|
||||
|
||||
# Mue
|
||||
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/fba7ad7fc6e14fe0bc2a8d53dbf0bb41)](https://www.codacy.com/app/ohlookitsderpy/Mue?utm_source=github.com&utm_medium=referral&utm_content=ohlookitsderpy/Mue&utm_campaign=Badge_Grade)
|
||||
[![Discord Badge](https://discordapp.com/api/guilds/336039472250748928/widget.png)](https://discord.gg/HJmmmTB)
|
||||
|
@ -91,6 +93,7 @@ Development: Read the [Development](#development) section
|
|||
<img src='assets/screenshot.jpg'>
|
||||
|
||||
## Credits
|
||||
|
||||
[Turbomarshmello](https://github.com/TurboMarshmello) - Portions of original code, name idea.
|
||||
|
||||
[Pexels](https://pexels.com) - Stock photos used
|
||||
|
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 40 KiB |
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 38 KiB |
|
@ -9,8 +9,9 @@
|
|||
"js-watch": "webpack --progress --watch"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "5.16.0",
|
||||
"sass": "1.20.1",
|
||||
"webpack": "4.30.0",
|
||||
"webpack": "4.31.0",
|
||||
"webpack-cli": "3.3.2"
|
||||
}
|
||||
}
|
||||
|
|
Before Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 2.5 KiB |
|
@ -46,11 +46,11 @@ module.exports = class Func {
|
|||
|
||||
static setRandQuote() {
|
||||
const id = util.getRandIndex(quotes.authors);
|
||||
if (util.contains.call(codes.itcodes, nal)) util.setHTMLContent('blockquote', `"${quotes.ita[id]}"`); //Italian
|
||||
if (util.contains.call(codes.ptcodes, nal)) util.setHTMLContent('blockquote', `"${quotes.pt[id]}"` || `"${quotes.eng[id]}"`); //Portuguese
|
||||
if (util.contains.call(codes.spcodes, nal)) util.setHTMLContent('blockquote', `"${quotes.spa[id]}"`); //Spanish
|
||||
else util.setHTMLContent('blockquote', `"${quotes.eng[id]}"`); //English
|
||||
util.setHTMLContent('cite', quotes.authors[id]);
|
||||
if (util.contains.call(codes.itcodes, nal)) document.querySelector('blockquote').innerHTML = `"${quotes.it[id]}"`; //Italian
|
||||
if (util.contains.call(codes.ptcodes, nal)) document.querySelector('blockquote').innerHTML = `"${quotes.pt[id]}"` || `"${quotes.eng[id]}"`; //Portuguese
|
||||
if (util.contains.call(codes.spcodes, nal)) document.querySelector('blockquote').innerHTML = `"${quotes.sp[id]}"`; //Spanish
|
||||
else document.querySelector('blockquote').innerHTML = `"${quotes.eng[id]}"`; //English
|
||||
document.querySelector('cite').innerHTML = quotes.authors[id];
|
||||
}
|
||||
|
||||
static setTime() {
|
||||
|
@ -62,6 +62,6 @@ module.exports = class Func {
|
|||
];
|
||||
// joins all of the array elements into a string using the ':' separator
|
||||
// example: [16, 32, 03] -> "16:32:03"
|
||||
util.setHTMLContent('time', time.join(':'));
|
||||
document.querySelector('time').innerHTML = time.join(':');
|
||||
}
|
||||
};
|
|
@ -16,8 +16,7 @@
|
|||
█████████████████████████████████████████████████████████████
|
||||
*/
|
||||
|
||||
const hour = new Date().getHours(); // Get the current hour
|
||||
const { setHTMLContent } = require('./util.js');
|
||||
const hour = new Date().getHours(); // Get the current hour
|
||||
|
||||
module.exports = class Msg {
|
||||
// English
|
||||
|
@ -25,14 +24,14 @@ module.exports = class Msg {
|
|||
let time = 'Good evening'; // Set the default time string to "Good evening"
|
||||
if (hour < 12) time = 'Good morning'; //If it's before 12am, set the time string to "Good morning"
|
||||
else if (hour < 18) time = 'Good afternoon'; //If it's before 6pm, set the time string to "Good afternoon"
|
||||
setHTMLContent('.greeting', time); // Write the string contents to the HTML
|
||||
document.querySelector('.greeting').innerHTML = time; // Write the string contents to the HTML
|
||||
}
|
||||
|
||||
// Italian
|
||||
static itMsgSet() {
|
||||
let time = 'Buongiorno'; // Set the default time string
|
||||
if (hour > 18) time = 'Buonasera'; // In Italian there is just Buongiorno or Buonasera
|
||||
setHTMLContent('.greeting', time); // Write the string contents to the HTML
|
||||
document.querySelector('.greeting').innerHTML = time; // Write the string contents to the HTML
|
||||
}
|
||||
|
||||
// Dutch
|
||||
|
@ -40,7 +39,7 @@ module.exports = class Msg {
|
|||
let time = 'Goedemiddag'; // Set the default time string to "Good evening"
|
||||
if (hour < 12) time = 'Goedemorgen'; //If it's before 12am, set the time string to "Good morning"
|
||||
else if (hour > 18) time = 'Goedenavond'; //If it's before 6pm, set the time string to "Good afternoon"
|
||||
setHTMLContent('.greeting', time); // Write the string contents to the HTML
|
||||
document.querySelector('.greeting').innerHTML = time; // Write the string contents to the HTML
|
||||
}
|
||||
|
||||
// French
|
||||
|
@ -48,7 +47,7 @@ module.exports = class Msg {
|
|||
let time = 'Bonsoir'; // Set the default time string to "Good evening"
|
||||
if (hour < 12) time = 'Bonjour'; //If it's before 12am, set the time string to "Good morning"
|
||||
else if (hour > 18) time = 'Bonne après-midi'; //If it's before 6pm, set the time string to "Good afternoon"
|
||||
setHTMLContent('.greeting', time); // Write the string contents to the HTML
|
||||
document.querySelector('.greeting').innerHTML = time; // Write the string contents to the HTML
|
||||
}
|
||||
|
||||
// Spanish
|
||||
|
@ -56,7 +55,7 @@ module.exports = class Msg {
|
|||
let time = 'Buenas Tardes'; // Set the default time string to "Good evening"
|
||||
if (hour < 12) time = 'Buenos Días'; // If it's before 12am, set the time string to "Good morning"
|
||||
else if (hour > 18) time = 'Buenas Noches'; // If it's before 6pm, set the time string to "Good afternoon"
|
||||
setHTMLContent('.greeting', time); // Write the string contents to the HTML
|
||||
document.querySelector('.greeting').innerHTML = time; // Write the string contents to the HTML
|
||||
}
|
||||
|
||||
// Finnish
|
||||
|
@ -64,7 +63,7 @@ module.exports = class Msg {
|
|||
let time = 'Hyvää iltaa'; // Set the default time string to "Good evening"
|
||||
if (hour < 12) time = 'Hyvää huomenta'; // If it's before 12am, set the time string to "Good morning"
|
||||
else if (hour > 18) time = 'Hyvää iltapäivää'; // If it's before 6pm, set the time string to "Good afternoon"
|
||||
setHTMLContent('.greeting', time); // Write the string contents to the HTML
|
||||
document.querySelector('.greeting').innerHTML = time; // Write the string contents to the HTML
|
||||
}
|
||||
|
||||
// German
|
||||
|
@ -72,7 +71,7 @@ module.exports = class Msg {
|
|||
let time = 'Guten Abend'; // Set the default time string to "Good evening"
|
||||
if (hour < 12) time = 'Guten Morgen'; // If it's before 12am, set the time string to "Good morning"
|
||||
else if (hour > 18) time = 'Guten Nachmittag'; // If it's before 6pm, set the time string to "Good afternoon"
|
||||
setHTMLContent('.greeting', time); // Write the string contents to the HTML
|
||||
document.querySelector('.greeting').innerHTML = time; // Write the string contents to the HTML
|
||||
}
|
||||
|
||||
// Hebrew
|
||||
|
@ -80,7 +79,7 @@ module.exports = class Msg {
|
|||
let time = 'ערב טוב'; // Set the default time string to "Good evening"
|
||||
if (hour < 12) time = 'בוקר טוב'; // If it's before 12am, set the time string to "Good morning"
|
||||
else if (hour > 18) time = 'אחר הצהריים טובים'; // If it's before 6pm, set the time string to "Good afternoon"
|
||||
setHTMLContent('.greeting', time); // Write the string contents to the HTML
|
||||
document.querySelector('.greeting').innerHTML = time; // Write the string contents to the HTML
|
||||
}
|
||||
|
||||
// Russian
|
||||
|
@ -88,7 +87,7 @@ module.exports = class Msg {
|
|||
let time = 'Добрый Вечер'; // Set the default time string to "Good evening"
|
||||
if (hour < 12) time = 'добрый утро'; // If it's before 12am, set the time string to "Good morning"
|
||||
else if (hour > 18) time = 'добрый день'; // If it's before 6pm, set the time string to "Good afternoon"
|
||||
setHTMLContent('.greeting', time); // Write the string contents to the HTML
|
||||
document.querySelector('.greeting').innerHTML = time; // Write the string contents to the HTML
|
||||
}
|
||||
|
||||
// Arabic
|
||||
|
@ -96,13 +95,13 @@ module.exports = class Msg {
|
|||
let time = 'مساء الخير'; // Set the default time string to "Good evening"
|
||||
if (hour < 12) time = 'صباح الخير'; // If it's before 12am, set the time string to "Good morning"
|
||||
else if (hour > 18) time = 'مساء الخير'; // If it's before 6pm, set the time string to "Good afternoon"
|
||||
setHTMLContent('.greeting', time); // Write the string contents to the HTML
|
||||
document.querySelector('.greeting').innerHTML = time; // Write the string contents to the HTML
|
||||
}
|
||||
|
||||
// Swedish
|
||||
static svMsgSet() {
|
||||
let time = 'God kväll'; // Set the default time string to "Good evening"
|
||||
if (hour < 12) time = 'God morgon'; // If it's before 12am, set the time string to "Good morning"
|
||||
setHTMLContent('.greeting', time); // Write the string contents to the HTML
|
||||
document.querySelector('.greeting').innerHTML = time; // Write the string contents to the HTML
|
||||
}
|
||||
};
|
|
@ -37,7 +37,7 @@ module.exports = {
|
|||
'Motivation comes from working on things we care about.',
|
||||
'With the right kind of coaching and determination you can accomplish anything.',
|
||||
'Some people look for a beautiful place. Others make a place beautiful.',
|
||||
'Life is like riding a bicycle. To keep your balance, you must keep moving.',
|
||||
'Life is like riding a bicycle. To keep your balance, you must keep moving.'
|
||||
|
||||
],
|
||||
ita: [
|
||||
|
@ -81,14 +81,14 @@ module.exports = {
|
|||
'Un campeón se define no por sus victorias, sino por cómo pueden recuperarse cuando caen',
|
||||
'La motivación viene de trabajar en cosas que nos importan',
|
||||
'Con el entrenamiento y la determinación adecuados, puedes lograr cualquier cosa',
|
||||
'Algunas personas buscan un lugar hermoso. Otras, hacen un lugar hermoso.',
|
||||
'Algunas personas buscan un lugar hermoso. Otras, hacen un lugar hermoso.'
|
||||
],
|
||||
pt: [
|
||||
'O tempo continua. Então o que quer que você vai fazer,faça. Faça agora. Não espere.',
|
||||
'Todos os sonhos podem virar verdade,se tivermos a coragem de persegui-los.',
|
||||
'Não importa o quão devagar você for,desde que você não pare.',
|
||||
'Acredite em si mesmo. Você é mais corajoso que pensa,mais talentoso que sabe,e capaz de mais que imagina.',
|
||||
'Se você acredita que vai dar certo,você verá oportunidades. Se você acredita que não vai,você vera obstáculos.',
|
||||
'Se você acredita que vai dar certo,você verá oportunidades. Se você acredita que não vai,você vera obstáculos.'
|
||||
],
|
||||
authors: [
|
||||
'Robert De Niro',
|
||||
|
|
|
@ -22,11 +22,6 @@ module.exports = class Util {
|
|||
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));
|
||||
|
|
|
@ -6,7 +6,9 @@
|
|||
"default_icon": "./assets/img/icon.png"
|
||||
},
|
||||
"background": {
|
||||
"scripts": ["./assets/js/background-opera.js"]
|
||||
"scripts": [
|
||||
"./assets/js/background-opera.js"
|
||||
]
|
||||
},
|
||||
"permissions": [
|
||||
"tabs"
|
||||
|
|