59
.eslintrc
|
@ -1,59 +0,0 @@
|
|||
{
|
||||
"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,8 +0,0 @@
|
|||
# Directories
|
||||
.vscode/
|
||||
node_modules/
|
||||
|
||||
# Files
|
||||
yarn.lock
|
||||
yarn-error.log
|
||||
package-lock.json
|
28
README.md
|
@ -9,15 +9,18 @@
|
|||
|
||||
Fast, open and free-to-use new tab page for most modern browsers.
|
||||
|
||||
*This is the code for the extension. If you are looking for the website code, please look [here](https://github.com/TurboMarshmello/muetab.xyz).*
|
||||
*This is the code for the extension. If you are looking for the website code, please go [here](https://github.com/TurboMarshmello/muetab.xyz).*
|
||||
|
||||
## Features
|
||||
* Fast and free
|
||||
* Supports multiple browsers
|
||||
* Actively developed and opensource
|
||||
* Multiple language support
|
||||
* Settings feature - enable/disable features!
|
||||
* Search bar, update modal, copy button and more!
|
||||
* Automatically updating API (with no tracking!) with new photos and offline mode
|
||||
* ~~Multiple language support~~
|
||||
* ~~Settings feature - enable/disable features!~~
|
||||
* Search bar, ~~update modal, copy button and more!~~
|
||||
|
||||
* Mue has been recently rewritten with React and is missing the features that are crossed out *
|
||||
|
||||
## Installation
|
||||
### Chrome
|
||||
|
@ -49,10 +52,8 @@ Development/Other: Read the [Development](#development) section.
|
|||
download</b> and click <b>Download ZIP</b>)
|
||||
<li> Open a terminal and run these commands: (in the Mue directory)
|
||||
<li> <code>yarn</code> (or <code>npm install</code>)
|
||||
<li> <code>yarn run sass-watch</code> (or <code>npm run sass-watch</code>)
|
||||
<li> Open another terminal and run this command: (in the Mue directory)
|
||||
<li> <code>yarn run js-watch</code> (or <code>npm run js-watch</code>)
|
||||
<li> Start developing! (See the sections below for how to set it up with your browser)
|
||||
<li> <code>yarn start</code> (or <code>npm start</code>)
|
||||
<li> Start developing! (See the sections below for how to set up a developer copy of the extension.)
|
||||
</ol>
|
||||
<details>
|
||||
<summary><b>Chrome</b> (Click to expand)</summary>
|
||||
|
@ -98,15 +99,18 @@ Development/Other: Read the [Development](#development) section.
|
|||
<img src='assets/screenshot.jpg'>
|
||||
|
||||
## Credits
|
||||
### Maintainers
|
||||
[ohlookitsderpy](https://github.com/ohlookitsderpy)
|
||||
|
||||
[TurboMarshmello](https://github.com/TurboMarshmello) - Portions of original code, name idea, BIG HELP WITH THE SETTINGS, SEARCH BAR AND OTHER STUFF
|
||||
[TurboMarshmello](https://github.com/TurboMarshmello)
|
||||
|
||||
[Pexels](https://pexels.com) - Stock photos used
|
||||
### Other
|
||||
[TurboMarshmello](https://github.com/TurboMarshmello) - Portions of original code, name idea
|
||||
|
||||
[Pexels](https://pexels.com) - Stock photos used for offline mode
|
||||
|
||||
[Opera Forum](https://forums.opera.com/topic/25046/how-to-disable-completely-the-speed-dial/14) - Portions of code to add Opera support
|
||||
|
||||
[Animate.css](https://daneden.github.io/animate.css) - Portions of code used to add animations
|
||||
|
||||
### Translations
|
||||
[ohlookitsderpy](https://github.com/ohlookitsderpy) - English (Quotes and Messages)
|
||||
|
||||
|
|
Before Width: | Height: | Size: 362 KiB After Width: | Height: | Size: 276 KiB |
60
package.json
|
@ -1,17 +1,43 @@
|
|||
{
|
||||
"name": "mue",
|
||||
"description": "Fast, open and free-to-use new tab page for most modern browsers",
|
||||
"author": "ohlookitsderpy",
|
||||
"license": "MIT",
|
||||
"repository": "https://github.com/ohlookitsderpy/Mue",
|
||||
"scripts": {
|
||||
"sass-watch": "sass --watch src/assets/scss:src/assets/css --style compressed",
|
||||
"js-watch": "webpack --progress --watch"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "6.0.1",
|
||||
"sass": "1.22.5",
|
||||
"webpack": "4.35.3",
|
||||
"webpack-cli": "3.3.6"
|
||||
}
|
||||
}
|
||||
{
|
||||
"name": "mue",
|
||||
"author": "ohlookitsderpy",
|
||||
"description": "Fast, open and free-to-use new tab page for most modern browsers.",
|
||||
"license": "MIT",
|
||||
"version": "2.0.0",
|
||||
"dependencies": {
|
||||
"@material-ui/core": "^4.4.3",
|
||||
"@material-ui/icons": "^4.4.3",
|
||||
"react": "^16.10.1",
|
||||
"react-dom": "^16.10.1",
|
||||
"react-scripts": "3.1.2",
|
||||
"unfetch": "^4.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "^6.5.0",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"sass": "^1.22.12"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "react-scripts start",
|
||||
"build": "react-scripts build",
|
||||
"test": "react-scripts test",
|
||||
"eject": "react-scripts eject",
|
||||
"sass": "sass --watch src/scss:src/css --style compressed",
|
||||
"start-all": "npm-run-all -p start sass"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "react-app"
|
||||
},
|
||||
"browserslist": {
|
||||
"production": [
|
||||
">0.2%",
|
||||
"not dead",
|
||||
"not op_mini all"
|
||||
],
|
||||
"development": [
|
||||
"last 1 chrome version",
|
||||
"last 1 firefox version",
|
||||
"last 1 safari version"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 9.5 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
@ -0,0 +1,15 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='utf-8' />
|
||||
<meta name='viewport' content='width=device-width, initial-scale=1' />
|
||||
<link rel='apple-touch-icon' sizes='180x180' href='apple-touch-icon.png'>
|
||||
<link rel='icon' type='image/png' sizes='32x32' href='favicon-32x32.png'>
|
||||
<link rel='icon' type='image/png' sizes='16x16' href='favicon-16x16.png'>
|
||||
<title>New Tab</title>
|
||||
</head>
|
||||
<body>
|
||||
<noscript>You need to enable JavaScript to use Mue.</noscript>
|
||||
<div id='root'></div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"short_name": "Mue New Tab",
|
||||
"name": "Fast, open and free-to-use new tab page for most modern browsers.",
|
||||
"icons": [
|
||||
{
|
||||
"src": "favicon-32x32.png",
|
||||
"sizes": "96x96 64x64 32x32 24x24 16x16",
|
||||
"type": "image/x-icon"
|
||||
}
|
||||
],
|
||||
"start_url": ".",
|
||||
"display": "standalone",
|
||||
"theme_color": "#000000",
|
||||
"background_color": "#ffffff"
|
||||
}
|
After Width: | Height: | Size: 6.4 KiB |
Before Width: | Height: | Size: 128 KiB After Width: | Height: | Size: 128 KiB |
Before Width: | Height: | Size: 280 KiB After Width: | Height: | Size: 280 KiB |
Before Width: | Height: | Size: 200 KiB After Width: | Height: | Size: 200 KiB |
Before Width: | Height: | Size: 146 KiB After Width: | Height: | Size: 146 KiB |
Before Width: | Height: | Size: 230 KiB After Width: | Height: | Size: 230 KiB |
Before Width: | Height: | Size: 161 KiB After Width: | Height: | Size: 161 KiB |
Before Width: | Height: | Size: 135 KiB After Width: | Height: | Size: 135 KiB |
Before Width: | Height: | Size: 174 KiB After Width: | Height: | Size: 174 KiB |
Before Width: | Height: | Size: 55 KiB After Width: | Height: | Size: 55 KiB |
Before Width: | Height: | Size: 401 KiB After Width: | Height: | Size: 401 KiB |
Before Width: | Height: | Size: 737 KiB After Width: | Height: | Size: 737 KiB |
Before Width: | Height: | Size: 94 KiB After Width: | Height: | Size: 94 KiB |
Before Width: | Height: | Size: 92 KiB After Width: | Height: | Size: 92 KiB |
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 390 KiB After Width: | Height: | Size: 390 KiB |
Before Width: | Height: | Size: 225 KiB After Width: | Height: | Size: 225 KiB |
Before Width: | Height: | Size: 251 KiB After Width: | Height: | Size: 251 KiB |
Before Width: | Height: | Size: 300 KiB After Width: | Height: | Size: 300 KiB |
Before Width: | Height: | Size: 148 KiB After Width: | Height: | Size: 148 KiB |
Before Width: | Height: | Size: 290 KiB After Width: | Height: | Size: 290 KiB |
Before Width: | Height: | Size: 324 KiB After Width: | Height: | Size: 324 KiB |
Before Width: | Height: | Size: 264 KiB After Width: | Height: | Size: 264 KiB |
Before Width: | Height: | Size: 495 KiB After Width: | Height: | Size: 495 KiB |
Before Width: | Height: | Size: 322 KiB After Width: | Height: | Size: 322 KiB |
Before Width: | Height: | Size: 472 KiB After Width: | Height: | Size: 472 KiB |
|
@ -0,0 +1,66 @@
|
|||
//* Imports
|
||||
import React from 'react';
|
||||
import Fetch from 'unfetch';
|
||||
import Clock from './modules/Clock';
|
||||
import Greeting from './modules/Greeting';
|
||||
import Quote from './modules/Quote';
|
||||
import Search from './modules/Search';
|
||||
import Credit from './modules/Credit';
|
||||
import './css/index.css';
|
||||
|
||||
//* Functions
|
||||
const getCookie = (cookiename) => {
|
||||
const cookiestring = RegExp('' + cookiename + '[^;]+').exec(document.cookie);
|
||||
return unescape(!!cookiestring ? cookiestring.toString().replace(/^[^=]+./,'') : '');
|
||||
};
|
||||
|
||||
const randomInt = (min, max) => { return Math.floor(Math.random() * (max - min + 1)) + min; };
|
||||
|
||||
//* App
|
||||
export default class App extends React.Component {
|
||||
// Render all the modules
|
||||
render() {
|
||||
return (
|
||||
<React.Fragment>
|
||||
<Search/>
|
||||
<div id='center'>
|
||||
<Greeting/>
|
||||
<Clock/>
|
||||
<Quote/>
|
||||
<Credit/>
|
||||
</div>
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
|
||||
// Set background: Attempt to get one from the API first, and if that fails then use the offline ones.
|
||||
async getAndSetBackground() {
|
||||
const root = document.getElementById('root');
|
||||
|
||||
try {
|
||||
let data = await Fetch('https://api.muetab.xyz/getImage?category=Outdoors');
|
||||
data = await data.json();
|
||||
|
||||
const checkRepeat = getCookie('backgroundimageurl');
|
||||
document.getElementById('photographer').innerText = `Photo by ${data.photographer}`;
|
||||
document.getElementById('location').innerText = `${data.location}`;
|
||||
|
||||
if (checkRepeat !== root.style.backgroundImage) root.style.backgroundImage = `url(${data.file})`;
|
||||
else {
|
||||
/*let data = await Fetch('https://api.muetab.xyz/getImage?category=Outdoors');
|
||||
data = await data.json();*/
|
||||
document.cookie = 'backgroundimageurl; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;';
|
||||
root.style.backgroundImage = `url(${data.file})`;
|
||||
document.cookie = `backgroundimageurl=${data.file}`;
|
||||
}
|
||||
} catch (e) {
|
||||
document.getElementById('backgroundCredits').style.display = 'none';
|
||||
document.getElementById('photographer').innerText = 'Photo from Pexels';
|
||||
root.style.backgroundImage = `url(../offline-images/${randomInt(1, 25)}.jpeg)`;
|
||||
}
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.getAndSetBackground();
|
||||
}
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
/*!
|
||||
* animate.css -http://daneden.me/animate
|
||||
* Version - 3.7.0
|
||||
* Licensed under the MIT license - http://opensource.org/licenses/MIT
|
||||
*
|
||||
* Copyright (c) 2018 Daniel Eden
|
||||
* Modified by ohlookitsderpy
|
||||
*/
|
||||
@-webkit-keyframes animate{from{opacity:0;-webkit-transform:translate3d(0, 100%, 0);transform:translate3d(0, 100%, 0)}to{opacity:1;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}}@keyframes animate{from{opacity:0;-webkit-transform:translate3d(0, 100%, 0);transform:translate3d(0, 100%, 0)}to{opacity:1;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}}.animate{-webkit-animation-name:amimated;animation-name:animate;-webkit-animation-duration:0.75s;animation-duration:0.75s;-webkit-animation-fill-mode:both;animation-fill-mode:both}
|
|
@ -1 +0,0 @@
|
|||
{"version":3,"sourceRoot":"","sources":["../scss/modules/_bg.scss","../scss/modules/_font.scss","../scss/modules/_misc.scss","../scss/modules/_quote.scss","../scss/modules/_search.scss","../scss/modules/_buttons.scss","../scss/modules/_settings-modal.scss","../scss/modules/_time-greeting.scss"],"names":[],"mappings":"CAkBA,gDACA,+CACA,iDACA,8CACA,6CACA,2CACA,6CACA,2CACA,iDACA,6CACA,+CACA,+CACA,+CACA,6CACA,+CACA,+CACA,+CACA,+CACA,+CACA,gDACA,gDACA,8CACA,8CACA,kDACA,8CCvBA,WACI,6BACA,kBACA,gBACA,+DAGJ,gBACI,6BACA,mBACA,kBACA,eACA,cACA,sBACA,oBACA,qBACA,mBACA,iBACA,cACA,kCACA,6BACA,kCAGJ,WACI,wBACA,8HAEA,kEAGJ,iBACI,eACA,eACA,WCpDJ,sBACA,KAEC,aACA,sBACA,6BACA,mBAEA,SAEA,sBACA,wBACA,sBAEA,wBACA,WAEA,gBAEG,sBACH,iBAID,MACC,0BAGD,sBAGC,kBACA,kFAID,YACI,mBACA,WCrBJ,OACI,iBAEA,yBAEA,YACA,kBAEA,iBACA,kBAEA,kBACI,oBACA,kBAEA,2BACI,YACA,mBAGJ,0BACI,YACA,kBAIR,YACI,iBC3BR,YACI,kBACA,UACA,SACA,aACA,mBACA,mBACI,cACA,YACA,eACA,gBACA,uBAIA,eAHA,oCACI,oCAIR,6BACI,aACA,eACA,WACA,WACA,WACA,iBACA,gBACA,mBACA,eAIR,kBACI,YACA,YACA,mCAGJ,eACI,aACA,mBCxDJ,4BAEI,uBACA,YACA,WACA,kBACA,kBACA,qBACA,eACA,eACA,kBACA,mBAGJ,SACI,kBACA,WACA,SACA,0BACI,oCACA,cAIR,YACI,kBACA,WACA,QAGJ,kBACI,uBACA,YACA,WACA,kBACA,kBACA,qBACA,eACA,eACA,kBACA,mBCxCJ,gBACI,uBACA,YACA,WACA,kBACA,kBACA,qBACA,eACA,eACA,kBACA,mBAGJ,SACI,kBACA,WACA,SAGJ,iBACI,eACA,eACA,WAGJ,SACI,gBACA,SACA,iBAGJ,OACI,aAIJ,QACI,kBACA,qBACA,WACA,YAEA,cACI,UACA,QACA,SAIR,QACI,kBACA,eACA,MACA,OACA,QACA,SACA,sBACA,uBACA,eAEA,gBACI,kBACA,WACA,YACA,WACA,SACA,WACA,sBACA,uBACA,eAIR,sBACI,yBAGJ,oBACI,2BAGJ,6BACI,mCACA,+BACA,2BAGJ,QACI,kBACA,eACA,MACA,OACA,QACA,SACA,sBACA,uBACA,eACA,mBAGF,eACE,kBACA,WACA,YACA,WACA,SACA,WACA,sBACA,uBACA,eACA,kBAGJ,OACI,WAGJ,YACI,eACA,wBACA,YACA,YACA,kBACA,mBACA,aACA,YAEA,mCACI,wBACA,gBACA,WACA,YACA,kBACA,mBACA,eAGJ,+BACI,WACA,YACA,kBACA,mBACA,eAIR,UACI,kBACA,cACA,YACA,aACA,YACA,mBAGJ,sBAEI,eAGJ,aACI,YAGJ,SACI,gBACA,SACA,iBAGJ,OACI,aAGJ,eACI,iBAGJ,IACI,eACA,gBChKJ,UACC,oCACA,kBACG,oBACA,iBACA,mBAKJ,KACC,oCACA,gBACA,iBAGD,2CACK,wBACE,sBACC,qBACI","file":"base.css"}
|
|
@ -1,115 +0,0 @@
|
|||
|
||||
|
||||
a {
|
||||
color: #ffffff;
|
||||
}
|
||||
.modal {
|
||||
display: none; /* Hidden by default */
|
||||
position: fixed; /* Stay in place */
|
||||
z-index: 1; /* Sit on top */
|
||||
padding-top: 100px; /* Location of the box */
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%; /* Full width */
|
||||
height: 100%; /* Full height */
|
||||
overflow: auto; /* Enable scroll if needed */
|
||||
background-color: rgb(0,0,0); /* Fallback color */
|
||||
background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
|
||||
}
|
||||
|
||||
h1, h2, h3, p {
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.modal-content {
|
||||
background-color: #2d3436;
|
||||
margin: auto;
|
||||
padding: 30px;
|
||||
width: 450px;
|
||||
max-height: 800px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.title, .close, .settingsTitle, .close2 {
|
||||
display: inline;
|
||||
}
|
||||
.title {
|
||||
color: #ffffff;
|
||||
float: left;
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.settingsTitle {
|
||||
color: #ffffff;
|
||||
float: left;
|
||||
font-size: 30px;
|
||||
font-weight: bold;
|
||||
}
|
||||
p.subtitle {
|
||||
color: #ffffff;
|
||||
float: left;
|
||||
font-size: 10px;
|
||||
font-weight: bold;
|
||||
margin-top: 10px;
|
||||
}
|
||||
.close {
|
||||
color: #ffffff;
|
||||
float: right;
|
||||
font-size: 30px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
label.switch, p.switch {
|
||||
display: inline;
|
||||
}
|
||||
label.switch {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.close:hover,
|
||||
.close:focus {
|
||||
color: #bdc3c7;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.close2 {
|
||||
color: #ffffff;
|
||||
float: right;
|
||||
font-size: 30px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.close2:hover,
|
||||
.close2:focus {
|
||||
color: #bdc3c7;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar {
|
||||
width: 5px;
|
||||
}
|
||||
|
||||
/* Track */
|
||||
::-webkit-scrollbar-track {
|
||||
background: #2d3436;
|
||||
}
|
||||
|
||||
/* Handle */
|
||||
::-webkit-scrollbar-thumb {
|
||||
background: #34495e;
|
||||
}
|
||||
|
||||
/* Handle on hover */
|
||||
::-webkit-scrollbar-thumb:hover {
|
||||
background: #2c3e50;
|
||||
}
|
||||
|
||||
.drop-btn {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.dropdown {
|
||||
background: #2d3436;
|
||||
color: #fff;
|
||||
}
|
|
@ -1,108 +0,0 @@
|
|||
|
||||
.modal {
|
||||
display: none; /* Hidden by default */
|
||||
position: fixed; /* Stay in place */
|
||||
z-index: 1; /* Sit on top */
|
||||
padding-top: 100px; /* Location of the box */
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%; /* Full width */
|
||||
height: 100%; /* Full height */
|
||||
overflow: auto; /* Enable scroll if needed */
|
||||
background-color: rgb(0,0,0); /* Fallback color */
|
||||
background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
|
||||
}
|
||||
|
||||
h1, h2, h3, p {
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.modal-content {
|
||||
background-color: #ecf0f1;
|
||||
margin: auto;
|
||||
padding: 30px;
|
||||
width: 450px;
|
||||
max-height: 800px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.title, .close {
|
||||
display: inline;
|
||||
}
|
||||
.settingsTitle, .close2 {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.title {
|
||||
color: #000000;
|
||||
float: left;
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.settingsTitle {
|
||||
color: #000000;
|
||||
float: left;
|
||||
font-size: 30px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
p.subtitle {
|
||||
color: #000000;
|
||||
float: left;
|
||||
font-size: 10px;
|
||||
font-weight: bold;
|
||||
margin-top: 10px;
|
||||
}
|
||||
.close {
|
||||
color: #aaaaaa;
|
||||
float: right;
|
||||
font-size: 30px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.close:hover,
|
||||
.close:focus {
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.close2 {
|
||||
color: #aaaaaa;
|
||||
float: right;
|
||||
font-size: 30px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.title {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.close2:hover,
|
||||
.close2:focus {
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
::-webkit-scrollbar {
|
||||
width: 5px;
|
||||
}
|
||||
|
||||
/* Track */
|
||||
::-webkit-scrollbar-track {
|
||||
background: #f1f1f1;
|
||||
}
|
||||
|
||||
/* Handle */
|
||||
::-webkit-scrollbar-thumb {
|
||||
background: #888;
|
||||
}
|
||||
|
||||
/* Handle on hover */
|
||||
::-webkit-scrollbar-thumb:hover {
|
||||
background: #555;
|
||||
}
|
||||
|
||||
.drop-btn {
|
||||
color: #555;
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
a{color:#fff}.modal{display:none;position:fixed;z-index:1;padding-top:100px;left:0;top:0;width:100%;height:100%;overflow:auto;background-color:#000;background-color:rgba(0,0,0,.4)}img{max-width:100%;margin-top:20px}h1,h2,h3,p{color:#fff}.modal-content{background-color:#2d3436;margin:auto;padding:30px;width:450px;max-height:600px;overflow-y:auto}.title,.close,.settingsTitle,.close2{display:inline}.title{color:#fff;float:left;font-size:20px;font-weight:bold}.settingsTitle{color:#fff;float:left;font-size:30px;font-weight:bold}p.subtitle{color:#fff;float:left;font-size:10px;font-weight:bold;margin-top:10px}.close{color:#fff;float:right;font-size:30px;font-weight:bold}.title{float:left}label.switch,p.switch{display:inline}label.switch{float:right}.close:hover,.close:focus{color:#bdc3c7;text-decoration:none;cursor:pointer}.close2{color:#fff;float:right;font-size:30px;font-weight:bold}.close2:hover,.close2:focus{color:#bdc3c7;text-decoration:none;cursor:pointer}::-webkit-scrollbar{width:5px}::-webkit-scrollbar-track{background:#2d3436}::-webkit-scrollbar-thumb{background:#34495e}::-webkit-scrollbar-thumb:hover{background:#2c3e50}/*# sourceMappingURL=dark.css.map */
|
|
@ -1 +0,0 @@
|
|||
{"version":3,"sourceRoot":"","sources":["../../scss/themes/dark.scss"],"names":[],"mappings":"AAAA,EACI,WAGJ,OACI,aACA,eACA,UACA,kBACA,OACA,MACA,WACA,YACA,cACA,sBACA,gCAGJ,IACI,eACA,gBAGJ,WAII,WAGJ,eACI,yBACA,YACA,aACA,YACA,iBACA,gBAGJ,qCAII,eAGJ,OACI,WACA,WACA,eACA,iBAGJ,eACI,WACA,WACA,eACA,iBAGJ,WACI,WACA,WACA,eACA,iBACA,gBAGJ,OACI,WACA,YACA,eACA,iBAGJ,OACI,WAGJ,sBAEI,eAGJ,aACI,YAGJ,0BAEI,cACA,qBACA,eAGJ,QACI,WACA,YACA,eACA,iBAGJ,4BAEI,cACA,qBACA,eAGJ,oBACI,UAGJ,0BACI,mBAGJ,0BACI,mBAGJ,gCACI","file":"dark.css"}
|
|
@ -1 +0,0 @@
|
|||
body{font-family:"Noto Sans HK",sans-serif;background:#fff;font-size:20px}.modal{display:none;position:fixed;z-index:1;padding-top:100px;left:0;top:0;width:100%;height:100%;overflow:auto;background-color:#000;background-color:rgba(0,0,0,.4);font-family:"Noto Sans HK",sans-serif}img{max-width:100%;margin-top:20px}h1,h2,h3,p{color:#000}.modal-content{background-color:#ecf0f1;margin:auto;padding:30px;width:450px;max-height:600px;overflow-y:auto}.title,.close{display:inline}.settingsTitle,.close2{display:inline}.title{color:#000;float:left;font-size:20px;font-weight:bold}.settingsTitle{color:#000;float:left;font-size:30px;font-weight:bold}label.switch,p.switch{display:inline}label.switch{float:right}p.subtitle{color:#000;float:left;font-size:10px;font-weight:bold;margin-top:10px}.close{color:#aaa;float:right;font-size:30px;font-weight:bold}.title{float:left}.close:hover,.close:focus{color:#000;text-decoration:none;cursor:pointer}.close2{color:#aaa;float:right;font-size:30px;font-weight:bold}.title{float:left}.close2:hover,.close2:focus{color:#000;text-decoration:none;cursor:pointer}::-webkit-scrollbar{width:5px}::-webkit-scrollbar-track{background:#f1f1f1}::-webkit-scrollbar-thumb{background:#888}::-webkit-scrollbar-thumb:hover{background:#555}.switch{position:relative;display:inline-block;width:60px;height:34px}.switch input{opacity:0;width:0;height:0}.slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;-webkit-transition:.4s;transition:.4s}.slider:before{position:absolute;content:"";height:26px;width:26px;left:4px;bottom:4px;background-color:#fff;-webkit-transition:.4s;transition:.4s}input:checked+.slider{background-color:#2196f3}input:focus+.slider{box-shadow:0 0 1px #2196f3}input:checked+.slider:before{-webkit-transform:translateX(26px);-ms-transform:translateX(26px);transform:translateX(26px)}.slider.round{border-radius:34px}.slider.round:before{border-radius:50%}/*# sourceMappingURL=light.css.map */
|
|
@ -1 +0,0 @@
|
|||
{"version":3,"sourceRoot":"","sources":["../../scss/themes/light.scss"],"names":[],"mappings":"AAAA,KACI,sCACA,gBACA,eAEJ,OACI,aACA,eACA,UACA,kBACA,OACA,MACA,WACA,YACA,cACA,sBACA,gCACA,sCAEJ,IACI,eACA,gBAGJ,WACI,WAGJ,eACI,yBACA,YACA,aACA,YACA,iBACA,gBAGJ,cACE,eAEF,uBACE,eAGF,OACI,WACA,WACA,eACA,iBAGJ,eACE,WACA,WACA,eACA,iBAGF,sBACE,eAEF,aACE,YAGF,WACI,WACA,WACA,eACA,iBACA,gBAEJ,OACI,WACA,YACA,eACA,iBAEJ,OACI,WAGJ,0BAEI,WACA,qBACA,eAGJ,QACE,WACA,YACA,eACA,iBAEF,OACE,WAGF,4BAEE,WACA,qBACA,eAEF,oBACI,UAIJ,0BACI,mBAIJ,0BACI,gBAIJ,gCACI,gBAEJ,QACI,kBACA,qBACA,WACA,YAGF,cACE,UACA,QACA,SAGF,QACE,kBACA,eACA,MACA,OACA,QACA,SACA,sBACA,uBACA,eAGF,eACE,kBACA,WACA,YACA,WACA,SACA,WACA,sBACA,uBACA,eAGF,sBACE,yBAGF,oBACE,2BAGF,6BACE,mCACA,+BACA,2BAIF,cACE,mBAGF,qBACE","file":"light.css"}
|
|
@ -1,438 +0,0 @@
|
|||
.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")
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Material Icons";
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: url("../font/MaterialIcons-Regular.woff2") format("woff2")
|
||||
}
|
||||
|
||||
.material-icons {
|
||||
font-family: "Material Icons";
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
font-size: 24px;
|
||||
line-height: 1;
|
||||
letter-spacing: normal;
|
||||
text-transform: none;
|
||||
display: inline-block;
|
||||
white-space: nowrap;
|
||||
word-wrap: normal;
|
||||
direction: ltr;
|
||||
-moz-font-feature-settings: "liga";
|
||||
font-feature-settings: "liga";
|
||||
-moz-osx-font-smoothing: grayscale
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Open Sans";
|
||||
src: url("../font/opensans-regular-webfont.woff2") format("woff2"),
|
||||
url("../font/opensans-regular-webfont.woff") format("woff");
|
||||
src: url("../font/roboto-v18-latin-regular.woff2") format("woff2"),
|
||||
}
|
||||
|
||||
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: "Open Sans";
|
||||
color: #fff;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
:root {
|
||||
--shadow-color: #111111CC
|
||||
}
|
||||
#withSeconds, #withoutSeconds, #greetingText {
|
||||
-webkit-touch-callout: none; /* iOS Safari */
|
||||
-webkit-user-select: none; /* Safari */
|
||||
-khtml-user-select: none; /* Konqueror HTML */
|
||||
-moz-user-select: none; /* Firefox */
|
||||
-ms-user-select: none; /* Internet Explorer/Edge */
|
||||
user-select: none; /* Non-prefixed version, currently
|
||||
supported by Chrome and Opera */
|
||||
}
|
||||
.greeting,
|
||||
time,
|
||||
.quote {
|
||||
position: absolute;
|
||||
filter: drop-shadow(var(--shadow-shift) var(--shadow-shift) 0 var(--shadow-color))
|
||||
}
|
||||
|
||||
.quote {
|
||||
padding-top: 15em;
|
||||
--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%
|
||||
}
|
||||
|
||||
button.settings,
|
||||
button.news {
|
||||
background: transparent;
|
||||
border: none;
|
||||
color: #fff;
|
||||
padding: 20px 20px;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
font-size: 20px;
|
||||
cursor: pointer;
|
||||
border-radius: 5px;
|
||||
display: table-cell
|
||||
}
|
||||
|
||||
.buttons {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
top: 10px
|
||||
}
|
||||
|
||||
button.news {
|
||||
position: absolute;
|
||||
right: 60px;
|
||||
top: 0px;
|
||||
}
|
||||
|
||||
.search-bar {
|
||||
position: absolute;
|
||||
left: 20px;
|
||||
top: 20px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
i.material-icons {
|
||||
font-size: 30px;
|
||||
display: inline;
|
||||
color: #fff
|
||||
}
|
||||
|
||||
li.items {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding-top: 30px
|
||||
}
|
||||
|
||||
.modal {
|
||||
display: none
|
||||
}
|
||||
|
||||
.modal-content {
|
||||
max-height: 500px;
|
||||
}
|
||||
|
||||
.greeting {
|
||||
text-shadow: 0 0 25px rgba(0,0,0,0.3);
|
||||
font-size: 3.25rem;
|
||||
padding-bottom: 10em;
|
||||
font-weight: bold;
|
||||
letter-spacing: 2px;
|
||||
}
|
||||
|
||||
time {
|
||||
font-size: 12rem;
|
||||
font-weight: bold;
|
||||
text-shadow: 0 0 25px rgba(0,0,0,0.3);
|
||||
}
|
||||
|
||||
.search-bar input[type=text] {
|
||||
padding: 10px;
|
||||
font-size: 15px;
|
||||
border: 5px;
|
||||
opacity: 0.5;
|
||||
color: #fff;
|
||||
font-weight: bold;
|
||||
margin-left: 5px;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
|
||||
.search-bar button {
|
||||
font-size: 1px;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
background: none;
|
||||
--shadow-shift: 0.4rem;
|
||||
|
||||
}
|
||||
|
||||
.search-bar button i.material-icons {
|
||||
text-shadow: 0 0 25px rgba(0,0,0,0.3);
|
||||
}
|
||||
|
||||
.buttons i.material-icons {
|
||||
text-shadow: 0 0 20px rgba(0,0,0,0.3);
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
.search-bar input[type=text], .search-bar button {
|
||||
display: inline
|
||||
}
|
||||
|
||||
.input.searchText {
|
||||
flex-grow:2;
|
||||
border:none;
|
||||
box-shadow: 0 0 20px rgba(0,0,0,0.3);
|
||||
}
|
||||
|
||||
.searchbarform {
|
||||
display:flex;
|
||||
flex-direction:row;
|
||||
}
|
||||
|
||||
.dropdown {
|
||||
position: relative;
|
||||
display: block;
|
||||
float: right;
|
||||
padding: 10px;
|
||||
border: none;
|
||||
background: #ecf0f1;
|
||||
}
|
||||
label.switch, p.switch {
|
||||
display: inline;
|
||||
}
|
||||
label.switch {
|
||||
float: right;
|
||||
}
|
||||
|
||||
img {
|
||||
max-width: 100%;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.title {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.switch {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 60px;
|
||||
height: 34px;
|
||||
}
|
||||
|
||||
.switch input {
|
||||
opacity: 0;
|
||||
width: 0;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
.slider {
|
||||
position: absolute;
|
||||
cursor: pointer;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background-color: #ccc;
|
||||
-webkit-transition: .4s;
|
||||
transition: .4s;
|
||||
}
|
||||
|
||||
.slider:before {
|
||||
position: absolute;
|
||||
content: "";
|
||||
height: 26px;
|
||||
width: 26px;
|
||||
left: 4px;
|
||||
bottom: 4px;
|
||||
background-color: white;
|
||||
-webkit-transition: .4s;
|
||||
transition: .4s;
|
||||
}
|
||||
input:checked + .slider {
|
||||
background-color: #FF4F4E;
|
||||
}
|
||||
|
||||
input:focus + .slider {
|
||||
box-shadow: 0 0 1px #FF4F4E;
|
||||
}
|
||||
|
||||
input:checked + .slider:before {
|
||||
-webkit-transform: translateX(26px);
|
||||
-ms-transform: translateX(26px);
|
||||
transform: translateX(26px);
|
||||
}
|
||||
|
||||
/* Rounded sliders */
|
||||
.slider.round {
|
||||
border-radius: 34px;
|
||||
}
|
||||
|
||||
.slider.round:before {
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.blurslider {
|
||||
margin-top: 7px;
|
||||
-webkit-appearance: none;
|
||||
width: 200px;
|
||||
height: 15px;
|
||||
border-radius: 5px;
|
||||
background: #d3d3d3;
|
||||
outline: none;
|
||||
float: right;
|
||||
}
|
||||
|
||||
|
||||
.blurslider::-webkit-slider-thumb {
|
||||
-webkit-appearance: none;
|
||||
appearance: none;
|
||||
width: 25px;
|
||||
height: 25px;
|
||||
border-radius: 50%;
|
||||
background: #FF4F4E;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.blurslider::-moz-range-thumb {
|
||||
width: 25px;
|
||||
height: 25px;
|
||||
border-radius: 50%;
|
||||
background: #FF4F4E;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
::selection {
|
||||
background: #FF4F4E;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #FF4F4E;
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
/*# sourceMappingURL=base.css.map */
|
Before Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 746 KiB |
Before Width: | Height: | Size: 33 KiB |
|
@ -1,9 +0,0 @@
|
|||
// 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') });
|
||||
});
|
||||
|
||||
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') });
|
||||
});
|
|
@ -1,88 +0,0 @@
|
|||
/*
|
||||
█████████████████████████████████████████████████████████████
|
||||
██ ██
|
||||
██ ███ ███ ██ ██ ███████ ██
|
||||
██ ████ ████ ██ ██ ██ ██
|
||||
██ ██ ████ ██ ██ ██ █████ ██
|
||||
██ ██ ██ ██ ██ ██ ██ ██
|
||||
██ ██ ██ ██████ ███████ ██
|
||||
██ ██
|
||||
██ ██
|
||||
██ Copyright 2018-2019 David Ralph (ohlookitsderpy) ██
|
||||
██ Licensed under MIT ██
|
||||
██ GitHub: https://github.com/ohlookitsderpy/Mue ██
|
||||
██ ██
|
||||
██ Special thanks to contributors! <3 ██
|
||||
█████████████████████████████████████████████████████████████
|
||||
*/
|
||||
|
||||
const func = require('./modules/func.js');
|
||||
const settings = require('./modules/settings.js');
|
||||
|
||||
const init = () => {
|
||||
// init() gets executed only when the page is fully loaded
|
||||
func.setDaytimeMsg();
|
||||
func.setRandBg();
|
||||
func.setRandQuote();
|
||||
func.setTime();
|
||||
func.setWithoutSeconds();
|
||||
|
||||
if (!localStorage.getItem('seconds') === 'on') return setInterval(func.setWithoutSeconds, 60000);
|
||||
else return setInterval(func.setTime, 1000);
|
||||
};
|
||||
|
||||
// initialize on page load through a listener
|
||||
document.addEventListener('DOMContentLoaded', init);
|
||||
|
||||
// Disable right click
|
||||
document.oncontextmenu = () => { return false; };
|
||||
|
||||
// Update modal
|
||||
const modal = document.getElementById('updateModal');
|
||||
const btn = document.getElementById('openUpdateModal');
|
||||
const span = document.getElementsByClassName('close')[0];
|
||||
btn.onclick = () => { modal.style.display = 'block'; };
|
||||
span.onclick = () => { modal.style.display = 'none'; };
|
||||
window.onclick = (event) => { if (event.target === modal) modal.style.display = 'none'; };
|
||||
|
||||
// Copy quote text
|
||||
/*const copybtn = document.getElementById('copybtn');
|
||||
copybtn.onclick = () => {
|
||||
const quote = document.getElementById('quote');
|
||||
quote.select();
|
||||
document.execCommand('copy');
|
||||
};*/
|
||||
|
||||
function copyQuote() {
|
||||
const quote = document.createRange();
|
||||
quote.selectNode(document.getElementById('quoteText'));
|
||||
window.getSelection().removeAllRanges();
|
||||
window.getSelection().addRange(quote);
|
||||
document.execCommand("copy");
|
||||
window.getSelection().removeAllRanges();
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Search bar
|
||||
const search = () => {
|
||||
const services = {
|
||||
duckduckgo: 'https://duckduckgo.com/?q=',
|
||||
google: 'https://google.com/search?q=',
|
||||
bing: 'https://bing.com/search?q=',
|
||||
yahoo: 'https://search.yahoo.com/search?p=',
|
||||
ask: 'https://ask.com/web?q=',
|
||||
ecosia: 'https://ecosia.org/search?q='
|
||||
}
|
||||
const searchvalue = document.getElementById('searchText').value;
|
||||
windows.open(services[localStorage.getItem('engine')] + searchvalue, '_self');
|
||||
return false;
|
||||
}
|
||||
|
||||
var slider = document.getElementById("slider");
|
||||
var output = document.getElementById("blurValue");
|
||||
output.innerHTML = slider.value;
|
||||
|
||||
slider.oninput = function() {
|
||||
output.innerHTML = this.value;
|
||||
};
|
|
@ -1,45 +0,0 @@
|
|||
/*
|
||||
█████████████████████████████████████████████████████████████
|
||||
██ ██
|
||||
██ ███ ███ ██ ██ ███████ ██
|
||||
██ ████ ████ ██ ██ ██ ██
|
||||
██ ██ ████ ██ ██ ██ █████ ██
|
||||
██ ██ ██ ██ ██ ██ ██ ██
|
||||
██ ██ ██ ██████ ███████ ██
|
||||
██ ██
|
||||
██ ██
|
||||
██ Copyright 2018-2019 David Ralph (ohlookitsderpy) ██
|
||||
██ Licensed under MIT ██
|
||||
██ GitHub: https://github.com/ohlookitsderpy/Mue ██
|
||||
██ ██
|
||||
██ Special thanks to contributors! <3 ██
|
||||
█████████████████████████████████████████████████████████████
|
||||
*/
|
||||
|
||||
module.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'
|
||||
];
|
|
@ -1,31 +0,0 @@
|
|||
/*
|
||||
█████████████████████████████████████████████████████████████
|
||||
██ ██
|
||||
██ ███ ███ ██ ██ ███████ ██
|
||||
██ ████ ████ ██ ██ ██ ██
|
||||
██ ██ ████ ██ ██ ██ █████ ██
|
||||
██ ██ ██ ██ ██ ██ ██ ██
|
||||
██ ██ ██ ██████ ███████ ██
|
||||
██ ██
|
||||
██ ██
|
||||
██ Copyright 2018-2019 David Ralph (ohlookitsderpy) ██
|
||||
██ Licensed under MIT ██
|
||||
██ GitHub: https://github.com/ohlookitsderpy/Mue ██
|
||||
██ ██
|
||||
██ Special thanks to contributors! <3 ██
|
||||
█████████████████████████████████████████████████████████████
|
||||
*/
|
||||
|
||||
module.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']
|
||||
};
|
|
@ -1,92 +0,0 @@
|
|||
/*
|
||||
█████████████████████████████████████████████████████████████
|
||||
██ ██
|
||||
██ ███ ███ ██ ██ ███████ ██
|
||||
██ ████ ████ ██ ██ ██ ██
|
||||
██ ██ ████ ██ ██ ██ █████ ██
|
||||
██ ██ ██ ██ ██ ██ ██ ██
|
||||
██ ██ ██ ██████ ███████ ██
|
||||
██ ██
|
||||
██ ██
|
||||
██ Copyright 2018-2019 David Ralph (ohlookitsderpy) ██
|
||||
██ Licensed under MIT ██
|
||||
██ GitHub: https://github.com/ohlookitsderpy/Mue ██
|
||||
██ ██
|
||||
██ Special thanks to contributors! <3 ██
|
||||
█████████████████████████████████████████████████████████████
|
||||
*/
|
||||
|
||||
const bg = require('./bg.js');
|
||||
const msg = require('./msg.js');
|
||||
const util = require('./util.js');
|
||||
const codes = require('./code.js');
|
||||
const quotes = require('./quote.js');
|
||||
|
||||
const nal = navigator.language;
|
||||
|
||||
module.exports = class Func {
|
||||
static setDaytimeMsg() {
|
||||
if (util.contains.call(codes.itcodes, nal)) msg.itMsgSet(); // Italian
|
||||
if (util.contains.call(codes.nlcodes, nal)) msg.nlMsgSet(); // Dutch
|
||||
if (util.contains.call(codes.frcodes, nal)) msg.frMsgSet(); // French
|
||||
//else if (util.contains.call(codes.ptcodes, nal)) msg.ptMsgSet(); // Portuguese
|
||||
if (util.contains.call(codes.spcodes, nal)) msg.spMsgSet(); // Spanish
|
||||
if (util.contains.call(codes.ficodes, nal)) msg.fiMsgSet(); // Finnish
|
||||
if (util.contains.call(codes.decodes, nal)) msg.spMsgSet(); // German
|
||||
if (util.contains.call(codes.hecodes, nal)) msg.heMsgSet(); // Hebrew
|
||||
if (util.contains.call(codes.rucodes, nal)) msg.ruMsgSet(); // Russian
|
||||
if (util.contains.call(codes.arcodes, nal)) msg.arMsgSet(); // Arabic
|
||||
if (util.contains.call(codes.svcodes, nal)) msg.svMsgSet(); // Swedish
|
||||
else msg.engMsgSet(); // English
|
||||
}
|
||||
|
||||
static setRandBg() {
|
||||
document.body.classList.add(util.pickFromArray(bg));
|
||||
/*util.getJSON(`https://api.muetab.xyz/getImage?category=Outdoors`,
|
||||
(err, data) => {
|
||||
document.body.style.background = `#f3f3f3 url('${data.file}') !important`;
|
||||
});*/
|
||||
}
|
||||
|
||||
static setWithoutSeconds() {
|
||||
const dateNoSec = new Date(),
|
||||
time = [
|
||||
util.formatTimeUnit(dateNoSec.getHours()),
|
||||
util.formatTimeUnit(dateNoSec.getMinutes())
|
||||
];
|
||||
document.getElementById('withoutSeconds').innerHTML = time.join(':');
|
||||
}
|
||||
|
||||
static setRandQuote() {
|
||||
const id = util.getRandIndex(quotes.authors);
|
||||
/*util.getJSON(`https://api.muetab.xyz/getQuote`,
|
||||
(err, data) => {
|
||||
if (err) {
|
||||
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];
|
||||
}
|
||||
document.querySelector('blockquote').innerHTML = `"${data.quote}"`;
|
||||
document.querySelector('cite').innerHTML = data.author;
|
||||
});*/
|
||||
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() {
|
||||
const date = new Date(),
|
||||
time = [
|
||||
util.formatTimeUnit(date.getHours()),
|
||||
util.formatTimeUnit(date.getMinutes()),
|
||||
util.formatTimeUnit(date.getSeconds())
|
||||
];
|
||||
// Joins all of the array elements into a string using the ':' separator
|
||||
// Example: [16, 32, 03] -> "16:32:03"
|
||||
document.getElementById('withSeconds').innerHTML = time.join(':');
|
||||
}
|
||||
};
|
|
@ -1,107 +0,0 @@
|
|||
/*
|
||||
█████████████████████████████████████████████████████████████
|
||||
██ ██
|
||||
██ ███ ███ ██ ██ ███████ ██
|
||||
██ ████ ████ ██ ██ ██ ██
|
||||
██ ██ ████ ██ ██ ██ █████ ██
|
||||
██ ██ ██ ██ ██ ██ ██ ██
|
||||
██ ██ ██ ██████ ███████ ██
|
||||
██ ██
|
||||
██ ██
|
||||
██ Copyright 2018-2019 David Ralph (ohlookitsderpy) ██
|
||||
██ Licensed under MIT ██
|
||||
██ GitHub: https://github.com/ohlookitsderpy/Mue ██
|
||||
██ ██
|
||||
██ Special thanks to contributors! <3 ██
|
||||
█████████████████████████████████████████████████████████████
|
||||
*/
|
||||
|
||||
const hour = new Date().getHours(); // Get the current hour
|
||||
|
||||
module.exports = class Msg {
|
||||
// English
|
||||
static engMsgSet() {
|
||||
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"
|
||||
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, if it's before 6pm then set the time string to Buonasera
|
||||
document.querySelector('.greeting').innerHTML = time; // Write the string contents to the HTML
|
||||
}
|
||||
|
||||
// Dutch
|
||||
static nlMsgSet() { // Everything below is the same as English, check the comments there for information
|
||||
let time = 'Goedemiddag';
|
||||
if (hour < 12) time = 'Goedemorgen';
|
||||
else if (hour > 18) time = 'Goedenavond';
|
||||
document.querySelector('.greeting').innerHTML = time;
|
||||
}
|
||||
|
||||
// French
|
||||
static frMsgSet() {
|
||||
let time = 'Bonsoir';
|
||||
if (hour < 12) time = 'Bonjour';
|
||||
else if (hour > 18) time = 'Bonne après-midi';
|
||||
document.querySelector('.greeting').innerHTML = time;
|
||||
}
|
||||
|
||||
// Spanish
|
||||
static spMsgSet() {
|
||||
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"
|
||||
document.querySelector('.greeting').innerHTML = time; // Write the string contents to the HTML
|
||||
}
|
||||
|
||||
// Finnish
|
||||
static fiMsgSet() {
|
||||
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"
|
||||
document.querySelector('.greeting').innerHTML = time; // Write the string contents to the HTML
|
||||
}
|
||||
|
||||
// German
|
||||
static deMsgSet() {
|
||||
let time = 'Guten Abend';
|
||||
if (hour < 12) time = 'Guten Morgen';
|
||||
else if (hour > 18) time = 'Guten Nachmittag';
|
||||
document.querySelector('.greeting').innerHTML = time;
|
||||
}
|
||||
|
||||
// Hebrew
|
||||
static heMsgSet() {
|
||||
let time = 'ערב טוב';
|
||||
if (hour < 12) time = 'בוקר טוב';
|
||||
else if (hour > 18) time = 'אחר הצהריים טובים';
|
||||
document.querySelector('.greeting').innerHTML = time;
|
||||
}
|
||||
|
||||
// Russian
|
||||
static ruMsgSet() {
|
||||
let time = 'Добрый Вечер';
|
||||
if (hour < 12) time = 'добрый утро';
|
||||
else if (hour > 18) time = 'добрый день';
|
||||
document.querySelector('.greeting').innerHTML = time;
|
||||
}
|
||||
|
||||
// Arabic
|
||||
static arMsgSet() {
|
||||
let time = 'مساء الخير';
|
||||
if (hour < 12) time = 'صباح الخير';
|
||||
else if (hour > 18) time = 'مساء الخير';
|
||||
document.querySelector('.greeting').innerHTML = time;
|
||||
}
|
||||
|
||||
// Swedish
|
||||
static svMsgSet() {
|
||||
let time = 'God kväll';
|
||||
if (hour < 12) time = 'God morgon';
|
||||
document.querySelector('.greeting').innerHTML = time;
|
||||
}
|
||||
};
|
|
@ -1,115 +0,0 @@
|
|||
/*
|
||||
█████████████████████████████████████████████████████████████
|
||||
██ ██
|
||||
██ ███ ███ ██ ██ ███████ ██
|
||||
██ ████ ████ ██ ██ ██ ██
|
||||
██ ██ ████ ██ ██ ██ █████ ██
|
||||
██ ██ ██ ██ ██ ██ ██ ██
|
||||
██ ██ ██ ██████ ███████ ██
|
||||
██ ██
|
||||
██ ██
|
||||
██ Copyright 2018-2019 David Ralph (ohlookitsderpy) ██
|
||||
██ Licensed under MIT ██
|
||||
██ GitHub: https://github.com/ohlookitsderpy/Mue ██
|
||||
██ ██
|
||||
██ Special thanks to contributors! <3 ██
|
||||
█████████████████████████████████████████████████████████████
|
||||
*/
|
||||
|
||||
module.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'
|
||||
]
|
||||
};
|
|
@ -1,123 +0,0 @@
|
|||
// Settings Modal
|
||||
const modal2 = document.getElementById('settingsModal');
|
||||
const btn2 = document.getElementById('openSettingsModal');
|
||||
const span2 = document.getElementsByClassName('close2')[0];
|
||||
btn2.onclick = () => { modal2.style.display = 'block'; };
|
||||
span2.onclick = () => { modal2.style.display = 'none'; };
|
||||
window.onclick = (event) => { if (event.target === modal2) modal2.style.display = 'none'; };
|
||||
|
||||
// Change theme code
|
||||
const changeCSS = (cssFile, cssLinkIndex) => {
|
||||
let oldlink = document.getElementsByTagName('link').item(cssLinkIndex);
|
||||
let newlink = document.createElement('link');
|
||||
|
||||
newlink.setAttribute('rel', 'stylesheet');
|
||||
newlink.setAttribute('type', 'text/css');
|
||||
newlink.setAttribute('href', cssFile);
|
||||
|
||||
document.getElementsByTagName('head').item(0).replaceChild(newlink, oldlink);
|
||||
};
|
||||
|
||||
// Load settings
|
||||
changeCSS(`./assets/css/${localStorage.getItem('theme')}.css`);
|
||||
if (localStorage.getItem('quotes') === 'off') document.getElementById('quoteText').style.display = 'none', document.getElementById("quoteCheck").checked = true;
|
||||
if (localStorage.getItem('greeting') === 'off') document.getElementById('greetingText').style.display = 'none', document.getElementById("greetingCheck").checked = true;
|
||||
if (localStorage.getItem('searchbar') === 'off') document.getElementById('searchBar').style.display = 'none', document.getElementById("searchBarCheck").checked = true;
|
||||
if (localStorage.getItem('seconds') === 'off') {
|
||||
document.getElementById('withSeconds').style.display = 'block';
|
||||
document.getElementById('withoutSeconds').style.display = 'none';
|
||||
}
|
||||
if (localStorage.getItem('seconds') === 'on') {
|
||||
document.getElementById('withSeconds').style.display = 'none';
|
||||
document.getElementById('withoutSeconds').style.display = 'block';
|
||||
document.getElementById("secondsCheck").checked = true;
|
||||
}
|
||||
if (localStorage.getItem('theme') === 'light') {
|
||||
document.getElementById("check").checked = true;
|
||||
}
|
||||
|
||||
// Settings functions
|
||||
|
||||
// Theme Option
|
||||
const changeTheme = () => {
|
||||
if (document.getElementById('check').checked === true) {
|
||||
changeCSS('./assets/css/light.css');
|
||||
localStorage.setItem('theme', 'light');
|
||||
} else {
|
||||
changeCSS('./assets/css/dark.css');
|
||||
localStorage.setItem('theme', 'dark');
|
||||
}
|
||||
}
|
||||
|
||||
window.changeTheme = changeTheme;
|
||||
|
||||
// Quotes Option
|
||||
const hideQuotes = () => {
|
||||
let quoteText = document.getElementById('quoteText');
|
||||
|
||||
if (document.getElementById('quoteCheck').checked === true) {
|
||||
quoteText.style.display = 'none';
|
||||
localStorage.setItem('quotes', 'off');
|
||||
}
|
||||
else {
|
||||
quoteText.style.display = 'block';
|
||||
localStorage.setItem('quotes', 'on');
|
||||
}
|
||||
}
|
||||
|
||||
window.hideQuotes = hideQuotes;
|
||||
|
||||
// Greeting Option
|
||||
const hideGreeting = () => {
|
||||
let greetingText = document.getElementById('greetingText');
|
||||
|
||||
if (document.getElementById('greetingCheck').checked === true) {
|
||||
greetingText.style.display = 'none';
|
||||
localStorage.setItem('greeting', 'off');
|
||||
}
|
||||
else {
|
||||
greetingText.style.display = 'block';
|
||||
localStorage.setItem('greeting', 'on');
|
||||
}
|
||||
}
|
||||
|
||||
window.hideGreeting = hideGreeting;
|
||||
|
||||
// Seconds Option
|
||||
const hideSeconds = () => {
|
||||
let withSecondsText = document.getElementById('withSeconds');
|
||||
let withoutSecondsText = document.getElementById('withoutSeconds');
|
||||
|
||||
if (document.getElementById('secondsCheck').checked === false) {
|
||||
withoutSecondsText.style.display = 'none';
|
||||
withSecondsText.style.display = 'block';
|
||||
localStorage.setItem('seconds', 'off');
|
||||
} if (document.getElementById('secondsCheck').checked === true) {
|
||||
withoutSecondsText.style.display = 'block';
|
||||
withSecondsText.style.display = 'none';
|
||||
localStorage.setItem('seconds', 'on');
|
||||
}
|
||||
else console.log();
|
||||
}
|
||||
|
||||
window.hideSeconds = hideSeconds;
|
||||
|
||||
// Search Bar Option
|
||||
const hideSearchBar = () => {
|
||||
let searchBar = document.getElementById('searchBar');
|
||||
|
||||
if (document.getElementById('searchBarCheck').checked === true) {
|
||||
searchBar.style.display = 'none';
|
||||
localStorage.setItem('searchbar', 'off');
|
||||
}
|
||||
else {
|
||||
searchBar.style.display = 'block';
|
||||
localStorage.setItem('searchbar', 'on');
|
||||
}
|
||||
}
|
||||
window.hideSearchBar = hideSearchBar;
|
||||
|
||||
// Set Engine
|
||||
const setSearchEngine = (engine) => { localStorage.setItem('engine', engine); };
|
||||
|
||||
window.setSearchEngine = setSearchEngine;
|
|
@ -1,67 +0,0 @@
|
|||
/*
|
||||
█████████████████████████████████████████████████████████████
|
||||
██ ██
|
||||
██ ███ ███ ██ ██ ███████ ██
|
||||
██ ████ ████ ██ ██ ██ ██
|
||||
██ ██ ████ ██ ██ ██ █████ ██
|
||||
██ ██ ██ ██ ██ ██ ██ ██
|
||||
██ ██ ██ ██████ ███████ ██
|
||||
██ ██
|
||||
██ ██
|
||||
██ Copyright 2018-2019 David Ralph (ohlookitsderpy) ██
|
||||
██ Licensed under MIT ██
|
||||
██ GitHub: https://github.com/ohlookitsderpy/Mue ██
|
||||
██ ██
|
||||
██ Special thanks to contributors! <3 ██
|
||||
█████████████████████████████████████████████████████████████
|
||||
*/
|
||||
|
||||
module.exports = class Util {
|
||||
// Format time
|
||||
static formatTimeUnit(unit) {
|
||||
return unit < 10 ? '0' + unit : unit;
|
||||
}
|
||||
|
||||
// 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) {
|
||||
const findNaN = needle !== needle;
|
||||
let indexOf;
|
||||
if (!findNaN && typeof Array.prototype.indexOf === 'function') indexOf = Array.prototype.indexOf;
|
||||
else {
|
||||
indexOf = (needle) => {
|
||||
let i = -1,
|
||||
index = -1;
|
||||
for (i = 0; i < this.length; i++) {
|
||||
const item = this[i];
|
||||
if ((findNaN && item !== item) || item === needle) {
|
||||
index = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return index;
|
||||
};
|
||||
}
|
||||
return indexOf.call(this, needle) > -1;
|
||||
}
|
||||
|
||||
static getJSON(url, callback) {
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open('GET', url, true);
|
||||
xhr.responseType = 'json';
|
||||
xhr.onload = () => {
|
||||
var status = xhr.status;
|
||||
if (status === 200) callback(null, xhr.response);
|
||||
else callback(status, xhr.response);
|
||||
};
|
||||
xhr.send();
|
||||
};
|
||||
};
|
|
@ -1,54 +0,0 @@
|
|||
|
||||
const changeCSS = (cssFile, cssLinkIndex) => {
|
||||
let oldlink = document.getElementsByTagName('link').item(cssLinkIndex);
|
||||
let newlink = document.createElement('link');
|
||||
|
||||
newlink.setAttribute('rel', 'stylesheet');
|
||||
newlink.setAttribute('type', 'text/css');
|
||||
newlink.setAttribute('href', cssFile);
|
||||
|
||||
document.getElementsByTagName('head').item(0).replaceChild(newlink, oldlink);
|
||||
};
|
||||
|
||||
changeCSS(`./assets/css/${localStorage.getItem('theme')}.css`);
|
||||
|
||||
const changeTheme = () => {
|
||||
let themeBox = document.getElementById('check');
|
||||
if (themeBox.checked === true) {
|
||||
changeCSS('./assets/css/light.css');
|
||||
localStorage.setItem('theme', 'light');
|
||||
} else {
|
||||
changeCSS('./assets/css/dark.css');
|
||||
localStorage.setItem('theme', 'dark');
|
||||
}
|
||||
}
|
||||
|
||||
const hideQuotes = () => {
|
||||
let quoteBox = document.getElementById('quoteCheck');
|
||||
let quoteText = document.getElementById('quoteText');
|
||||
|
||||
if (quoteBox.checked === true) quoteText.style.display = 'none';
|
||||
else quoteText.style.display = 'block';
|
||||
}
|
||||
|
||||
const hideGreeting = () => {
|
||||
let greetingBox = document.getElementById('greetingCheck');
|
||||
let greetingText = document.getElementById('greetingText');
|
||||
|
||||
if (greetingBox.checked === true) greetingText.style.display = 'none';
|
||||
else greetingText.style.display = 'block';
|
||||
}
|
||||
|
||||
const hideSeconds = () => {
|
||||
let secondsBox = document.getElementById('secondsCheck');
|
||||
let withSecondsText = document.getElementById('withSeconds');
|
||||
let withoutSecondsText = document.getElementById('withoutSeconds');
|
||||
|
||||
if (secondsBox.checked === true) {
|
||||
withoutSecondsText.style.display = 'block';
|
||||
withSeconds.style.display = 'none';
|
||||
} else {
|
||||
withSeconds.style.display = 'block';
|
||||
withoutSecondsText.style.display = 'none';
|
||||
}
|
||||
}
|
|
@ -1,26 +0,0 @@
|
|||
/*
|
||||
█████████████████████████████████████████████████████████████
|
||||
██ ██
|
||||
██ ███ ███ ██ ██ ███████ ██
|
||||
██ ████ ████ ██ ██ ██ ██
|
||||
██ ██ ████ ██ ██ ██ █████ ██
|
||||
██ ██ ██ ██ ██ ██ ██ ██
|
||||
██ ██ ██ ██████ ███████ ██
|
||||
██ ██
|
||||
██ ██
|
||||
██ Copyright 2018-2019 David Ralph (ohlookitsderpy) ██
|
||||
██ Licensed under MIT ██
|
||||
██ GitHub: https://github.com/ohlookitsderpy/Mue ██
|
||||
██ ██
|
||||
██ Special thanks to contributors! <3 ██
|
||||
█████████████████████████████████████████████████████████████
|
||||
*/
|
||||
|
||||
@import 'modules/bg';
|
||||
@import 'modules/font';
|
||||
@import 'modules/misc';
|
||||
@import 'modules/quote';
|
||||
@import 'modules/search';
|
||||
@import 'modules/buttons';
|
||||
@import 'modules/settings-modal';
|
||||
@import 'modules/time-greeting';
|
|
@ -1,43 +0,0 @@
|
|||
/*
|
||||
█████████████████████████████████████████████████████████████
|
||||
██ ██
|
||||
██ ███ ███ ██ ██ ███████ ██
|
||||
██ ████ ████ ██ ██ ██ ██
|
||||
██ ██ ████ ██ ██ ██ █████ ██
|
||||
██ ██ ██ ██ ██ ██ ██ ██
|
||||
██ ██ ██ ██████ ███████ ██
|
||||
██ ██
|
||||
██ ██
|
||||
██ Copyright 2018-2019 David Ralph (ohlookitsderpy) ██
|
||||
██ Licensed under MIT ██
|
||||
██ GitHub: https://github.com/ohlookitsderpy/Mue ██
|
||||
██ ██
|
||||
██ Special thanks to contributors! <3 ██
|
||||
█████████████████████████████████████████████████████████████
|
||||
*/
|
||||
|
||||
.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'); }
|
|
@ -1,42 +0,0 @@
|
|||
button.settings,
|
||||
button.news {
|
||||
background: transparent;
|
||||
border: none;
|
||||
color: #fff;
|
||||
padding: 20px 20px;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
font-size: 20px;
|
||||
cursor: pointer;
|
||||
border-radius: 5px;
|
||||
display: table-cell
|
||||
}
|
||||
|
||||
.buttons {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
top: 10px;
|
||||
i.material-icons {
|
||||
text-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
|
||||
padding-top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
button.news {
|
||||
position: absolute;
|
||||
right: 60px;
|
||||
top: 0px;
|
||||
}
|
||||
|
||||
button.copyButton {
|
||||
background: transparent;
|
||||
border: none;
|
||||
color: #fff;
|
||||
padding: 20px 20px;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
font-size: 20px;
|
||||
cursor: pointer;
|
||||
border-radius: 5px;
|
||||
display: table-cell
|
||||
}
|
|
@ -1,55 +0,0 @@
|
|||
/*
|
||||
█████████████████████████████████████████████████████████████
|
||||
██ ██
|
||||
██ ███ ███ ██ ██ ███████ ██
|
||||
██ ████ ████ ██ ██ ██ ██
|
||||
██ ██ ████ ██ ██ ██ █████ ██
|
||||
██ ██ ██ ██ ██ ██ ██ ██
|
||||
██ ██ ██ ██████ ███████ ██
|
||||
██ ██
|
||||
██ ██
|
||||
██ Copyright 2018-2019 David Ralph (ohlookitsderpy) ██
|
||||
██ Licensed under MIT ██
|
||||
██ GitHub: https://github.com/ohlookitsderpy/Mue ██
|
||||
██ ██
|
||||
██ Special thanks to contributors! <3 ██
|
||||
█████████████████████████████████████████████████████████████
|
||||
*/
|
||||
|
||||
/* fallback */
|
||||
@font-face {
|
||||
font-family: "Material Icons";
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: url("../font/MaterialIcons-Regular.woff2") format("woff2")
|
||||
}
|
||||
|
||||
.material-icons {
|
||||
font-family: "Material Icons";
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
font-size: 24px;
|
||||
line-height: 1;
|
||||
letter-spacing: normal;
|
||||
text-transform: none;
|
||||
display: inline-block;
|
||||
white-space: nowrap;
|
||||
word-wrap: normal;
|
||||
direction: ltr;
|
||||
-moz-font-feature-settings: "liga";
|
||||
font-feature-settings: "liga";
|
||||
-moz-osx-font-smoothing: grayscale
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Open Sans";
|
||||
src: url("../font/opensans-regular-webfont.woff2") format("woff2"),
|
||||
url("../font/opensans-regular-webfont.woff") format("woff");
|
||||
src: url("../font/roboto-v18-latin-regular.woff2") format("woff2"),
|
||||
}
|
||||
|
||||
i.material-icons {
|
||||
font-size: 30px;
|
||||
display: inline;
|
||||
color: #fff
|
||||
}
|
|
@ -1,41 +0,0 @@
|
|||
/* 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: 'Open Sans';
|
||||
color: white;
|
||||
|
||||
overflow: hidden;
|
||||
|
||||
-moz-user-select: none; /* Firefox */
|
||||
user-select: none; /* Non-prefixed version, currently supported by Chrome and Opera */
|
||||
}
|
||||
|
||||
/* Shadow */
|
||||
:root {
|
||||
--shadow-color: #111111CC;
|
||||
}
|
||||
|
||||
.greeting,
|
||||
time,
|
||||
.quote {
|
||||
position: absolute;
|
||||
filter: drop-shadow(var(--shadow-shift) var(--shadow-shift) 0 var(--shadow-color));
|
||||
}
|
||||
|
||||
/* Selection */
|
||||
::selection {
|
||||
background: #FF4F4E;
|
||||
color: #fff;
|
||||
}
|
|
@ -1,48 +0,0 @@
|
|||
/*
|
||||
█████████████████████████████████████████████████████████████
|
||||
██ ██
|
||||
██ ███ ███ ██ ██ ███████ ██
|
||||
██ ████ ████ ██ ██ ██ ██
|
||||
██ ██ ████ ██ ██ ██ █████ ██
|
||||
██ ██ ██ ██ ██ ██ ██ ██
|
||||
██ ██ ██ ██████ ███████ ██
|
||||
██ ██
|
||||
██ ██
|
||||
██ Copyright 2018-2019 David Ralph (ohlookitsderpy) ██
|
||||
██ Licensed under MIT ██
|
||||
██ GitHub: https://github.com/ohlookitsderpy/Mue ██
|
||||
██ ██
|
||||
██ Special thanks to contributors! <3 ██
|
||||
█████████████████████████████████████████████████████████████
|
||||
*/
|
||||
|
||||
.quote {
|
||||
padding-top: 15em;
|
||||
|
||||
--shadow-shift: 0.125rem;
|
||||
|
||||
width: 37.5%;
|
||||
max-width: 37.5rem; /* 600px on desktop */
|
||||
|
||||
font-size: 1.5rem;
|
||||
text-align: center;
|
||||
|
||||
blockquote {
|
||||
margin: 0 0 0.25rem 0;
|
||||
line-height: 1.125;
|
||||
|
||||
::before {
|
||||
content: '“';
|
||||
margin-right: 0.25ch;
|
||||
}
|
||||
|
||||
::after {
|
||||
content: '”';
|
||||
margin-left: 0.25ch;
|
||||
}
|
||||
}
|
||||
|
||||
cite {
|
||||
font-size: 83.33%;
|
||||
}
|
||||
}
|
|
@ -1,58 +0,0 @@
|
|||
/*
|
||||
█████████████████████████████████████████████████████████████
|
||||
██ ██
|
||||
██ ███ ███ ██ ██ ███████ ██
|
||||
██ ████ ████ ██ ██ ██ ██
|
||||
██ ██ ████ ██ ██ ██ █████ ██
|
||||
██ ██ ██ ██ ██ ██ ██ ██
|
||||
██ ██ ██ ██████ ███████ ██
|
||||
██ ██
|
||||
██ ██
|
||||
██ Copyright 2018-2019 David Ralph (ohlookitsderpy) ██
|
||||
██ Licensed under MIT ██
|
||||
██ GitHub: https://github.com/ohlookitsderpy/Mue ██
|
||||
██ ██
|
||||
██ Special thanks to contributors! <3 ██
|
||||
█████████████████████████████████████████████████████████████
|
||||
*/
|
||||
|
||||
.search-bar {
|
||||
position: absolute;
|
||||
left: 20px;
|
||||
top: 20px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
button {
|
||||
font-size: 1px;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
background: none;
|
||||
--shadow-shift: 0.4rem;
|
||||
i.material-icons {
|
||||
text-shadow: 0 0 25px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
display: inline;
|
||||
}
|
||||
input[type=text] {
|
||||
padding: 10px;
|
||||
font-size: 15px;
|
||||
border: 5px;
|
||||
opacity: 0.5;
|
||||
color: #fff;
|
||||
font-weight: bold;
|
||||
margin-left: 5px;
|
||||
letter-spacing: 1px;
|
||||
display: inline;
|
||||
}
|
||||
}
|
||||
|
||||
.input.searchText {
|
||||
flex-grow: 2;
|
||||
border: none;
|
||||
box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
.searchbarform {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
|
@ -1,182 +0,0 @@
|
|||
button.settings {
|
||||
background: transparent;
|
||||
border: none;
|
||||
color: white;
|
||||
padding: 20px 20px;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
font-size: 20px;
|
||||
cursor: pointer;
|
||||
border-radius: 5px;
|
||||
display: table-cell;
|
||||
}
|
||||
|
||||
.buttons {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
top: 10px;
|
||||
}
|
||||
|
||||
i.material-icons {
|
||||
font-size: 30px;
|
||||
display: inline;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
li.items {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding-top: 30px;
|
||||
}
|
||||
|
||||
.modal {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
.switch {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 60px;
|
||||
height: 34px;
|
||||
|
||||
input {
|
||||
opacity: 0;
|
||||
width: 0;
|
||||
height: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.slider {
|
||||
position: absolute;
|
||||
cursor: pointer;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background-color: #ccc;
|
||||
-webkit-transition: .4s;
|
||||
transition: .4s;
|
||||
|
||||
:before {
|
||||
position: absolute;
|
||||
content: "";
|
||||
height: 26px;
|
||||
width: 26px;
|
||||
left: 4px;
|
||||
bottom: 4px;
|
||||
background-color: white;
|
||||
-webkit-transition: .4s;
|
||||
transition: .4s;
|
||||
}
|
||||
}
|
||||
|
||||
input:checked+.slider {
|
||||
background-color: #FF4F4E;
|
||||
}
|
||||
|
||||
input:focus+.slider {
|
||||
box-shadow: 0 0 1px #FF4F4E;
|
||||
}
|
||||
|
||||
input:checked+.slider:before {
|
||||
-webkit-transform: translateX(26px);
|
||||
-ms-transform: translateX(26px);
|
||||
transform: translateX(26px);
|
||||
}
|
||||
|
||||
.slider {
|
||||
position: absolute;
|
||||
cursor: pointer;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background-color: #ccc;
|
||||
-webkit-transition: .4s;
|
||||
transition: .4s;
|
||||
border-radius: 34px;
|
||||
}
|
||||
|
||||
.slider:before {
|
||||
position: absolute;
|
||||
content: "";
|
||||
height: 26px;
|
||||
width: 26px;
|
||||
left: 4px;
|
||||
bottom: 4px;
|
||||
background-color: white;
|
||||
-webkit-transition: .4s;
|
||||
transition: .4s;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.title {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.blurslider {
|
||||
margin-top: 7px;
|
||||
-webkit-appearance: none;
|
||||
width: 200px;
|
||||
height: 15px;
|
||||
border-radius: 5px;
|
||||
background: #d3d3d3;
|
||||
outline: none;
|
||||
float: right;
|
||||
|
||||
::-webkit-slider-thumb {
|
||||
-webkit-appearance: none;
|
||||
appearance: none;
|
||||
width: 25px;
|
||||
height: 25px;
|
||||
border-radius: 50%;
|
||||
background: #FF4F4E;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
::-moz-range-thumb {
|
||||
width: 25px;
|
||||
height: 25px;
|
||||
border-radius: 50%;
|
||||
background: #FF4F4E;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
.dropdown {
|
||||
position: relative;
|
||||
display: block;
|
||||
float: right;
|
||||
padding: 10px;
|
||||
border: none;
|
||||
background: #ecf0f1;
|
||||
}
|
||||
|
||||
label.switch,
|
||||
p.switch {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
label.switch {
|
||||
float: right;
|
||||
}
|
||||
|
||||
li.items {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding-top: 30px
|
||||
}
|
||||
|
||||
.modal {
|
||||
display: none
|
||||
}
|
||||
|
||||
.modal-content {
|
||||
max-height: 500px;
|
||||
}
|
||||
|
||||
img {
|
||||
max-width: 100%;
|
||||
margin-top: 20px;
|
||||
}
|
|
@ -1,30 +0,0 @@
|
|||
button.settings {
|
||||
background: transparent;
|
||||
border: none;
|
||||
color: white;
|
||||
padding: 20px 20px;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
font-size: 20px;
|
||||
cursor: pointer;
|
||||
border-radius: 5px;
|
||||
display: table-cell;
|
||||
}
|
||||
|
||||
.buttons {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
top: 10px;
|
||||
}
|
||||
|
||||
i.material-icons {
|
||||
font-size: 30px;
|
||||
display: inline;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
li.items {
|
||||
list-style: none;
|
||||
margin: 0 ;
|
||||
padding-top: 30px;
|
||||
}
|
|
@ -1,43 +0,0 @@
|
|||
/*
|
||||
█████████████████████████████████████████████████████████████
|
||||
██ ██
|
||||
██ ███ ███ ██ ██ ███████ ██
|
||||
██ ████ ████ ██ ██ ██ ██
|
||||
██ ██ ████ ██ ██ ██ █████ ██
|
||||
██ ██ ██ ██ ██ ██ ██ ██
|
||||
██ ██ ██ ██████ ███████ ██
|
||||
██ ██
|
||||
██ ██
|
||||
██ Copyright 2018-2019 David Ralph (ohlookitsderpy) ██
|
||||
██ Licensed under MIT ██
|
||||
██ GitHub: https://github.com/ohlookitsderpy/Mue ██
|
||||
██ ██
|
||||
██ Special thanks to contributors! <3 ██
|
||||
█████████████████████████████████████████████████████████████
|
||||
*/
|
||||
|
||||
/* Greeting */
|
||||
|
||||
.greeting {
|
||||
text-shadow: 0 0 25px rgba(0,0,0,0.3);
|
||||
font-size: 3.25rem;
|
||||
padding-bottom: 10em;
|
||||
font-weight: bold;
|
||||
letter-spacing: 2px;
|
||||
}
|
||||
|
||||
/* Time */
|
||||
|
||||
time {
|
||||
text-shadow: 0 0 25px rgba(0,0,0,0.3);
|
||||
font-size: 12rem;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#withSeconds, #withoutSeconds, #greetingText {
|
||||
-khtml-user-select: none; /* Konqueror HTML */
|
||||
-moz-user-select: none; /* Firefox */
|
||||
-ms-user-select: none; /* Internet Explorer/Edge */
|
||||
user-select: none; /* Non-prefixed version, currently
|
||||
supported by Chrome and Opera */
|
||||
}
|
|
@ -1,124 +0,0 @@
|
|||
a {
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.modal {
|
||||
display: none;
|
||||
position: fixed;
|
||||
z-index: 1;
|
||||
padding-top: 100px;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
background-color: rgb(0, 0, 0);
|
||||
background-color: rgba(0, 0, 0, 0.4);
|
||||
}
|
||||
|
||||
img {
|
||||
max-width: 100%;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
p {
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.modal-content {
|
||||
background-color: #2d3436;
|
||||
margin: auto;
|
||||
padding: 30px;
|
||||
width: 450px;
|
||||
max-height: 600px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.title,
|
||||
.close,
|
||||
.settingsTitle,
|
||||
.close2 {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.title {
|
||||
color: #ffffff;
|
||||
float: left;
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.settingsTitle {
|
||||
color: #ffffff;
|
||||
float: left;
|
||||
font-size: 30px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
p.subtitle {
|
||||
color: #ffffff;
|
||||
float: left;
|
||||
font-size: 10px;
|
||||
font-weight: bold;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.close {
|
||||
color: #ffffff;
|
||||
float: right;
|
||||
font-size: 30px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.title {
|
||||
float: left;
|
||||
}
|
||||
|
||||
label.switch,
|
||||
p.switch {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
label.switch {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.close:hover,
|
||||
.close:focus {
|
||||
color: #bdc3c7;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.close2 {
|
||||
color: #ffffff;
|
||||
float: right;
|
||||
font-size: 30px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.close2:hover,
|
||||
.close2:focus {
|
||||
color: #bdc3c7;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar {
|
||||
width: 5px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-track {
|
||||
background: #2d3436;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb {
|
||||
background: #34495e;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb:hover {
|
||||
background: #2c3e50;
|
||||
}
|
|
@ -1,182 +0,0 @@
|
|||
body {
|
||||
font-family: 'Noto Sans HK', sans-serif;
|
||||
background: #ffffff;
|
||||
font-size: 20px;
|
||||
}
|
||||
.modal {
|
||||
display: none; /* Hidden by default */
|
||||
position: fixed; /* Stay in place */
|
||||
z-index: 1; /* Sit on top */
|
||||
padding-top: 100px; /* Location of the box */
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%; /* Full width */
|
||||
height: 100%; /* Full height */
|
||||
overflow: auto; /* Enable scroll if needed */
|
||||
background-color: rgb(0,0,0); /* Fallback color */
|
||||
background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
|
||||
font-family: 'Noto Sans HK', sans-serif;
|
||||
}
|
||||
img {
|
||||
max-width: 100%;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
h1, h2, h3, p {
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.modal-content {
|
||||
background-color: #ecf0f1;
|
||||
margin: auto;
|
||||
padding: 30px;
|
||||
width: 450px;
|
||||
max-height: 600px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.title, .close {
|
||||
display: inline;
|
||||
}
|
||||
.settingsTitle, .close2 {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.title {
|
||||
color: #000000;
|
||||
float: left;
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.settingsTitle {
|
||||
color: #000000;
|
||||
float: left;
|
||||
font-size: 30px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
label.switch, p.switch {
|
||||
display: inline;
|
||||
}
|
||||
label.switch {
|
||||
float: right;
|
||||
}
|
||||
|
||||
p.subtitle {
|
||||
color: #000000;
|
||||
float: left;
|
||||
font-size: 10px;
|
||||
font-weight: bold;
|
||||
margin-top: 10px;
|
||||
}
|
||||
.close {
|
||||
color: #aaaaaa;
|
||||
float: right;
|
||||
font-size: 30px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.title {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.close:hover,
|
||||
.close:focus {
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.close2 {
|
||||
color: #aaaaaa;
|
||||
float: right;
|
||||
font-size: 30px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.title {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.close2:hover,
|
||||
.close2:focus {
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
::-webkit-scrollbar {
|
||||
width: 5px;
|
||||
}
|
||||
|
||||
/* Track */
|
||||
::-webkit-scrollbar-track {
|
||||
background: #f1f1f1;
|
||||
}
|
||||
|
||||
/* Handle */
|
||||
::-webkit-scrollbar-thumb {
|
||||
background: #888;
|
||||
}
|
||||
|
||||
/* Handle on hover */
|
||||
::-webkit-scrollbar-thumb:hover {
|
||||
background: #555;
|
||||
}
|
||||
.switch {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 60px;
|
||||
height: 34px;
|
||||
}
|
||||
|
||||
.switch input {
|
||||
opacity: 0;
|
||||
width: 0;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
.slider {
|
||||
position: absolute;
|
||||
cursor: pointer;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background-color: #ccc;
|
||||
-webkit-transition: .4s;
|
||||
transition: .4s;
|
||||
}
|
||||
|
||||
.slider:before {
|
||||
position: absolute;
|
||||
content: "";
|
||||
height: 26px;
|
||||
width: 26px;
|
||||
left: 4px;
|
||||
bottom: 4px;
|
||||
background-color: white;
|
||||
-webkit-transition: .4s;
|
||||
transition: .4s;
|
||||
}
|
||||
|
||||
input:checked + .slider {
|
||||
background-color: #2196F3;
|
||||
}
|
||||
|
||||
input:focus + .slider {
|
||||
box-shadow: 0 0 1px #2196F3;
|
||||
}
|
||||
|
||||
input:checked + .slider:before {
|
||||
-webkit-transform: translateX(26px);
|
||||
-ms-transform: translateX(26px);
|
||||
transform: translateX(26px);
|
||||
}
|
||||
|
||||
/* Rounded sliders */
|
||||
.slider.round {
|
||||
border-radius: 34px;
|
||||
}
|
||||
|
||||
.slider.round:before {
|
||||
border-radius: 50%;
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
.App-clock{font-size:4em;margin:0;text-shadow:0 0 25px rgba(0,0,0,.3)}.App-ampm-specifier{font-size:.5em}.App-greeting{margin:0;font-size:1.6em;text-shadow:0 0 25px rgba(0,0,0,.3)}.App-quote{font-size:.8em;text-shadow:0 0 25px rgba(0,0,0,.3)}@media screen and (min-width: 600px){.App-quote{margin-left:30%;margin-right:30%}}.App-quote-author{font-size:.9em;letter-spacing:.5px;margin:0;text-shadow:0 0 25px rgba(0,0,0,.3)}i.material-icons,h1.App-quote-author{display:inline}.search-bar{position:absolute;left:20px;top:20px;display:flex;flex-direction:row;display:block;color:#fff;font-family:"Lexend Deca"}.search-bar button{cursor:pointer;outline:none;display:inline}.search-bar button i.material-icons{text-shadow:0 0 25px rgba(0,0,0,.3)}.search-bar input[type=text]{font-size:calc(5px + 1.2vmin);background:none;border:2px solid #fff;padding:10px;color:#fff;position:absolute;box-shadow:0 0 25px rgba(0,0,0,.3);z-index:1}.input.searchText{border:none}.searchbarform{display:flex;flex-direction:row;box-shadow:0 25px 50px -12px rgba(0,0,0,.25)}#location{margin-bottom:-10px}#location,#photographer{font-size:calc(10px + 1.2vmin);text-shadow:0 0 25px rgba(0,0,0,.3);text-overflow:ellipsis}#photographer{position:absolute;bottom:10px;left:50px;width:1000px}.tooltip{position:absolute;bottom:15px;left:10px}.personicon,.locationicon{font-size:calc(10px + 1.2vmin)}.MuiSvgIcon-root{position:absolute;bottom:2px;left:2px;width:100em;height:100em;font-size:2rem;text-shadow:0 2px 25px rgba(0,0,0,.3)}.credits{bottom:2px;left:0px;position:absolute;text-align:left;min-width:50px}.tooltip{position:relative;display:inline-block;border-bottom:1px dotted #000}.tooltip .tooltiptext{visibility:hidden;background-color:#000;color:#fff;text-align:center;border-radius:6px;padding:20px;position:absolute;z-index:1;position:absolute;bottom:40px;left:60px;margin-left:-60px;opacity:0;transition:opacity 1s}.tooltip:hover .tooltiptext{visibility:visible;opacity:1}#center{margin-left:2vw;margin-right:2vw;display:flex;flex-direction:column;justify-content:center;font-size:calc(10px + 2vmin);text-align:center}::placeholder{color:#fff;opacity:1}:-ms-input-placeholder{color:#fff}#root{background-size:cover;background-repeat:no-repeat;background-position:center center;background-attachment:fixed;min-height:100vh;display:grid;color:#fff}.App-link{color:#61dafb}body{background:#2f3640;margin:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:"Lexend Deca";overflow:hidden}@font-face{font-family:"Lexend Deca";src:url("/./fonts/LexendDeca-Regular.woff2") format("woff2"),url("/./fonts/LexendDeca-Regular.woff") format("woff"),url("/./fonts/LexendDeca.ttf") format("truetype")}/*# sourceMappingURL=index.css.map */
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"sourceRoot":"","sources":["../scss/modules/_clock.scss","../scss/modules/_greeting.scss","../scss/modules/_quote.scss","../scss/modules/_search.scss","../scss/modules/_credit.scss","../scss/modules/_miscellaneous.scss","../scss/index.scss"],"names":[],"mappings":"AAAA,WACI,cACA,SACA,oCAGJ,oBACE,eCPF,cACI,SACA,gBACA,oCCHJ,WACE,eACA,oCAGF,qCACE,WACE,gBACA,kBAIJ,kBACE,eACA,oBACA,SACA,oCAGF,qCACE,eCpBF,YACI,kBACA,UACA,SACA,aACA,mBACA,cACA,WACA,0BACA,mBACI,eACA,aAIA,eAHA,oCACI,oCAIR,6BACI,8BACA,gBACA,sBACA,aACA,WACA,kBACA,mCACA,UAIR,kBACI,YAGJ,eACI,aACA,mBACA,6CCnCJ,UACI,oBAGJ,wBACI,+BACA,oCACA,uBAGJ,cACE,kBACA,YACA,UACA,aAGF,SACE,kBACA,YACA,UAGF,0BACE,+BAGF,iBACE,kBACA,WACA,SACA,YACA,aACA,eACA,sCAGF,SACI,WACA,SACA,kBACA,gBACA,eAGJ,SACI,kBACA,qBACA,8BAEA,sBACI,kBACA,sBACA,WACA,kBACA,kBACA,aACA,kBACA,UACA,kBACA,YACA,UACA,kBAEA,UACA,sBAIR,4BACE,mBACA,UCxEF,QACI,gBACA,iBACA,aACA,sBACA,uBACA,6BACA,kBAGJ,cACE,WACA,UAGF,uBACE,WCTF,MACI,sBACA,4BACA,kCACA,4BACA,iBACA,aACA,WAGJ,UACI,cAGJ,KACI,mBACA,SACA,mCACA,kCACA,0BACA,gBAGJ,WACI,0BACA","file":"index.css"}
|
|
@ -0,0 +1,16 @@
|
|||
body {
|
||||
margin: 0;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
font-family: 'Lexend Deca';
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Lexend Deca'; /* IE9 Compat Modes */
|
||||
src: url('/src/fonts/LexendDeca-Regular.woff2') format('woff2'), /* Super Modern Browsers */
|
||||
url('/src/fonts/LexendDeca-Regular.woff') format('woff'), /* Pretty Modern Browsers */
|
||||
url('/src/fonts/LexendDeca.ttf') format('truetype'); /* Safari, Android, iOS */
|
||||
}
|
||||
code {
|
||||
font-family: 'Lexend Deca';
|
||||
}
|
162
src/index.html
|
@ -1,162 +0,0 @@
|
|||
<!--
|
||||
█████████████████████████████████████████████████████████████
|
||||
██ ██
|
||||
██ ███ ███ ██ ██ ███████ ██
|
||||
██ ████ ████ ██ ██ ██ ██
|
||||
██ ██ ████ ██ ██ ██ █████ ██
|
||||
██ ██ ██ ██ ██ ██ ██ ██
|
||||
██ ██ ██ ██████ ███████ ██
|
||||
██ ██
|
||||
██ ██
|
||||
██ Copyright 2018-2019 David Ralph (ohlookitsderpy) ██
|
||||
██ Licensed under MIT ██
|
||||
██ GitHub: https://github.com/ohlookitsderpy/Mue ██
|
||||
██ ██
|
||||
██ Special thanks to contributors! <3 ██
|
||||
█████████████████████████████████████████████████████████████
|
||||
-->
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset='utf-8'>
|
||||
<meta name='viewport' content='width=device-width'>
|
||||
|
||||
<title>New Tab</title>
|
||||
|
||||
<link href='./assets/css/light.css' rel='stylesheet'>
|
||||
<link href='./assets/css/base.css' rel='stylesheet'>
|
||||
<link href='./assets/css/animate.css' rel='stylesheet'>
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="assets/img/favicons/favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="assets/img/favicons/favicon-16x16.png">
|
||||
|
||||
</head>
|
||||
|
||||
<body id="body">
|
||||
<div id='greetingText' class='greeting animate'></div>
|
||||
|
||||
<time id='withSeconds' class='animate'></time>
|
||||
<time id='withoutSeconds'class='animate'></time>
|
||||
|
||||
<div id='quoteText' class='quote animate'>
|
||||
|
||||
<blockquote></blockquote>
|
||||
|
||||
<cite></cite>
|
||||
<button class='copyButton' onclick="copyQuote()" type='submit'><i class="material-icons">link</i></button>
|
||||
|
||||
</div>
|
||||
<div id='updateModal' class='modal animate'>
|
||||
|
||||
<div class='modal-content'>
|
||||
<span class='close'>×</span>
|
||||
<span id='title' class='title'>UPDATE - SETTINGS + MORE</span>
|
||||
<br>
|
||||
<br>
|
||||
<p class='subtitle'>BY TEAM MUE • 05/07/2019</p>
|
||||
<img src="assets/img/updatenewlogo.png">
|
||||
<p class='subtitle'>New Mue Logo</p>
|
||||
<br>
|
||||
<br>
|
||||
<h2>First Major Update! (Settings, search and more)</h2>
|
||||
<p><b>The Mue feature update is finally here</b> - in this update we have added a lot of features such as settings, search bar, and customization, the latter of which was requested by many users. <br> In the settings, you can now disable or enable features such as the seconds appearing or the custom quotes. To do this just go to the top right of the page and there's a settings icon when you click that will be a popup modal which you can view the settings on. <br> Below is a screenshot of the settings!</p>
|
||||
<img src="assets/img/muesettings.png">
|
||||
<p class='subtitle'>Picture of settings</p>
|
||||
<br>
|
||||
<br>
|
||||
<p>The next new feature is the search bar; like the name suggests, you can search things using the search bar; currently there is only duckduckgo but soon we'll be adding inferior search engines such as Google, Bing, Yahoo and even Ask Jeeves which no one uses in 2019. <br>Another new feature, now using our brand new API which is on the new <a href="https://muetab.xyz">website</a> at muetab.xyz is the renewed random quotes - you can now get a random quote from the API where if you have an internet connection you will be able to see around the quote every time you refresh the page and will be updated on the clouds even if you never update extension which you should by the way you still get all the brand new quotes.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div id='settingsModal' class='modal animate'>
|
||||
|
||||
<div class='modal-content'>
|
||||
<span class='close2'>×</span>
|
||||
<span class='settingsTitle'>SETTINGS</span>
|
||||
<br>
|
||||
<br>
|
||||
<li class='items'>
|
||||
<p class='switch'>Theme Switch</p>
|
||||
<label class='switch'>
|
||||
<input id='check' type='checkbox' onclick='window.changeTheme()'>
|
||||
<span class='slider round'></span>
|
||||
</label>
|
||||
</li>
|
||||
<li class='items'>
|
||||
<p class='switch'>Hide Search Bar</p>
|
||||
<label class='switch'>
|
||||
<input id='searchBarCheck' type='checkbox' onclick='hideSearchBar()'>
|
||||
<span class='slider round'></span>
|
||||
</label>
|
||||
</li>
|
||||
<li class='items'>
|
||||
<p class='switch'>Hide Quotes</p>
|
||||
<label class='switch'>
|
||||
<input id='quoteCheck' type='checkbox' onclick='hideQuotes()' >
|
||||
<span class='slider round'></span>
|
||||
</label>
|
||||
</li>
|
||||
<li class='items'>
|
||||
<p class='switch'>Hide Greeting</p>
|
||||
<label class='switch'>
|
||||
<input id='greetingCheck' type='checkbox' onclick='hideGreeting()'>
|
||||
<span class='slider round'></span>
|
||||
</label>
|
||||
</li>
|
||||
<li class='items'>
|
||||
<p class='switch'>Hide Seconds</p>
|
||||
<label class='switch'>
|
||||
<input id='secondsCheck' type='checkbox' onclick='hideSeconds()'>
|
||||
<span class='slider round'></span>
|
||||
</label>
|
||||
</li>
|
||||
<!--
|
||||
<li class='items'>
|
||||
<div class="sliderContainer">
|
||||
<p class='switch'>Background Blur</p>
|
||||
<input type='range' min='0' max='100' value='0' class="blurslider" id='slider'>
|
||||
<p class='switch'><span id="blurValue"></span>×</p>
|
||||
</div>
|
||||
</li>
|
||||
<li class='items'>
|
||||
<p class='switch'>Search Engine</p>
|
||||
<select class="dropdown" id ="searchdropdown">
|
||||
<option value="volvo">DuckDuckGo</option>
|
||||
<option value="saab">Google</option>
|
||||
<option value="mercedes">Ask</option>
|
||||
<option value="audi">Ecosia</option>
|
||||
</select>
|
||||
</li>
|
||||
<li class='items'>
|
||||
<p class='switch'>Font</p>
|
||||
<select class="dropdown" id="font_dropdown">
|
||||
<option value="opensans" onclick="setFontOP()">Open Sans</option>
|
||||
<option value="roboto" onclick="setFontROB()">Roboto</option>
|
||||
</select>
|
||||
</li>
|
||||
-->
|
||||
</div>
|
||||
</div>
|
||||
<div class='buttons'>
|
||||
<button class='settings' id='openSettingsModal'><i class='material-icons'>settings</i></button>
|
||||
<button class='news' id='openUpdateModal' onclick="setFontROB()"><i class='material-icons'>new_releases</i></button>
|
||||
</div>
|
||||
<div id='searchBar' class='search-bar'>
|
||||
<form id='searchBar' class="searchbarform" action='https://google.com' onsubmit='search()'>
|
||||
<input type='text' placeholder='SEARCH' style='color: #000000;' name='q' id='searchText' class='searchText' />
|
||||
<button class='searchbutton' type='submit'><i class='material-icons'>search</i></button>
|
||||
</form>
|
||||
</div>
|
||||
</body>
|
||||
<script>
|
||||
function copyQuote() {
|
||||
const quote = document.createRange();
|
||||
quote.selectNode(document.getElementById('quoteText'));
|
||||
window.getSelection().removeAllRanges();
|
||||
window.getSelection().addRange(quote);
|
||||
document.execCommand("copy");
|
||||
window.getSelection().removeAllRanges();
|
||||
}
|
||||
</script>
|
||||
<script src='./assets/js/base.js'></script>
|
||||
</html>
|
|
@ -0,0 +1,15 @@
|
|||
import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import App from './App.jsx';
|
||||
import * as serviceWorker from './serviceWorker';
|
||||
|
||||
ReactDOM.render(
|
||||
<App />,
|
||||
document.getElementById('root')
|
||||
);
|
||||
|
||||
// If you want your app to work offline and load faster, you can change
|
||||
// unregister() to register() below. Note this comes with some pitfalls.
|
||||
// Learn more about service workers: https://bit.ly/CRA-PWA
|
||||
// Was unregister(), now register() - Derpy
|
||||
serviceWorker.register();
|
|
@ -1,12 +0,0 @@
|
|||
{
|
||||
"manifest_version": 2,
|
||||
"offline_enabled": true,
|
||||
"name": "Mue",
|
||||
"version": "0.1",
|
||||
"browser_action": {
|
||||
"default_icon": "./assets/img/icon.png"
|
||||
},
|
||||
"chrome_url_overrides": {
|
||||
"newtab": "index.html"
|
||||
}
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
{
|
||||
"manifest_version": 2,
|
||||
"name": "Mue",
|
||||
"version": "0.1",
|
||||
"browser_action": {
|
||||
"default_icon": "./assets/img/icon.png"
|
||||
},
|
||||
"chrome_url_overrides": {
|
||||
"newtab": "index.html"
|
||||
},
|
||||
"chrome_settings_overrides": {
|
||||
"homepage": "index.html"
|
||||
}
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
{
|
||||
"manifest_version": 2,
|
||||
"name": "Mue",
|
||||
"version": "0.1",
|
||||
"browser_action": {
|
||||
"default_icon": "./assets/img/icon.png"
|
||||
},
|
||||
"background": {
|
||||
"scripts": [
|
||||
"./assets/js/background-opera.js"
|
||||
]
|
||||
},
|
||||
"permissions": [
|
||||
"tabs"
|
||||
]
|
||||
}
|
|
@ -0,0 +1,48 @@
|
|||
import React from 'react';
|
||||
|
||||
const checkTime = (i) => {
|
||||
if (i < 10) i = '0' + i;
|
||||
return i;
|
||||
};
|
||||
|
||||
export default class Clock extends React.Component {
|
||||
constructor(...args) {
|
||||
super(...args);
|
||||
this.state = {
|
||||
date: ``,
|
||||
ampm: ``,
|
||||
};
|
||||
}
|
||||
|
||||
startTime() {
|
||||
const today = new Date();
|
||||
let h = today.getHours();
|
||||
const ampm = h >= 12 ? 'PM' : 'AM';
|
||||
const m = checkTime(today.getMinutes());
|
||||
// const s = checkTime(today.getSeconds());
|
||||
|
||||
if (h > 12) h = h - 12;
|
||||
|
||||
if (h < 12) this.setState({ date: '0' + h + ':' + m, ampm: ampm });
|
||||
else this.setState({ date: h + ':' + m, ampm: ampm });
|
||||
|
||||
this.timeout = setTimeout(() => this.startTime(), 500);
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.startTime();
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
clearTimeout(this.timeout);
|
||||
}
|
||||
|
||||
render() {
|
||||
return <h1 className='App-clock'>
|
||||
{this.state.date}
|
||||
<span className='App-ampm-specifier'>
|
||||
{this.state.ampm}
|
||||
</span>
|
||||
</h1>;
|
||||
}
|
||||
}
|