2018-12-26 07:45:53 +00:00
|
|
|
var state = (function() {
|
|
|
|
|
2019-01-03 22:30:27 +00:00
|
|
|
var current = {
|
|
|
|
header: {
|
|
|
|
clock: {
|
|
|
|
hour24: true,
|
|
|
|
show: {
|
2019-01-05 20:57:21 +00:00
|
|
|
hours: true,
|
2019-02-03 13:51:54 +00:00
|
|
|
minutes: true,
|
|
|
|
seconds: true,
|
2019-01-05 22:35:50 +00:00
|
|
|
separator: true,
|
2019-01-03 22:30:27 +00:00
|
|
|
meridiem: true
|
|
|
|
}
|
|
|
|
},
|
2019-02-03 13:51:54 +00:00
|
|
|
date: {
|
|
|
|
show: {
|
|
|
|
day: false,
|
|
|
|
date: true,
|
|
|
|
month: true,
|
|
|
|
year: false,
|
|
|
|
separator: true
|
|
|
|
},
|
|
|
|
character: {
|
|
|
|
length: "short"
|
|
|
|
}
|
2019-01-03 22:30:27 +00:00
|
|
|
},
|
|
|
|
search: {
|
2019-02-03 13:51:54 +00:00
|
|
|
show: true,
|
2019-04-18 12:30:40 +00:00
|
|
|
width: {
|
|
|
|
style: "auto",
|
|
|
|
custom: 30
|
|
|
|
},
|
2019-01-24 23:21:00 +00:00
|
|
|
focus: false,
|
2019-01-03 22:30:27 +00:00
|
|
|
engine: {
|
|
|
|
selected: "google",
|
|
|
|
google: {
|
2019-04-04 14:26:52 +00:00
|
|
|
url: "https://www.google.com/search",
|
|
|
|
name: "Google"
|
2019-01-03 22:30:27 +00:00
|
|
|
},
|
|
|
|
duckduckgo: {
|
2019-04-04 14:26:52 +00:00
|
|
|
url: "https://duckduckgo.com/",
|
|
|
|
name: "Duck Duck Go"
|
2019-01-03 22:30:27 +00:00
|
|
|
},
|
2019-04-04 17:08:26 +00:00
|
|
|
youtube: {
|
|
|
|
url: "https://www.youtube.com/results?search_query=",
|
|
|
|
name: "YouTube"
|
|
|
|
},
|
2019-01-03 22:30:27 +00:00
|
|
|
giphy: {
|
2019-04-04 14:26:52 +00:00
|
|
|
url: "https://giphy.com/search/",
|
|
|
|
name: "Giphy"
|
2019-01-03 22:30:27 +00:00
|
|
|
},
|
|
|
|
custom: {
|
2019-04-04 17:08:26 +00:00
|
|
|
url: "",
|
|
|
|
name: ""
|
2019-01-03 22:30:27 +00:00
|
|
|
}
|
2019-04-18 12:30:40 +00:00
|
|
|
},
|
|
|
|
text: {
|
|
|
|
align: "left"
|
2019-01-03 22:30:27 +00:00
|
|
|
}
|
|
|
|
},
|
2019-02-03 13:51:54 +00:00
|
|
|
alignment: {
|
|
|
|
horizontal: "left",
|
|
|
|
vertical: "top"
|
|
|
|
},
|
|
|
|
editAdd: {
|
|
|
|
show: true,
|
|
|
|
},
|
|
|
|
accent: {
|
|
|
|
show: true,
|
2019-02-16 22:27:54 +00:00
|
|
|
},
|
|
|
|
shade: {
|
|
|
|
show: true,
|
2019-04-04 10:13:07 +00:00
|
|
|
padding: {
|
2019-04-04 10:15:38 +00:00
|
|
|
top: 10,
|
|
|
|
bottom: 10
|
2019-04-04 10:13:07 +00:00
|
|
|
},
|
2019-02-16 22:27:54 +00:00
|
|
|
style: "scroll",
|
|
|
|
opacity: 0.95,
|
|
|
|
border: {
|
2019-04-04 10:13:07 +00:00
|
|
|
top: {
|
|
|
|
show: false,
|
|
|
|
width: 1
|
|
|
|
},
|
|
|
|
bottom: {
|
|
|
|
show: false,
|
|
|
|
width: 1
|
|
|
|
}
|
2019-02-16 22:27:54 +00:00
|
|
|
}
|
2019-03-25 23:31:51 +00:00
|
|
|
},
|
|
|
|
greeting: {
|
|
|
|
show: false,
|
|
|
|
type: "good",
|
|
|
|
name: ""
|
2019-01-03 22:30:27 +00:00
|
|
|
}
|
|
|
|
},
|
2019-02-03 13:51:54 +00:00
|
|
|
bookmarks: {
|
2019-04-01 15:11:39 +00:00
|
|
|
link: {
|
|
|
|
show: true
|
|
|
|
},
|
|
|
|
name: {
|
|
|
|
show: true
|
|
|
|
},
|
|
|
|
url: {
|
|
|
|
show: true,
|
|
|
|
style: "dark"
|
2019-01-24 20:28:11 +00:00
|
|
|
},
|
2019-01-03 22:30:27 +00:00
|
|
|
newTab: false,
|
2019-02-03 13:51:54 +00:00
|
|
|
edit: false,
|
|
|
|
editObject: null,
|
2019-01-03 22:30:27 +00:00
|
|
|
style: "block",
|
|
|
|
sort: "none"
|
|
|
|
},
|
|
|
|
layout: {
|
2019-04-03 11:47:41 +00:00
|
|
|
width: 72,
|
2019-01-04 18:23:24 +00:00
|
|
|
scrollPastEnd: true,
|
2019-04-01 15:11:39 +00:00
|
|
|
title: "New Tab"
|
|
|
|
},
|
|
|
|
theme: {
|
|
|
|
accent: {
|
2019-01-07 14:42:14 +00:00
|
|
|
current: {
|
|
|
|
r: 0,
|
|
|
|
g: 255,
|
|
|
|
b: 0,
|
|
|
|
},
|
2019-01-14 18:50:48 +00:00
|
|
|
random: {
|
|
|
|
active: false,
|
|
|
|
style: "any"
|
|
|
|
}
|
2019-04-01 15:11:39 +00:00
|
|
|
},
|
|
|
|
style: "dark"
|
2019-01-03 22:30:27 +00:00
|
|
|
},
|
2019-01-24 20:28:11 +00:00
|
|
|
background: {
|
|
|
|
image: {
|
2019-02-03 13:51:54 +00:00
|
|
|
show: false,
|
2019-01-24 20:28:11 +00:00
|
|
|
url: "../background/gray-steps.jpg",
|
|
|
|
blur: 0,
|
|
|
|
opacity: 1,
|
|
|
|
grayscale: 0,
|
2019-02-03 13:51:54 +00:00
|
|
|
accent: 0
|
2019-01-24 20:28:11 +00:00
|
|
|
}
|
|
|
|
},
|
2019-02-03 13:51:54 +00:00
|
|
|
search: false,
|
|
|
|
menu: false,
|
|
|
|
modal: false
|
2019-01-03 22:30:27 +00:00
|
|
|
};
|
|
|
|
|
2018-12-26 07:45:53 +00:00
|
|
|
var get = function() {
|
|
|
|
return current;
|
|
|
|
};
|
|
|
|
|
2019-01-03 22:30:27 +00:00
|
|
|
var restore = function(data) {
|
|
|
|
if ("state" in data) {
|
|
|
|
current = data.state;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
var init = function() {
|
|
|
|
if (data.load()) {
|
|
|
|
restore(data.load());
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2018-12-26 07:45:53 +00:00
|
|
|
return {
|
2019-01-03 22:30:27 +00:00
|
|
|
init: init,
|
2019-02-03 13:51:54 +00:00
|
|
|
get: get
|
2018-12-26 07:45:53 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
})();
|