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: {
|
|
|
|
width: 90,
|
|
|
|
alignment: {
|
|
|
|
horizontal: "center"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
items: {
|
|
|
|
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,
|
2019-04-04 12:13:07 +02:00
|
|
|
padding: {
|
2019-05-23 20:15:14 +02:00
|
|
|
top: 0,
|
|
|
|
bottom: 0
|
2019-04-04 12:13:07 +02:00
|
|
|
},
|
2019-02-16 23:27:54 +01:00
|
|
|
style: "scroll",
|
|
|
|
opacity: 0.95,
|
|
|
|
border: {
|
2019-04-04 12:13:07 +02:00
|
|
|
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: {
|
|
|
|
width: 90,
|
|
|
|
alignment: {
|
|
|
|
horizontal: "center"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
items: {
|
|
|
|
width: 12,
|
|
|
|
alignment: {
|
|
|
|
horizontal: "left"
|
|
|
|
}
|
2019-04-01 17:11:39 +02:00
|
|
|
},
|
|
|
|
name: {
|
|
|
|
show: true
|
|
|
|
},
|
|
|
|
url: {
|
|
|
|
show: true,
|
|
|
|
style: "dark"
|
2019-01-24 21:28:11 +01:00
|
|
|
},
|
2019-05-23 20:15:14 +02:00
|
|
|
show: true,
|
|
|
|
fit: "best",
|
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"
|
|
|
|
},
|
|
|
|
width: 100,
|
|
|
|
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
|
|
|
};
|
|
|
|
|
|
|
|
})();
|