nightTab/js/state.js

236 lines
4.1 KiB
JavaScript
Raw Normal View History

2018-12-26 08:45:53 +01:00
var state = (function() {
var current = {
header: {
area: {
2019-06-04 20:08:15 +02:00
width: 100,
alignment: {
horizontal: "center"
}
},
2019-06-06 19:22:42 +02:00
item: {
alignment: {
horizontal: "left"
}
},
clock: {
hours: {
show: true,
display: "number"
},
minutes: {
show: true,
display: "number"
},
seconds: {
show: true,
display: "number"
},
separator: {
show: true
},
meridiem: {
show: true
},
hour24: {
show: true
},
},
date: {
day: {
show: true,
display: "word",
weekStart: "monday",
length: "long"
},
date: {
show: true,
display: "number",
ordinal: true
},
month: {
show: true,
display: "word",
length: "long",
ordinal: true
},
year: {
show: false,
display: "number"
},
separator: {
show: true
},
format: "datemonth"
},
search: {
show: true,
width: {
style: "auto",
custom: 30
},
focus: false,
engine: {
selected: "google",
google: {
url: "https://www.google.com/search",
name: "Google"
},
duckduckgo: {
url: "https://duckduckgo.com/",
name: "Duck Duck Go"
},
youtube: {
url: "https://www.youtube.com/results?search_query=",
name: "YouTube"
},
giphy: {
url: "https://giphy.com/search/",
name: "Giphy"
},
custom: {
url: "",
name: ""
}
},
text: {
align: "center"
}
},
editAdd: {
show: true,
},
accent: {
show: true,
2019-02-16 23:27:54 +01:00
},
shade: {
show: true,
style: "scroll",
opacity: 0.95,
},
padding: {
top: 0,
bottom: 0
},
border: {
top: {
show: false,
width: 1
},
bottom: {
show: false,
width: 1
2019-02-16 23:27:54 +01:00
}
2019-03-26 00:31:51 +01:00
},
greeting: {
show: false,
type: "good",
name: ""
},
transitional: {
show: false,
type: "timeanddate"
}
},
link: {
area: {
2019-06-06 19:22:42 +02:00
gap: 2,
2019-06-04 20:08:15 +02:00
width: 100,
alignment: {
horizontal: "center"
}
},
2019-06-06 19:22:42 +02:00
item: {
size: 1,
display: {
show: true,
size: 2,
alignment: {
horizontal: "right",
vertical: "bottom"
},
letter: {
size: 2
},
icon: {
size: 2
}
},
2019-06-06 19:22:42 +02:00
name: {
show: true,
size: 0.9,
},
url: {
show: true,
style: "dark"
},
},
show: true,
newTab: false,
edit: false,
style: "block",
sort: "none"
},
layout: {
alignment: {
horizontal: "center",
vertical: "center"
},
2019-06-04 20:08:15 +02:00
width: 80,
scrollPastEnd: false,
2019-04-01 17:11:39 +02:00
title: "New Tab"
},
theme: {
accent: {
2019-01-07 15:42:14 +01:00
current: {
r: 0,
g: 130,
b: 250,
2019-01-07 15:42:14 +01:00
},
random: {
active: false,
style: "any"
}
2019-04-01 17:11:39 +02:00
},
style: "dark"
},
background: {
image: {
show: false,
url: "../background/gray-steps.jpg",
blur: 0,
opacity: 1,
grayscale: 0,
accent: 0
}
},
edge: false,
search: false,
menu: false,
modal: false,
autoSuggest: false,
};
2018-12-26 08:45:53 +01:00
var get = function() {
return current;
};
var restore = function(data) {
if ("state" in data) {
current = data.state;
};
};
var init = function() {
if (data.load()) {
restore(data.load());
};
};
2018-12-26 08:45:53 +01:00
return {
init: init,
get: get
2018-12-26 08:45:53 +01:00
};
})();