diff --git a/README.md b/README.md index 1f2db10f..f1010cb1 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ [![License](https://img.shields.io/badge/license-BSD%203-blue?style=flat-square)](/LICENSE) [![Discord](https://img.shields.io/discord/659129207208804381?label=discord&color=7289DA&style=flat-square)](https://discord.gg/zv8C9F8) [![Code Size]( https://img.shields.io/github/languages/code-size/mue/mue?color=green&label=size&style=flat-square)]()
-[![Microsoft Edge](https://img.shields.io/badge/dynamic/json?style=flat-square&label=microsoft%20edge&query=%24.version&url=https%3A%2F%2Fmicrosoftedge.microsoft.com%2Faddons%2Fgetproductdetailsbycrxid%2Faepnglgjfokepefimhbnibfjekidhmja)]() [![](https://img.shields.io/amo/v/mue?label=firefox&style=flat-square)]() [![](https://img.shields.io/chrome-web-store/v/bngmbednanpcfochchhgbkookpiaiaid?label=chrome&style=flat-square)]() +[![Microsoft Edge](https://img.shields.io/badge/dynamic/json?style=flat-square&label=microsoft%20edge&query=%24.version&url=https%3A%2F%2Fmicrosoftedge.microsoft.com%2Faddons%2Fgetproductdetailsbycrxid%2Faepnglgjfokepefimhbnibfjekidhmja)](https://microsoftedge.microsoft.com/addons/detail/aepnglgjfokepefimhbnibfjekidhmja) [![Firefox](https://img.shields.io/amo/v/mue?label=firefox&style=flat-square)](https://addons.mozilla.org/firefox/addon/mue) [![Chrome](https://img.shields.io/chrome-web-store/v/bngmbednanpcfochchhgbkookpiaiaid?label=chrome&style=flat-square)](https://chrome.google.com/webstore/detail/mue/bngmbednanpcfochchhgbkookpiaiaid) Mue is a fast, open and free-to-use browser extension that gives a new, fresh and customizable tab page to most modern browsers @@ -39,12 +39,12 @@ Mue is a fast, open and free-to-use browser extension that gives a new, fresh an * Fast and free * Supports multiple browsers * Actively developed and open source -* Automatically updating API (with no tracking!) with new photos, quotes and offline mode +* Automatically updating API (no tracking) with new photos, quotes and offline mode * Search bar +* Settings - enable/disable various features and customise parts of Mue +* Update modal, copy button and more! ## Planned Features -* Settings - enable/disable features! -* Update modal, copy button and more! * Multilingual support ## Installation @@ -63,7 +63,7 @@ Mue is a fast, open and free-to-use browser extension that gives a new, fresh an [Microsoft Edge Addons](https://microsoftedge.microsoft.com/addons/detail/aepnglgjfokepefimhbnibfjekidhmja) ### Opera/Other -Link: [GitHub Releases](https://github.com/mue/mue/releases) +[GitHub Releases](https://github.com/mue/mue/releases) ### Development #### Requirements @@ -79,7 +79,7 @@ Link: [GitHub Releases](https://github.com/mue/mue/releases)
  • run yarn start or npm start to start testing
  • Code your heart out! (See the sections below for how to build the extension) -

    Building

    +

    Building

    Chrome/Edge (Chromium) (Click to expand)
      @@ -95,7 +95,7 @@ Link: [GitHub Releases](https://github.com/mue/mue/releases)
      1. yarn run build or npm run build
      2. Rename manifest-opera.json in the "manfiest" folder to manifest.json in "build" -
      3. Copy in the "manifest" folder to "build" +
      4. Copy background-opera.js in the "manifest" folder to "build"
      5. Visit about://extensions in Opera
      6. Click Load unpacked extension... (Make sure Developer Mode is on)
      7. Go to the directory containing Mue and click ok @@ -127,7 +127,12 @@ Link: [GitHub Releases](https://github.com/mue/mue/releases) ## Credits ### Maintainers [ohlookitsderpy](https://github.com/ohlookitsderpy) - Founder, Lead development, Photographer
        -[TurboMarshmello](https://github.com/TurboMarshmello) - Name, Lead design,
        +[TurboMarshmello](https://github.com/TurboMarshmello) - Name, Lead design, Photographer
        + +### Contributors +[Wessel](https://github.com/Wessel) - Development
        +[Isaac](https://github.com/eartharoid) - QA, Development, Photographer
        +[Chris](https://github.com/auguwu) - Development
        ### Other [Pexels](https://pexels.com) - Stock photos used for offline mode @@ -135,9 +140,4 @@ Link: [GitHub Releases](https://github.com/mue/mue/releases) [Opera Forum](https://forums.opera.com/topic/25046/how-to-disable-completely-the-speed-dial/14) - Portions of code to add Opera support
        [Google Fonts](https://fonts.google.com/specimen/Lexend+Deca) - Lexend Deca font -### Contributors -[Wessel](https://github.com/Wessel) - Development
        -[Isaac](https://github.com/eartharoid) - Development
        -[Chris](https://github.com/auguwu) - Development
        - And many thanks to [Highholding](https://discord.bio/p/highholding), [Noa Shapira](#), [Roee Lupo](https://github.com/MrSheldon), [Jeroen](#), [Glasvegas](https://twitter.com/_glasvegas), [Anders](https://github.com/FuryingFox/), [Oded Shapira](https://twitter.com/dondishdev) and [Nikka Lai](#) for letting us use their wonderful photographs diff --git a/assets/screenshot.jpg b/assets/screenshot.jpg index 152c7de4..43413d71 100644 Binary files a/assets/screenshot.jpg and b/assets/screenshot.jpg differ diff --git a/manifest/chrome.json b/manifest/chrome.json index 84d72c28..64213ea3 100644 --- a/manifest/chrome.json +++ b/manifest/chrome.json @@ -3,7 +3,7 @@ "offline_enabled": true, "name": "Mue", "description": "Fast, open and free-to-use new tab page for most modern browsers.", - "version": "0.7.1", + "version": "3.0.1", "browser_action": { "default_icon": "./icons/extension-icon.png" }, diff --git a/manifest/firefox.json b/manifest/firefox.json index 39cc3fa3..adc54e89 100644 --- a/manifest/firefox.json +++ b/manifest/firefox.json @@ -2,7 +2,7 @@ "manifest_version": 2, "name": "Mue", "description": "Fast, open and free-to-use new tab page for most modern browsers.", - "version": "0.7.2", + "version": "3.0.1", "browser_action": { "default_icon": "./icons/extension-icon.png" }, diff --git a/manifest/opera.json b/manifest/opera.json index d86a239b..146ff2fc 100644 --- a/manifest/opera.json +++ b/manifest/opera.json @@ -2,7 +2,7 @@ "manifest_version": 2, "name": "Mue", "description": "Fast, open and free-to-use new tab page for most modern browsers.", - "version": "0.7.1", + "version": "3.0.1", "browser_action": { "default_icon": "./icons/extension-icon.png" }, diff --git a/package.json b/package.json index 578cedca..7f366323 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "homepage": "https://muetab.xyz", "bugs": "https://github.com/mue/mue/issues/new?assignees=&labels=bug&template=bug-report.md&title=%5BBUG%5D", "license": "BSD-3-Clause", - "version": "3.0", + "version": "3.0.1", "dependencies": { "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", @@ -26,7 +26,6 @@ "supports-webp": "^2.0.1" }, "devDependencies": { - "eslint": "^7.3.0", "node-sass": "^4.14.1" }, "scripts": { diff --git a/src/App.jsx b/src/App.jsx index 7e36876f..746e1ccf 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -42,10 +42,14 @@ export default class App extends React.Component { localStorage.setItem('offlineMode', false); localStorage.setItem('webp', false); localStorage.setItem('events', true); + localStorage.setItem('customBackgroundColour', ''); + localStorage.setItem('customBackground', ''); + localStorage.setItem('greetingName', ''); // Set theme depending on user preferred if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) localStorage.setItem('darkTheme', true); else localStorage.setItem('darkTheme', false); + localStorage.setItem('darkTheme', false); // Finally we set this to true so it doesn't run the function on every load localStorage.setItem('firstRun', true); diff --git a/src/components/Background.jsx b/src/components/Background.jsx index 85aa56c8..cdea6c5e 100644 --- a/src/components/Background.jsx +++ b/src/components/Background.jsx @@ -23,7 +23,7 @@ export default class Background extends React.Component { document.getElementById('photographer').innerText = `Photo by ${photographer} (Pexels)`; // Set the credit } - async setBackground() { + async setBackground() { const enabled = localStorage.getItem('offlineMode'); if (enabled === 'true') return this.doOffline(); @@ -45,7 +45,7 @@ export default class Background extends React.Component { if (await supportsWebP && enabled === 'true') requestURL = 'https://api.muetab.xyz/getImage?webp=true'; else requestURL = 'https://api.muetab.xyz/getImage?category=Outdoors'; let data = await fetch(requestURL); - data = await data.json(); + data = await data.json(); document.getElementById('backgroundImage').setAttribute('style', `-webkit-filter:blur(${localStorage.getItem('blur')}px); background-image: url(${data.file})`); // Set background and blur etc document.getElementById('photographer').innerText = `Photo by ${data.photographer}`; // Set the credit @@ -58,7 +58,7 @@ export default class Background extends React.Component { componentDidMount() { const enabled = localStorage.getItem('background'); if (enabled === 'false') { - document.getElementById('backgroundCredits').style.display = 'none'; + document.getElementById('backgroundCredits').style.display = 'none'; return; } this.setBackground(); diff --git a/src/components/Clock.jsx b/src/components/Clock.jsx index babe806a..05a4a1fe 100644 --- a/src/components/Clock.jsx +++ b/src/components/Clock.jsx @@ -10,26 +10,26 @@ export default class Clock extends React.Component { ampm: '' }; } - + startTime(time = localStorage.getItem('seconds') === 'true' ? (1000 - Date.now() % 1000) : (60000 - Date.now() % 60000)) { this.timer = setTimeout(() => { const now = new Date(); let sec = ''; - + if (localStorage.getItem('seconds') === 'true') sec = `:${('00' + now.getSeconds()).slice(-2)}`; if (localStorage.getItem('24hour') === 'true') { - this.setState({ + this.setState({ date: `${('00' + now.getHours()).slice(-2)}:${('00' + now.getMinutes()).slice(-2)}${sec}` - }); + }); } else { // 12 hour support let hours = now.getHours(); if (hours > 12) hours -= 12; - this.setState({ + this.setState({ date: `${('00' + hours).slice(-2)}:${('00' + now.getMinutes()).slice(-2)}${sec}`, - ampm: now.getHours() > 11 ? 'PM' : 'AM' + ampm: now.getHours() > 11 ? 'PM' : 'AM' }); } @@ -47,7 +47,7 @@ export default class Clock extends React.Component { return

        {this.state.date} - {this.state.ampm} + {this.state.ampm}

        ; } diff --git a/src/components/Greeting.jsx b/src/components/Greeting.jsx index ca0567b4..7c4b71f4 100644 --- a/src/components/Greeting.jsx +++ b/src/components/Greeting.jsx @@ -19,7 +19,7 @@ export default class Greeting extends React.Component { if (m === 11 && d === 25) message = 'Merry Christmas'; // If it's December 25th, set the greeting string to "Merry Christmas" else if (m === 0 && d === 1) message = 'Happy new year'; // If the date is January 1st, set the greeting string to "Happy new year" else if (m === 9 && d === 31) message = 'Happy Halloween'; // If it's October 31st, set the greeting string to "Happy Halloween" - + return message; } @@ -27,7 +27,7 @@ export default class Greeting extends React.Component { const now = new Date(); const hour = now.getHours(); - let message = 'Good evening'; // Set the default greeting string to "Good evening" + let message = 'Good evening'; // Set the default greeting string to "Good evening" if (hour < 12) message = 'Good morning'; // If it's before 12am, set the greeting string to "Good morning" else if (hour < 18) message = 'Good afternoon'; // If it's before 6pm, set the greeting string to "Good afternoon" @@ -39,12 +39,13 @@ export default class Greeting extends React.Component { let data = localStorage.getItem('greetingName'); if (typeof data === 'string') { - data = data.replace(/\s/g, ' '); - if (data.length > 0) name = `, ${data}`; + if (data.replace(/\s/g, '').length > 0) { + name = `, ${data.trim()}`; + } } // Set the state to the greeting string - this.setState({ + this.setState({ greeting: `${message}${name}` }); } @@ -54,7 +55,7 @@ export default class Greeting extends React.Component { if (enabled === 'false') return; this.getGreeting(); } - + render() { return

        {this.state.greeting} diff --git a/src/components/Quote.jsx b/src/components/Quote.jsx index af7cec4e..a49538a8 100644 --- a/src/components/Quote.jsx +++ b/src/components/Quote.jsx @@ -15,23 +15,23 @@ export default class Quote extends React.Component { doOffline() { const quote = Quotes.random(); // Get a random quote from our local package - this.setState({ - quote: '"' + quote.quote + '"', - author: quote.author + this.setState({ + quote: '"' + quote.quote + '"', + author: quote.author }); // Set the quote } async getQuote() { const enabled = localStorage.getItem('offlineMode'); if (enabled === 'true') return this.doOffline(); - + try { // First we try and get a quote from the API... let data = await fetch('https://api.muetab.xyz/getQuote'); data = await data.json(); if (data.statusCode === 429) this.doOffline(); // If we hit the ratelimit, we fallback to local quotes - this.setState({ - quote: '"' + data.quote + '"', - author: data.author + this.setState({ + quote: '"' + data.quote + '"', + author: data.author }); } catch (e) { // ..and if that fails we load one locally this.doOffline(); @@ -43,7 +43,7 @@ export default class Quote extends React.Component { let toast = document.getElementById('toast'); toast.className = 'show'; setTimeout(() => { toast.className = toast.className.replace('show', ''); }, 3000); - } + } componentDidMount() { const enabled = localStorage.getItem('quote'); diff --git a/src/components/Search.jsx b/src/components/Search.jsx index 1fc44292..7f1ea2af 100644 --- a/src/components/Search.jsx +++ b/src/components/Search.jsx @@ -3,7 +3,7 @@ import React from 'react'; export default class Search extends React.Component { render() { - const enabled = localStorage.getItem('searchbar'); + const enabled = localStorage.getItem('searchBar'); if (enabled === 'false') return (
        ); const searchEngine = localStorage.getItem('searchEngine'); @@ -18,7 +18,7 @@ export default class Search extends React.Component { return (