2018-12-26 08:45:53 +01:00
|
|
|
var state = (function() {
|
|
|
|
|
2019-01-03 23:30:27 +01:00
|
|
|
var current = {
|
|
|
|
header: {
|
2019-05-23 20:15:14 +02:00
|
|
|
area: {
|
2019-06-04 20:08:15 +02:00
|
|
|
width: 100,
|
2019-05-23 20:15:14 +02:00
|
|
|
alignment: {
|
|
|
|
horizontal: "center"
|
|
|
|
}
|
|
|
|
},
|
2019-06-06 19:22:42 +02:00
|
|
|
item: {
|
2019-05-23 20:15:14 +02:00
|
|
|
alignment: {
|
|
|
|
horizontal: "left"
|
|
|
|
}
|
|
|
|
},
|
2019-01-03 23:30:27 +01:00
|
|
|
clock: {
|
2019-04-26 14:48:37 +02:00
|
|
|
hours: {
|
|
|
|
show: true,
|
|
|
|
display: "number"
|
|
|
|
},
|
|
|
|
minutes: {
|
|
|
|
show: true,
|
|
|
|
display: "number"
|
|
|
|
},
|
|
|
|
seconds: {
|
|
|
|
show: true,
|
|
|
|
display: "number"
|
|
|
|
},
|
|
|
|
separator: {
|
|
|
|
show: true
|
|
|
|
},
|
|
|
|
meridiem: {
|
|
|
|
show: true
|
|
|
|
},
|
|
|
|
hour24: {
|
|
|
|
show: true
|
|
|
|
},
|
2019-01-03 23:30:27 +01:00
|
|
|
},
|
2019-02-03 14:51:54 +01:00
|
|
|
date: {
|
2019-04-26 14:48:37 +02:00
|
|
|
day: {
|
|
|
|
show: true,
|
|
|
|
display: "word",
|
|
|
|
weekStart: "monday",
|
|
|
|
length: "long"
|
2019-02-03 14:51:54 +01:00
|
|
|
},
|
2019-04-26 14:48:37 +02:00
|
|
|
date: {
|
|
|
|
show: true,
|
|
|
|
display: "number",
|
|
|
|
ordinal: true
|
|
|
|
},
|
|
|
|
month: {
|
|
|
|
show: true,
|
|
|
|
display: "word",
|
|
|
|
length: "long",
|
|
|
|
ordinal: true
|
|
|
|
},
|
|
|
|
year: {
|
2019-05-23 20:15:14 +02:00
|
|
|
show: false,
|
2019-04-26 14:48:37 +02:00
|
|
|
display: "number"
|
|
|
|
},
|
|
|
|
separator: {
|
|
|
|
show: true
|
|
|
|
},
|
|
|
|
format: "datemonth"
|
2019-01-03 23:30:27 +01:00
|
|
|
},
|
|
|
|
search: {
|
2019-02-03 14:51:54 +01:00
|
|
|
show: true,
|
2019-04-18 14:30:40 +02:00
|
|
|
width: {
|
|
|
|
style: "auto",
|
|
|
|
custom: 30
|
|
|
|
},
|
2019-01-25 00:21:00 +01:00
|
|
|
focus: false,
|
2019-01-03 23:30:27 +01:00
|
|
|
engine: {
|
|
|
|
selected: "google",
|
|
|
|
google: {
|
2019-04-04 16:26:52 +02:00
|
|
|
url: "https://www.google.com/search",
|
|
|
|
name: "Google"
|
2019-01-03 23:30:27 +01:00
|
|
|
},
|
|
|
|
duckduckgo: {
|
2019-04-04 16:26:52 +02:00
|
|
|
url: "https://duckduckgo.com/",
|
|
|
|
name: "Duck Duck Go"
|
2019-01-03 23:30:27 +01:00
|
|
|
},
|
2019-04-04 19:08:26 +02:00
|
|
|
youtube: {
|
|
|
|
url: "https://www.youtube.com/results?search_query=",
|
|
|
|
name: "YouTube"
|
|
|
|
},
|
2019-01-03 23:30:27 +01:00
|
|
|
giphy: {
|
2019-04-04 16:26:52 +02:00
|
|
|
url: "https://giphy.com/search/",
|
|
|
|
name: "Giphy"
|
2019-01-03 23:30:27 +01:00
|
|
|
},
|
|
|
|
custom: {
|
2019-04-04 19:08:26 +02:00
|
|
|
url: "",
|
|
|
|
name: ""
|
2019-01-03 23:30:27 +01:00
|
|
|
}
|
2019-04-18 14:30:40 +02:00
|
|
|
},
|
|
|
|
text: {
|
2019-05-23 20:15:14 +02:00
|
|
|
align: "center"
|
2019-01-03 23:30:27 +01:00
|
|
|
}
|
|
|
|
},
|
2019-02-03 14:51:54 +01:00
|
|
|
editAdd: {
|
|
|
|
show: true,
|
|
|
|
},
|
|
|
|
accent: {
|
|
|
|
show: true,
|
2019-02-16 23:27:54 +01:00
|
|
|
},
|
|
|
|
shade: {
|
|
|
|
show: true,
|
|
|
|
style: "scroll",
|
|
|
|
opacity: 0.95,
|
2019-06-05 00:26:09 +02:00
|
|
|
},
|
|
|
|
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: ""
|
2019-04-26 14:48:37 +02:00
|
|
|
},
|
|
|
|
transitional: {
|
|
|
|
show: false,
|
|
|
|
type: "timeanddate"
|
2019-01-03 23:30:27 +01:00
|
|
|
}
|
|
|
|
},
|
2019-05-23 20:15:14 +02:00
|
|
|
link: {
|
|
|
|
area: {
|
2019-06-06 19:22:42 +02:00
|
|
|
gap: 2,
|
2019-06-04 20:08:15 +02:00
|
|
|
width: 100,
|
2019-05-23 20:15:14 +02:00
|
|
|
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-04 17:14:04 +02:00
|
|
|
},
|
2019-06-06 19:22:42 +02:00
|
|
|
name: {
|
|
|
|
show: true,
|
|
|
|
size: 0.9,
|
|
|
|
},
|
|
|
|
url: {
|
|
|
|
show: true,
|
|
|
|
style: "dark"
|
2019-06-04 17:14:04 +02:00
|
|
|
},
|
2019-01-24 21:28:11 +01:00
|
|
|
},
|
2019-05-23 20:15:14 +02:00
|
|
|
show: true,
|
2019-01-03 23:30:27 +01:00
|
|
|
newTab: false,
|
2019-02-03 14:51:54 +01:00
|
|
|
edit: false,
|
2019-01-03 23:30:27 +01:00
|
|
|
style: "block",
|
|
|
|
sort: "none"
|
|
|
|
},
|
|
|
|
layout: {
|
2019-05-23 20:15:14 +02:00
|
|
|
alignment: {
|
|
|
|
horizontal: "center",
|
|
|
|
vertical: "center"
|
|
|
|
},
|
2019-06-04 20:08:15 +02:00
|
|
|
width: 80,
|
2019-05-23 20:15:14 +02:00
|
|
|
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,
|
2019-05-11 09:33:19 +02:00
|
|
|
g: 130,
|
2019-05-23 20:15:14 +02:00
|
|
|
b: 250,
|
2019-01-07 15:42:14 +01:00
|
|
|
},
|
2019-01-14 19:50:48 +01:00
|
|
|
random: {
|
|
|
|
active: false,
|
|
|
|
style: "any"
|
|
|
|
}
|
2019-04-01 17:11:39 +02:00
|
|
|
},
|
|
|
|
style: "dark"
|
2019-01-03 23:30:27 +01:00
|
|
|
},
|
2019-01-24 21:28:11 +01:00
|
|
|
background: {
|
|
|
|
image: {
|
2019-02-03 14:51:54 +01:00
|
|
|
show: false,
|
2019-01-24 21:28:11 +01:00
|
|
|
url: "../background/gray-steps.jpg",
|
|
|
|
blur: 0,
|
|
|
|
opacity: 1,
|
|
|
|
grayscale: 0,
|
2019-02-03 14:51:54 +01:00
|
|
|
accent: 0
|
2019-01-24 21:28:11 +01:00
|
|
|
}
|
|
|
|
},
|
2019-05-23 20:15:14 +02:00
|
|
|
edge: false,
|
2019-02-03 14:51:54 +01:00
|
|
|
search: false,
|
|
|
|
menu: false,
|
2019-05-11 09:33:19 +02:00
|
|
|
modal: false,
|
|
|
|
autoSuggest: false,
|
2019-01-03 23:30:27 +01:00
|
|
|
};
|
|
|
|
|
2018-12-26 08:45:53 +01:00
|
|
|
var get = function() {
|
|
|
|
return current;
|
|
|
|
};
|
|
|
|
|
2019-01-03 23:30:27 +01:00
|
|
|
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 {
|
2019-01-03 23:30:27 +01:00
|
|
|
init: init,
|
2019-02-03 14:51:54 +01:00
|
|
|
get: get
|
2018-12-26 08:45:53 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
})();
|