From cbf63436fb53d8905d5e866929630c61d222ada6 Mon Sep 17 00:00:00 2001 From: David Ralph Date: Fri, 12 Apr 2019 19:02:44 +0100 Subject: [PATCH] Start working on settings feature --- README.md | 3 +- src/assets/js/base.js | 2 +- src/assets/js/index.js | 21 ++++++---- src/assets/scss/base.scss | 8 ++-- .../scss/modules/settings/_buttons.scss | 0 src/assets/scss/modules/{ => tab}/_bg.scss | 0 src/assets/scss/modules/{ => tab}/_misc.scss | 0 src/assets/scss/modules/{ => tab}/_quote.scss | 0 .../modules/{ => tab}/_time-greeting.scss | 0 src/manifest-firefox.json | 2 +- src/manifest-opera.json | 2 +- src/{manifest-chrome.json => manifest.json} | 8 +++- src/settings.html | 39 +++++++++++++++++++ 13 files changed, 67 insertions(+), 18 deletions(-) create mode 100644 src/assets/scss/modules/settings/_buttons.scss rename src/assets/scss/modules/{ => tab}/_bg.scss (100%) rename src/assets/scss/modules/{ => tab}/_misc.scss (100%) rename src/assets/scss/modules/{ => tab}/_quote.scss (100%) rename src/assets/scss/modules/{ => tab}/_time-greeting.scss (100%) rename src/{manifest-chrome.json => manifest.json} (65%) create mode 100644 src/settings.html diff --git a/README.md b/README.md index cf98c86e..04e6e689 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![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) -Buy Me a Coffee at ko-fi.com +Buy me a Coffee at ko-fi.com Become a patron on patreon.com Fast, open and free-to-use new tab page for most modern browsers @@ -12,6 +12,7 @@ Fast, open and free-to-use new tab page for most modern browsers * Supports multiple browsers * Actively developed and opensource * Multiple language support +* Settings menu for easy customisation ## Installation ### Chrome diff --git a/src/assets/js/base.js b/src/assets/js/base.js index cec8c34d..a3d90c9d 100644 --- a/src/assets/js/base.js +++ b/src/assets/js/base.js @@ -1 +1 @@ -!function(e){var o={};function t(a){if(o[a])return o[a].exports;var n=o[a]={i:a,l:!1,exports:{}};return e[a].call(n.exports,n,n.exports,t),n.l=!0,n.exports}t.m=e,t.c=o,t.d=function(e,o,a){t.o(e,o)||Object.defineProperty(e,o,{enumerable:!0,get:a})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,o){if(1&o&&(e=t(e)),8&o)return e;if(4&o&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(t.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&o&&"string"!=typeof e)for(var n in e)t.d(a,n,function(o){return e[o]}.bind(null,n));return a},t.n=function(e){var o=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(o,"a",o),o},t.o=function(e,o){return Object.prototype.hasOwnProperty.call(e,o)},t.p="",t(t.s=1)}([function(e,o){e.exports=class{static formatTimeUnit(e){return e<10?"0"+e:e}static setHTMLContent(e,o){return document.querySelector(e).innerHTML=o}static getRandIndex(e){return Math.floor(Math.random()*(e.length-1))}static pickFromArray(e){return e[Math.floor(Math.random()*(e.length-1))]}static contains(e){const o=e!=e;let t;return(t=o||"function"!=typeof Array.prototype.indexOf?e=>{let t=-1,a=-1;for(t=0;t-1}}},function(e,o,t){e.exports=t(2)},function(e,o,t){const a=t(3);document.addEventListener("DOMContentLoaded",()=>{a.setDaytimeMsg(),a.setRandBg(),a.setRandQuote(),a.setTime(),setInterval(a.setTime,1e3)});document.oncontextmenu=(()=>!1)},function(e,o,t){const a=t(4),n=t(5),i=t(0),s=t(6),r=t(7),c=navigator.language;e.exports=class{static setDaytimeMsg(){i.contains.call(s.itcodes,c)&&n.itMsgSet(),i.contains.call(s.nlcodes,c)&&n.nlMsgSet(),i.contains.call(s.frcodes,c)&&n.frMsgSet(),i.contains.call(s.spcodes,c)&&n.spMsgSet(),i.contains.call(s.ficodes,c)&&n.fiMsgSet(),i.contains.call(s.decodes,c)&&n.spMsgSet(),i.contains.call(s.hecodes,c)&&n.heMsgSet(),i.contains.call(s.rucodes,c)&&n.ruMsgSet(),i.contains.call(s.arcodes,c)&&n.arMsgSet(),i.contains.call(s.svcodes,c)?n.svMsgSet():n.engMsgSet()}static setRandBg(){document.body.classList.add(i.pickFromArray(a))}static setRandQuote(){const e=i.getRandIndex(r.authors);i.contains.call(s.itcodes,c)&&i.setHTMLContent("blockquote",`"${r.ita[e]}"`),i.contains.call(s.ptcodes,c)&&i.setHTMLContent("blockquote",`"${r.pt[e]}"`||`"${r.eng[e]}"`),i.contains.call(s.spcodes,c)?i.setHTMLContent("blockquote",`"${r.spa[e]}"`):i.setHTMLContent("blockquote",`"${r.eng[e]}"`),i.setHTMLContent("cite",r.authors[e])}static setTime(){const e=new Date,o=[i.formatTimeUnit(e.getHours()),i.formatTimeUnit(e.getMinutes()),i.formatTimeUnit(e.getSeconds())];i.setHTMLContent("time",o.join(":"))}}},function(e,o){e.exports=["mountain","sunrise","butterfly","leaves","river","sea","space","ice","waterfall","lake","sunset","desert","canyon","rose","forest","cherry","clouds","autumn","winter","flowers","sunrise","rocks","trees","mountains","beach"]},function(e,o,t){const a=(new Date).getHours(),{setHTMLContent:n}=t(0);e.exports=class{static engMsgSet(){let e="Good evening";a<12?e="Good morning":a<18&&(e="Good afternoon"),n(".greeting",e)}static itMsgSet(){let e="Buongiorno";a>18&&(e="Buonasera"),n(".greeting",e)}static nlMsgSet(){let e="Goedemiddag";a<12?e="Goedemorgen":a>18&&(e="Goedenavond"),n(".greeting",e)}static frMsgSet(){let e="Bonsoir";a<12?e="Bonjour":a>18&&(e="Bonne après-midi"),n(".greeting",e)}static spMsgSet(){let e="Buenas Tardes";a<12?e="Buenos Días":a>18&&(e="Buenas Noches"),n(".greeting",e)}static fiMsgSet(){let e="Hyvää iltaa";a<12?e="Hyvää huomenta":a>18&&(e="Hyvää iltapäivää"),n(".greeting",e)}static deMsgSet(){let e="Guten Abend";a<12?e="Guten Morgen":a>18&&(e="Guten Nachmittag"),n(".greeting",e)}static heMsgSet(){let e="ערב טוב";a<12?e="בוקר טוב":a>18&&(e="אחר הצהריים טובים"),n(".greeting",e)}static ruMsgSet(){let e="Добрый Вечер";a<12?e="добрый утро":a>18&&(e="добрый день"),n(".greeting",e)}static arMsgSet(){let e="مساء الخير";a<12?e="صباح الخير":a>18&&(e="مساء الخير"),n(".greeting",e)}static svMsgSet(){let e="God kväll";a<12&&(e="God morgon"),n(".greeting",e)}}},function(e,o){e.exports={itcodes:["it","it-IT","it-CH"],nlcodes:["nl","nl-BE"],frcodes:["fr","fr-BE","fr-CA","fr-FR","fr-LU","fr-MC","fr-CH"],ptcodes:["pt","pt-BR"],spcodes:["es","es-AR","es-BO","es-CL","es-CO","es-CR","es-DO","es-EC","es-ES","es-GT","es-HN","es-MX","es-NI","es-PA","es-PE","es-PR","es-PY","es-SV","es-UY","es-VE"],ficodes:["fi"],decodes:["de","de-AT","de-DE","de-LI","de-LU","de-CH"],hecodes:["he"],rucodes:["ru","ru-MO"],arcodes:["ar","ar-DZ","ar-BH","ar-EG","ar-IQ","ar-JO","ar-KW","ar-LB","ar-LY","ar-QA","ar-SA","ar-SY","ar-TN","ar-AE","ar-YE"],svcodes:["sv","sv-FI","sv-SV"]}},function(e,o){e.exports={eng:["Time goes on. So whatever you’re going to do, do it. Do it now. Don’t wait.","All our dreams can come true, if we have the courage to pursue them.","It does not matter how slowly you go as long as you do not stop.","Believe in yourself. You are braver than you think, more talented than you know, and capable of more than you imagine.","If you believe it will work out, you’ll see opportunities. If you believe it won’t, you will see obstacles","Everything you’ve ever wanted is on the other side of fear.","Success is not final, failure is not fatal: it is the courage to continue that counts.","There is only one thing that makes a dream impossible to achieve: the fear of failure.","Your true success in life begins only when you make the commitment to become excellent at what you do.","Believe in yourself, take on your challenges, dig deep within yourself to conquer fears. Never let anyone bring you down. You got to keep going.","Too many of us are not living our dreams because we are living our fears.","Hard times don’t create heroes. It is during the hard times when the ‘hero’ within us is revealed.","If you can tune into your purpose and really align with it, setting goals so that your vision is an expression of that purpose, then life flows much more easily.","Whatever the mind can conceive and believe, it can achieve.","Don’t wish it were easier. Wish you were better.","A champion is defined not by their wins but by how they can recover when they fall.","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."],ita:["Il tempo passa. Quindi qualunque cosa che farai, falla. Falla ora. Non aspettare","Tutti i nostri sogni possono diventare reali, se abbiamo il coraggio di seguirli.","Non importa quanto lentamente vai fino a quando non ti fermi","Credi in te stesso. Sei più coraggioso di quanto pensi, più talentuoso di quanto credi, e capace più di quanto puoi immaginare.","Se ci credi funzionerà, vedrai delle opportunità. Se non ci credi, vedrai solamente ostacoli","Tutti i tuoi desideri sono opposti alla paura","Il successo non è la fine, il fallimento non è fatale: è il coraggio per continuare quello che conta.","C'è solo una cosa che fa i sogni impossibili: la paura di fallire","Il vero successo nella tua vita inizia solo quando fai il sacrificio per diventare eccellente a quello che ami.","Credi in te stesso, sfida i tuoi problemi, scava nel profondo del tuo io per sconfiggere le tue paure. Mai arrendersi per qualcun'altro. Tu devi continuare.","Troppe persone non vivono i loro sogni per vivere nelle loro paure",'Tempi difficili non fanno eroi. È durante i tempi duri che "l\'eroe" in noi viene rivelato.',"Se puoi sintonizzare sul tuo senso e allinearti a quest'ultimo, impostando i tuoi obiettivi in modo che la tua visione sia un'espressione di quel senso, La tua vita scorre molto più facilmente","Qualunque cosa la mente può immaginare e crederese, si può realizzare","Non desiderare che fosse stato più facile. Desidera che tu fossi stato migliore.","Un campione si definisce non dalle sue vittorie ma da come recupera quando cade","La motivazione viene dal lavorare so cose che amiamo","Con il giusto tipo di allenamento e determinazione puoi fare tutto","Alcune persone cercano un posto indimenticabile. Altre lo transformano in un posto mozzafiato.","La vita è come andare in bicicletta. Per tenerti in equilibrio, devi continuare a muoverti"],spa:["El tiempo continúa. Así que lo que sea que vayas a hacer, hazlo. Hazlo ahora. No esperes","Todos nuestros sueños pueden hacerse realidad, si tenemos el coraje de perseguirlos.","No importa qué tan lento vayas, siempre y cuando no te detengas.","Cree en ti mismo. Eres más valiente de lo que crees, más talentoso de lo que sabes y capaz de más de lo que imaginas.","Si crees que funcionará, verás oportunidades. Si crees que no, verás obstáculos ","Todo lo que siempre has querido está al otro lado del miedo","El éxito no es definitivo, el fracaso no es fatal: el coraje para continuar es lo que cuenta","Solo hay una cosa que hace que un sueño sea imposible de lograr: el miedo al fracaso","Tu verdadero éxito en la vida comienza solo cuando te comprometes a ser excelente en lo que haces","Cree en ti mismo, asume tus desafíos, excava profundo dentro de ti mismo para vencer tus miedos. Nunca dejes que nadie te derribe. Tienes que seguir adelante.","Muchos de nosotros no estamos viviendo nuestros sueños porque estamos viviendo nuestros miedos","Los tiempos difíciles no crean héroes. Es durante los momentos difíciles en que se revela el héroe dentro de nosotros.","Si puedes sincornizarte con tu propósito, y realmente alinearte con él, estableciendo metas para que tu visión sea una expresión de ese propósito, entonces la vida fluye mucho más fácilmente","Lo que la mente pueda concebir y creer, lo puede lograr","No desees que sea fácil. Desea ser mejor.","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."],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."],authors:["Robert De Niro","Walt Disney","Confucius","Roy T. Bennett","Wayne Dyer","George Addair","Winston Churchill","Paulo Coelho","Brian Tracy","Chantal Sutherland","Les Brown","Bob Riley","Jack Canfield","Napoleon Hill","Jim Rohn","Serena Williams","Sheryl Sandberg","Reese Witherspoon","Hazrat Inayat Khan","Albert Einstein"]}}]); \ No newline at end of file +!function(e){var o={};function t(a){if(o[a])return o[a].exports;var n=o[a]={i:a,l:!1,exports:{}};return e[a].call(n.exports,n,n.exports,t),n.l=!0,n.exports}t.m=e,t.c=o,t.d=function(e,o,a){t.o(e,o)||Object.defineProperty(e,o,{enumerable:!0,get:a})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,o){if(1&o&&(e=t(e)),8&o)return e;if(4&o&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(t.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&o&&"string"!=typeof e)for(var n in e)t.d(a,n,function(o){return e[o]}.bind(null,n));return a},t.n=function(e){var o=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(o,"a",o),o},t.o=function(e,o){return Object.prototype.hasOwnProperty.call(e,o)},t.p="",t(t.s=1)}([function(e,o){e.exports=class{static formatTimeUnit(e){return e<10?"0"+e:e}static setHTMLContent(e,o){return document.querySelector(e).innerHTML=o}static getRandIndex(e){return Math.floor(Math.random()*(e.length-1))}static pickFromArray(e){return e[Math.floor(Math.random()*(e.length-1))]}static contains(e){const o=e!=e;let t;return(t=o||"function"!=typeof Array.prototype.indexOf?e=>{let t=-1,a=-1;for(t=0;t-1}}},function(e,o,t){e.exports=t(2)},function(e,o,t){const a=t(3);document.addEventListener("DOMContentLoaded",()=>{try{a.setDaytimeMsg(),a.setRandBg(),a.setRandQuote(),a.setTime(),setInterval(a.setTime,1e3)}catch(e){a.setSettingDisplay()}});document.oncontextmenu=(()=>!1)},function(e,o,t){const a=t(4),n=t(5),i=t(0),s=t(6),r=t(7),c=navigator.language;e.exports=class{static setDaytimeMsg(){i.contains.call(s.itcodes,c)&&n.itMsgSet(),i.contains.call(s.nlcodes,c)&&n.nlMsgSet(),i.contains.call(s.frcodes,c)&&n.frMsgSet(),i.contains.call(s.spcodes,c)&&n.spMsgSet(),i.contains.call(s.ficodes,c)&&n.fiMsgSet(),i.contains.call(s.decodes,c)&&n.spMsgSet(),i.contains.call(s.hecodes,c)&&n.heMsgSet(),i.contains.call(s.rucodes,c)&&n.ruMsgSet(),i.contains.call(s.arcodes,c)&&n.arMsgSet(),i.contains.call(s.svcodes,c)?n.svMsgSet():n.engMsgSet()}static setRandBg(){document.body.classList.add(i.pickFromArray(a))}static setRandQuote(){const e=i.getRandIndex(r.authors);i.contains.call(s.itcodes,c)&&i.setHTMLContent("blockquote",`"${r.ita[e]}"`),i.contains.call(s.ptcodes,c)&&i.setHTMLContent("blockquote",`"${r.pt[e]}"`||`"${r.eng[e]}"`),i.contains.call(s.spcodes,c)?i.setHTMLContent("blockquote",`"${r.spa[e]}"`):i.setHTMLContent("blockquote",`"${r.eng[e]}"`),i.setHTMLContent("cite",r.authors[e])}static setTime(){const e=new Date,o=[i.formatTimeUnit(e.getHours()),i.formatTimeUnit(e.getMinutes()),i.formatTimeUnit(e.getSeconds())];i.setHTMLContent("time",o.join(":"))}}},function(e,o){e.exports=["mountain","sunrise","butterfly","leaves","river","sea","space","ice","waterfall","lake","sunset","desert","canyon","rose","forest","cherry","clouds","autumn","winter","flowers","sunrise","rocks","trees","mountains","beach"]},function(e,o,t){const a=(new Date).getHours(),{setHTMLContent:n}=t(0);e.exports=class{static engMsgSet(){let e="Good evening";a<12?e="Good morning":a<18&&(e="Good afternoon"),n(".greeting",e)}static itMsgSet(){let e="Buongiorno";a>18&&(e="Buonasera"),n(".greeting",e)}static nlMsgSet(){let e="Goedemiddag";a<12?e="Goedemorgen":a>18&&(e="Goedenavond"),n(".greeting",e)}static frMsgSet(){let e="Bonsoir";a<12?e="Bonjour":a>18&&(e="Bonne après-midi"),n(".greeting",e)}static spMsgSet(){let e="Buenas Tardes";a<12?e="Buenos Días":a>18&&(e="Buenas Noches"),n(".greeting",e)}static fiMsgSet(){let e="Hyvää iltaa";a<12?e="Hyvää huomenta":a>18&&(e="Hyvää iltapäivää"),n(".greeting",e)}static deMsgSet(){let e="Guten Abend";a<12?e="Guten Morgen":a>18&&(e="Guten Nachmittag"),n(".greeting",e)}static heMsgSet(){let e="ערב טוב";a<12?e="בוקר טוב":a>18&&(e="אחר הצהריים טובים"),n(".greeting",e)}static ruMsgSet(){let e="Добрый Вечер";a<12?e="добрый утро":a>18&&(e="добрый день"),n(".greeting",e)}static arMsgSet(){let e="مساء الخير";a<12?e="صباح الخير":a>18&&(e="مساء الخير"),n(".greeting",e)}static svMsgSet(){let e="God kväll";a<12&&(e="God morgon"),n(".greeting",e)}}},function(e,o){e.exports={itcodes:["it","it-IT","it-CH"],nlcodes:["nl","nl-BE"],frcodes:["fr","fr-BE","fr-CA","fr-FR","fr-LU","fr-MC","fr-CH"],ptcodes:["pt","pt-BR"],spcodes:["es","es-AR","es-BO","es-CL","es-CO","es-CR","es-DO","es-EC","es-ES","es-GT","es-HN","es-MX","es-NI","es-PA","es-PE","es-PR","es-PY","es-SV","es-UY","es-VE"],ficodes:["fi"],decodes:["de","de-AT","de-DE","de-LI","de-LU","de-CH"],hecodes:["he"],rucodes:["ru","ru-MO"],arcodes:["ar","ar-DZ","ar-BH","ar-EG","ar-IQ","ar-JO","ar-KW","ar-LB","ar-LY","ar-QA","ar-SA","ar-SY","ar-TN","ar-AE","ar-YE"],svcodes:["sv","sv-FI","sv-SV"]}},function(e,o){e.exports={eng:["Time goes on. So whatever you’re going to do, do it. Do it now. Don’t wait.","All our dreams can come true, if we have the courage to pursue them.","It does not matter how slowly you go as long as you do not stop.","Believe in yourself. You are braver than you think, more talented than you know, and capable of more than you imagine.","If you believe it will work out, you’ll see opportunities. If you believe it won’t, you will see obstacles","Everything you’ve ever wanted is on the other side of fear.","Success is not final, failure is not fatal: it is the courage to continue that counts.","There is only one thing that makes a dream impossible to achieve: the fear of failure.","Your true success in life begins only when you make the commitment to become excellent at what you do.","Believe in yourself, take on your challenges, dig deep within yourself to conquer fears. Never let anyone bring you down. You got to keep going.","Too many of us are not living our dreams because we are living our fears.","Hard times don’t create heroes. It is during the hard times when the ‘hero’ within us is revealed.","If you can tune into your purpose and really align with it, setting goals so that your vision is an expression of that purpose, then life flows much more easily.","Whatever the mind can conceive and believe, it can achieve.","Don’t wish it were easier. Wish you were better.","A champion is defined not by their wins but by how they can recover when they fall.","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."],ita:["Il tempo passa. Quindi qualunque cosa che farai, falla. Falla ora. Non aspettare","Tutti i nostri sogni possono diventare reali, se abbiamo il coraggio di seguirli.","Non importa quanto lentamente vai fino a quando non ti fermi","Credi in te stesso. Sei più coraggioso di quanto pensi, più talentuoso di quanto credi, e capace più di quanto puoi immaginare.","Se ci credi funzionerà, vedrai delle opportunità. Se non ci credi, vedrai solamente ostacoli","Tutti i tuoi desideri sono opposti alla paura","Il successo non è la fine, il fallimento non è fatale: è il coraggio per continuare quello che conta.","C'è solo una cosa che fa i sogni impossibili: la paura di fallire","Il vero successo nella tua vita inizia solo quando fai il sacrificio per diventare eccellente a quello che ami.","Credi in te stesso, sfida i tuoi problemi, scava nel profondo del tuo io per sconfiggere le tue paure. Mai arrendersi per qualcun'altro. Tu devi continuare.","Troppe persone non vivono i loro sogni per vivere nelle loro paure",'Tempi difficili non fanno eroi. È durante i tempi duri che "l\'eroe" in noi viene rivelato.',"Se puoi sintonizzare sul tuo senso e allinearti a quest'ultimo, impostando i tuoi obiettivi in modo che la tua visione sia un'espressione di quel senso, La tua vita scorre molto più facilmente","Qualunque cosa la mente può immaginare e crederese, si può realizzare","Non desiderare che fosse stato più facile. Desidera che tu fossi stato migliore.","Un campione si definisce non dalle sue vittorie ma da come recupera quando cade","La motivazione viene dal lavorare so cose che amiamo","Con il giusto tipo di allenamento e determinazione puoi fare tutto","Alcune persone cercano un posto indimenticabile. Altre lo transformano in un posto mozzafiato.","La vita è come andare in bicicletta. Per tenerti in equilibrio, devi continuare a muoverti"],spa:["El tiempo continúa. Así que lo que sea que vayas a hacer, hazlo. Hazlo ahora. No esperes","Todos nuestros sueños pueden hacerse realidad, si tenemos el coraje de perseguirlos.","No importa qué tan lento vayas, siempre y cuando no te detengas.","Cree en ti mismo. Eres más valiente de lo que crees, más talentoso de lo que sabes y capaz de más de lo que imaginas.","Si crees que funcionará, verás oportunidades. Si crees que no, verás obstáculos ","Todo lo que siempre has querido está al otro lado del miedo","El éxito no es definitivo, el fracaso no es fatal: el coraje para continuar es lo que cuenta","Solo hay una cosa que hace que un sueño sea imposible de lograr: el miedo al fracaso","Tu verdadero éxito en la vida comienza solo cuando te comprometes a ser excelente en lo que haces","Cree en ti mismo, asume tus desafíos, excava profundo dentro de ti mismo para vencer tus miedos. Nunca dejes que nadie te derribe. Tienes que seguir adelante.","Muchos de nosotros no estamos viviendo nuestros sueños porque estamos viviendo nuestros miedos","Los tiempos difíciles no crean héroes. Es durante los momentos difíciles en que se revela el héroe dentro de nosotros.","Si puedes sincornizarte con tu propósito, y realmente alinearte con él, estableciendo metas para que tu visión sea una expresión de ese propósito, entonces la vida fluye mucho más fácilmente","Lo que la mente pueda concebir y creer, lo puede lograr","No desees que sea fácil. Desea ser mejor.","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."],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."],authors:["Robert De Niro","Walt Disney","Confucius","Roy T. Bennett","Wayne Dyer","George Addair","Winston Churchill","Paulo Coelho","Brian Tracy","Chantal Sutherland","Les Brown","Bob Riley","Jack Canfield","Napoleon Hill","Jim Rohn","Serena Williams","Sheryl Sandberg","Reese Witherspoon","Hazrat Inayat Khan","Albert Einstein"]}}]); \ No newline at end of file diff --git a/src/assets/js/index.js b/src/assets/js/index.js index 034dc041..012cf882 100644 --- a/src/assets/js/index.js +++ b/src/assets/js/index.js @@ -18,14 +18,19 @@ const func = require('./modules/func.js'); +// init() gets executed only when the page is fully loaded const init = () => { - // init() gets executed only when the page is fully loaded - func.setDaytimeMsg(); - func.setRandBg(); - func.setRandQuote(); - func.setTime(); - // set interval to update time every second - setInterval(func.setTime, 1000); + try { + func.setDaytimeMsg(); + func.setRandBg(); + func.setRandQuote(); + func.setTime(); + // set interval to update time every second + setInterval(func.setTime, 1000); + // catch for settings menu + } catch (e) { + func.setSettingDisplay(); + } }; // initialize on page load through a listener @@ -33,4 +38,4 @@ document.addEventListener('DOMContentLoaded', init); // Disable right click const rightClick = () => { return false; }; -document.oncontextmenu=rightClick; +document.oncontextmenu=rightClick; \ No newline at end of file diff --git a/src/assets/scss/base.scss b/src/assets/scss/base.scss index 2995537f..f3583a6b 100644 --- a/src/assets/scss/base.scss +++ b/src/assets/scss/base.scss @@ -16,7 +16,7 @@ █████████████████████████████████████████████████████████████ */ -@import 'modules/bg'; -@import 'modules/misc'; -@import 'modules/quote'; -@import 'modules/time-greeting'; +@import 'modules/tab/bg'; +@import 'modules/tab/misc'; +@import 'modules/tab/quote'; +@import 'modules/tab/time-greeting'; \ No newline at end of file diff --git a/src/assets/scss/modules/settings/_buttons.scss b/src/assets/scss/modules/settings/_buttons.scss new file mode 100644 index 00000000..e69de29b diff --git a/src/assets/scss/modules/_bg.scss b/src/assets/scss/modules/tab/_bg.scss similarity index 100% rename from src/assets/scss/modules/_bg.scss rename to src/assets/scss/modules/tab/_bg.scss diff --git a/src/assets/scss/modules/_misc.scss b/src/assets/scss/modules/tab/_misc.scss similarity index 100% rename from src/assets/scss/modules/_misc.scss rename to src/assets/scss/modules/tab/_misc.scss diff --git a/src/assets/scss/modules/_quote.scss b/src/assets/scss/modules/tab/_quote.scss similarity index 100% rename from src/assets/scss/modules/_quote.scss rename to src/assets/scss/modules/tab/_quote.scss diff --git a/src/assets/scss/modules/_time-greeting.scss b/src/assets/scss/modules/tab/_time-greeting.scss similarity index 100% rename from src/assets/scss/modules/_time-greeting.scss rename to src/assets/scss/modules/tab/_time-greeting.scss diff --git a/src/manifest-firefox.json b/src/manifest-firefox.json index 00e1f886..d7a23ea6 100644 --- a/src/manifest-firefox.json +++ b/src/manifest-firefox.json @@ -1,7 +1,7 @@ { "manifest_version": 2, "name": "Mue", - "version": "0.1", + "version": "0.3", "browser_action": { "default_icon": "./assets/img/icon.png" }, diff --git a/src/manifest-opera.json b/src/manifest-opera.json index 809e6af0..983fca63 100644 --- a/src/manifest-opera.json +++ b/src/manifest-opera.json @@ -1,7 +1,7 @@ { "manifest_version": 2, "name": "Mue", - "version": "0.1", + "version": "0.3", "browser_action": { "default_icon": "./assets/img/icon.png" }, diff --git a/src/manifest-chrome.json b/src/manifest.json similarity index 65% rename from src/manifest-chrome.json rename to src/manifest.json index 4dd90039..d89fecb8 100644 --- a/src/manifest-chrome.json +++ b/src/manifest.json @@ -1,11 +1,15 @@ { "manifest_version": 2, "name": "Mue", - "version": "0.1", + "version": "0.3", "browser_action": { "default_icon": "./assets/img/icon.png" }, "chrome_url_overrides": { "newtab": "index.html" - } + }, + "offline_enabled": true, + "permissions": [ + "storage" + ] } \ No newline at end of file diff --git a/src/settings.html b/src/settings.html new file mode 100644 index 00000000..c30ac889 --- /dev/null +++ b/src/settings.html @@ -0,0 +1,39 @@ + + + + + + + + + + + Mue Settings + + + + + + + + + + + + \ No newline at end of file