Fix and update everything

This commit is contained in:
David Ralph
2019-03-20 18:08:02 +00:00
parent 162e5c5f18
commit cec13ad1bc
16 changed files with 82 additions and 89 deletions

1
.gitignore vendored
View File

@@ -1,3 +1,4 @@
node_modules/
yarn.lock
package-lock.json
yarn-error.log

View File

@@ -5,7 +5,7 @@
"license": "MIT",
"repository": "https://github.com/ohlookitsderpy/Mue",
"scripts": {
"sass-watch": "sass --watch src/assets/scss:src/assets/css --style compressed --sourcemap=none",
"sass-watch": "sass --watch src/assets/scss:src/assets/css --style compressed",
"js-watch": "webpack --progress --watch"
},
"devDependencies": {

View File

@@ -1 +1 @@
.mountain{background-image:url("../img/1.jpeg")}.sunrise{background-image:url("../img/2.jpeg")}.butterfly{background-image:url("../img/3.jpeg")}.leaves{background-image:url("../img/4.jpeg")}.river{background-image:url("../img/5.jpeg")}.sea{background-image:url("../img/6.jpeg")}.space{background-image:url("../img/7.jpeg")}.ice{background-image:url("../img/8.jpeg")}.waterfall{background-image:url("../img/9.jpeg")}.river{background-image:url("../img/10.jpeg")}.sunset{background-image:url("../img/11.jpeg")}.desert{background-image:url("../img/12.jpeg")}.canyon{background-image:url("../img/13.jpeg")}.rose{background-image:url("../img/14.jpeg")}.forest{background-image:url("../img/15.jpeg")}.cherry{background-image:url("../img/16.jpeg")}.clouds{background-image:url("../img/17.jpeg")}.winter{background-image:url("../img/18.jpeg")}.autumn{background-image:url("../img/19.jpeg")}.flowers{background-image:url("../img/20.jpeg")}.sunrise{background-image:url("../img/21.jpeg")}.rocks{background-image:url("../img/22.jpeg")}.trees{background-image:url("../img/23.jpeg")}.mountains{background-image:url("../img/24.jpeg")}.beach{background-image:url("../img/25.jpeg")}.quote{--shadow-shift: 0.125rem;width:37.5%;max-width:37.5rem;font-size:1.5rem;text-align:center}.quote blockquote{margin:0 0 .25rem 0;line-height:1.125}.quote blockquote ::before{content:"“";margin-right:.25ch}.quote blockquote ::after{content:"”";margin-left:.25ch}.quote cite{font-size:83.33%}.greeting{--shadow-shift: 0.2rem;font-size:3.25rem}time{--shadow-shift: 0.4rem;font-size:12rem}html,body{height:100%}body{display:flex;flex-direction:column;justify-content:space-around;align-items:center;margin:0;background-size:cover;background-position:50%;background-color:#000;font-family:"Roboto";color:#fff;overflow:hidden;-moz-user-select:none;user-select:none}@font-face{font-family:"Roboto";font-style:normal;font-weight:400;src:local("Roboto"),local("Roboto-Regular"),url("../font/roboto-v18-latin-regular.woff2") format("woff2")}:root{--shadow-color: #111111CC}.greeting,time,.quote{filter:drop-shadow(var(--shadow-shift) var(--shadow-shift) 0 var(--shadow-color))}/*# sourceMappingURL=base.css.map */
html,body{height:100%}body{display:flex;flex-direction:column;justify-content:space-around;align-items:center;margin:0;background-size:cover;background-position:50%;background-color:#000;font-family:"Roboto";color:#fff;overflow:hidden;-moz-user-select:none;user-select:none}@font-face{font-family:"Roboto";font-style:normal;font-weight:400;src:local("Roboto"),local("Roboto-Regular"),url("../font/roboto-v18-latin-regular.woff2") format("woff2")}:root{--shadow-color: #111111CC}.greeting,time,.quote{filter:drop-shadow(var(--shadow-shift) var(--shadow-shift) 0 var(--shadow-color))}.quote{--shadow-shift: 0.125rem;width:37.5%;max-width:37.5rem;font-size:1.5rem;text-align:center}.quote blockquote{margin:0 0 .25rem 0;line-height:1.125}.quote blockquote ::before{content:"“";margin-right:.25ch}.quote blockquote ::after{content:"”";margin-left:.25ch}.quote cite{font-size:83.33%}.mountain{background-image:url("../img/1.jpeg")}.sunrise{background-image:url("../img/2.jpeg")}.butterfly{background-image:url("../img/3.jpeg")}.leaves{background-image:url("../img/4.jpeg")}.river{background-image:url("../img/5.jpeg")}.sea{background-image:url("../img/6.jpeg")}.space{background-image:url("../img/7.jpeg")}.ice{background-image:url("../img/8.jpeg")}.waterfall{background-image:url("../img/9.jpeg")}.lake{background-image:url("../img/10.jpeg")}.sunset{background-image:url("../img/11.jpeg")}.desert{background-image:url("../img/12.jpeg")}.canyon{background-image:url("../img/13.jpeg")}.rose{background-image:url("../img/14.jpeg")}.forest{background-image:url("../img/15.jpeg")}.cherry{background-image:url("../img/16.jpeg")}.clouds{background-image:url("../img/17.jpeg")}.winter{background-image:url("../img/18.jpeg")}.autumn{background-image:url("../img/19.jpeg")}.flowers{background-image:url("../img/20.jpeg")}.sunrise{background-image:url("../img/21.jpeg")}.rocks{background-image:url("../img/22.jpeg")}.trees{background-image:url("../img/23.jpeg")}.mountains{background-image:url("../img/24.jpeg")}.beach{background-image:url("../img/25.jpeg")}.greeting{--shadow-shift: 0.2rem;font-size:3.25rem}time{--shadow-shift: 0.4rem;font-size:12rem}/*# sourceMappingURL=base.css.map */

View File

@@ -1 +1 @@
{"version":3,"sourceRoot":"","sources":["../scss/modules/_background.scss","../scss/modules/_quote.scss","../scss/modules/_time-greeting.scss","../scss/base.scss"],"names":[],"mappings":"CAkBA,gDACA,+CACA,iDACA,8CACA,6CACA,2CACA,6CACA,2CACA,iDACA,8CACA,+CACA,+CACA,+CACA,6CACA,+CACA,+CACA,+CACA,+CACA,+CACA,gDACA,gDACA,8CACA,8CACA,kDACA,8CCxBA,OACI,yBAEA,YACA,kBAEA,iBACA,kBAEA,kBACI,oBACA,kBAEA,2BACI,YACA,mBAGJ,0BACI,YACA,kBAIR,YACI,iBCvBR,UACC,uBACA,kBAKD,KACC,uBACA,gBCND,sBACA,KAEC,aACA,sBACA,6BACA,mBAEA,SAEA,sBACA,wBACA,sBAEA,qBACA,WAEA,gBAEG,sBACH,iBAID,WACC,qBACA,kBACA,gBACA,0GAKD,MACC,0BAGD,sBAGC","file":"base.css"}
{"version":3,"sourceRoot":"","sources":["../scss/modules/_misc.scss","../scss/modules/_quote.scss","../scss/modules/_background.scss","../scss/modules/_time-greeting.scss"],"names":[],"mappings":"CACA,sBACA,KAEC,aACA,sBACA,6BACA,mBAEA,SAEA,sBACA,wBACA,sBAEA,qBACA,WAEA,gBAEG,sBACH,iBAID,WACC,qBACA,kBACA,gBACA,0GAKD,MACC,0BAGD,sBAGC,kFCvBD,OACI,yBAEA,YACA,kBAEA,iBACA,kBAEA,kBACI,oBACA,kBAEA,2BACI,YACA,mBAGJ,0BACI,YACA,kBAIR,YACI,iBCzBR,gDACA,+CACA,iDACA,8CACA,6CACA,2CACA,6CACA,2CACA,iDACA,6CACA,+CACA,+CACA,+CACA,6CACA,+CACA,+CACA,+CACA,+CACA,+CACA,gDACA,gDACA,8CACA,8CACA,kDACA,8CCtBA,UACC,uBACA,kBAKD,KACC,uBACA","file":"base.css"}

View File

Before

Width:  |  Height:  |  Size: 324 KiB

After

Width:  |  Height:  |  Size: 324 KiB

View File

@@ -1,9 +1,9 @@
// Original code sourced from https://forums.opera.com/topic/25046/how-to-disable-completely-the-speed-dial/14
chrome.tabs.onCreated.addListener((tab) => {
if (tab.status === "complete" && tab.url === "chrome://startpage/") chrome.tabs.update(tab.id, { url: chrome.extension.getURL("index.html") });
if (tab.status === 'complete' && tab.url === 'chrome://startpage/') chrome.tabs.update(tab.id, { url: chrome.extension.getURL('index.html') });
});
chrome.tabs.onUpdated.addListener((tabId, changeInfo, tab) => {
if (changeInfo.status === "complete" && tab.url === "chrome://startpage/") chrome.tabs.update(tabId, { url: chrome.extension.getURL("index.html") });
if (changeInfo.status === 'complete' && tab.url === 'chrome://startpage/') chrome.tabs.update(tabId, { url: chrome.extension.getURL('index.html') });
});

File diff suppressed because one or more lines are too long

View File

@@ -25,7 +25,7 @@ const init = () => {
functions.setRandomQuote();
functions.setTime();
// set interval to update time every second
let timeInterval = setInterval(functions.setTime, 1000);
setInterval(functions.setTime, 1000);
};
// initialize on page load through a listener

View File

@@ -26,7 +26,7 @@ module.exports = [
'space',
'ice',
'waterfall',
'river',
'lake',
'sunset',
'desert',
'canyon',

View File

@@ -21,17 +21,11 @@ module.exports = {
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'
],
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'
],
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']
}

View File

@@ -17,10 +17,10 @@
*/
const util = require('./util.js');
const message = require('./message.js');
const quotes = require('./quote.js');
const background = require('./background.js');
const codes = require('./code.js');
const quotes = require('./quote.js');
const message = require('./message.js');
const background = require('./background.js');
let nal = navigator.language;
@@ -41,8 +41,7 @@ module.exports = class Function {
};
static setRandomBackground() {
let currentBackgroundClass = util.pickFromArray(background);
document.body.classList.add(currentBackgroundClass);
document.body.classList.add(util.pickFromArray(background));
};
static setRandomQuote() {

View File

@@ -30,7 +30,7 @@ module.exports = class Util {
// get random item
static getRandIndex(array) {
return Math.floor(Math.random() * (array.length - 1));
}
};
// pick random from array
static pickFromArray(array) {
@@ -40,9 +40,8 @@ module.exports = class Util {
static contains(needle) {
let findNaN = needle !== needle;
let indexOf;
if (!findNaN && typeof Array.prototype.indexOf === 'function') {
indexOf = Array.prototype.indexOf;
} else {
if (!findNaN && typeof Array.prototype.indexOf === 'function') indexOf = Array.prototype.indexOf;
else {
indexOf = (needle) => {
let i = -1,
index = -1;

View File

@@ -16,50 +16,7 @@
█████████████████████████████████████████████████████████████
*/
@import 'modules/background';
@import 'modules/misc';
@import 'modules/quote';
@import 'modules/background';
@import 'modules/time-greeting';
/* Body */
html, body { height: 100%; }
body {
display: flex;
flex-direction: column;
justify-content: space-around;
align-items: center;
margin: 0;
background-size: cover;
background-position: 50%;
background-color: black; /* Prevent white flash on page load */
font-family: 'Roboto';
color: white;
overflow: hidden;
-moz-user-select: none; /* Firefox */
user-select: none; /* Non-prefixed version, currently supported by Chrome and Opera */
}
/* Font */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
src: local('Roboto'), local('Roboto-Regular'),
url('../font/roboto-v18-latin-regular.woff2') format('woff2');
}
/* Shadow */
:root {
--shadow-color: #111111CC;
}
.greeting,
time,
.quote {
filter: drop-shadow(var(--shadow-shift) var(--shadow-shift) 0 var(--shadow-color));
}

View File

@@ -25,7 +25,7 @@
.space { background-image: url('../img/7.jpeg'); }
.ice { background-image: url('../img/8.jpeg'); }
.waterfall { background-image: url('../img/9.jpeg'); }
.river { background-image: url('../img/10.jpeg'); }
.lake { background-image: url('../img/10.jpeg'); }
.sunset { background-image: url('../img/11.jpeg'); }
.desert { background-image: url('../img/12.jpeg'); }
.canyon { background-image: url('../img/13.jpeg'); }

View File

@@ -0,0 +1,43 @@
/* Body */
html, body { height: 100%; }
body {
display: flex;
flex-direction: column;
justify-content: space-around;
align-items: center;
margin: 0;
background-size: cover;
background-position: 50%;
background-color: black; /* Prevent white flash on page load */
font-family: 'Roboto';
color: white;
overflow: hidden;
-moz-user-select: none; /* Firefox */
user-select: none; /* Non-prefixed version, currently supported by Chrome and Opera */
}
/* Font */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
src: local('Roboto'), local('Roboto-Regular'),
url('../font/roboto-v18-latin-regular.woff2') format('woff2');
}
/* Shadow */
:root {
--shadow-color: #111111CC;
}
.greeting,
time,
.quote {
filter: drop-shadow(var(--shadow-shift) var(--shadow-shift) 0 var(--shadow-color));
}

View File

@@ -19,34 +19,34 @@
<!DOCTYPE html>
<html>
<head>
<head>
<meta charset='utf-8'>
<meta name='viewport' content='width=device-width'>
<meta charset='utf-8'>
<meta name='viewport' content='width=device-width'>
<title>New Tab</title>
<title>New Tab</title>
<link href='./assets/css/base.css' rel='stylesheet'>
<link href='./assets/css/animate.css' rel='stylesheet'>
<link href='./assets/css/base.css' rel='stylesheet'>
<link href='./assets/css/animate.css' rel='stylesheet'>
</head>
</head>
<body>
<body>
<div class='greeting animated fadeInUp'></div>
<time class='animated fadeInUp'></time>
<div class='greeting animated fadeInUp'></div>
<div class='quote animated fadeInUp'>
<time class='animated fadeInUp'></time>
<blockquote></blockquote>
<div class='quote animated fadeInUp'>
<cite></cite>
<blockquote></blockquote>
</div>
<cite></cite>
</body>
</div>
<script src='./assets/js/base.js'></script>
</body>
</html>
<script src='./assets/js/base.js'></script>
</html>