Cleanup, refactor and new features

This commit is contained in:
David Ralph
2020-11-29 14:32:08 +00:00
parent 87dd07c45c
commit 82e1d7684a
37 changed files with 462 additions and 421 deletions

View File

@@ -1,7 +1,6 @@
const defaultSettings = require('../json/default_settings.json');
const defaultSettings = require('../default_settings.json');
const saveFile = (data, filename = 'file') => {
if (!data) return console.error('No data');
if (typeof data === 'object') data = JSON.stringify(data, undefined, 4);
const blob = new Blob([data], { type: 'text/json' });
@@ -52,6 +51,7 @@ export default class SettingsFunctions {
localStorage.setItem('brightness', document.getElementById('brightnessRange').value);
localStorage.setItem('greetingName', document.getElementById('greetingName').value);
localStorage.setItem('customBackground', document.getElementById('customBackground').value);
localStorage.setItem('customcss', document.getElementById('customcss').value);
if (document.getElementById('customBackgroundHex').value !== hexDisabled) {
localStorage.setItem('customBackgroundColour', document.getElementById('customBackgroundHex').value);
}

View File

@@ -1,20 +0,0 @@
{
"Tirachard Kumtanom" : {
"photo": [1]
},
"Sohail Na": {
"photo": [4]
},
"Miriam Espacio": {
"photo": [7]
},
"Fabian Wiktor": {
"photo": [20]
},
"Pixabay": {
"photo": [2, 3, 9, 11, 13, 14, 15]
},
"Unknown" : {
"photo": [5, 6, 8, 10, 12, 16, 17, 18, 19]
}
}

View File

@@ -1,48 +0,0 @@
[
{
"name": "DuckDuckGo",
"settingsName": "duckduckgo",
"url": "https://duckduckgo.com"
},
{
"name": "Google",
"settingsName": "google",
"url": "https://google.com/search"
},
{
"name": "Bing",
"settingsName": "bing",
"url": "https://bing.com/search"
},
{
"name": "Yahoo",
"settingsName": "yahoo",
"url": "https://search.yahoo.com/search"
},
{
"name": "Ecosia",
"settingsName": "ecosia",
"url": "https://ecosia.org/search"
},
{
"name": "Яндекс",
"settingsName": "yandex",
"url": "https://yandex.ru/search",
"query": "text"
},
{
"name": "Qwant",
"settingsName": "qwant",
"url": "https://www.qwant.com/"
},
{
"name": "Ask",
"settingsName": "ask",
"url": "https://ask.com/web"
},
{
"name": "Startpage",
"settingsName": "startpage",
"url": "https://www.startpage.com/sp/search"
}
]