3
SidebarType: "mini-sidebar",
7
ColorTheme: "Cyan_Theme",
12
function getCookieValue(name) {
13
const nameString = name + "="
15
const values = document.cookie.split(";").filter(item => {
16
return item.includes(nameString)
20
for (let val in values) {
21
let is_value = values[val].split('=').filter(item => {
22
return item.replace(' ', '') === name
24
if (is_value.length) {
30
return value.substring(nameString.length, value.length).replace('=', '')
37
function initUserSettings() {
38
var Layout = getCookieValue("Layout");
40
userSettings.Layout = Layout;
42
document.cookie = "Layout="+userSettings.Layout+";path=/;"
45
var SidebarType = getCookieValue("SidebarType");
47
userSettings.SidebarType = SidebarType;
49
document.cookie = "SidebarType="+userSettings.SidebarType+";path=/;"
52
var BoxedLayout = getCookieValue("BoxedLayout");
54
userSettings.BoxedLayout = BoxedLayout;
56
document.cookie = "BoxedLayout="+userSettings.BoxedLayout+";path=/;"
59
var Direction = getCookieValue("Direction");
61
userSettings.Direction = Direction;
63
document.cookie = "Direction="+userSettings.Direction+";path=/;"
66
var Theme = getCookieValue("Theme");
68
userSettings.Theme = Theme;
70
document.cookie = "Theme="+userSettings.Theme+";path=/;"
73
var ColorTheme = getCookieValue("ColorTheme");
75
userSettings.ColorTheme = ColorTheme;
77
document.cookie = "ColorTheme="+userSettings.ColorTheme+";path=/;"
80
var cardBorder = getCookieValue("cardBorder");
82
userSettings.cardBorder = cardBorder;
84
document.cookie = "cardBorder="+userSettings.cardBorder+";path=/;"
86
var locale = getCookieValue("locale");
88
userSettings.locale = locale;
90
document.cookie = "locale="+userSettings.locale+";path=/;"