mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2024-09-22 00:06:16 +08:00
function reorder
This commit is contained in:
parent
2e72949696
commit
ac200a88d7
|
@ -129,26 +129,6 @@ function resetConfig() {
|
|||
saveConfigToCookie();
|
||||
}
|
||||
|
||||
function saveActiveTagsToCookie() {
|
||||
let tags = [];
|
||||
|
||||
try {
|
||||
db_getSnapshot().tags.forEach((tag) => {
|
||||
if (tag.active === true) {
|
||||
tags.push(tag.id);
|
||||
}
|
||||
});
|
||||
// let d = new Date();
|
||||
// d.setFullYear(d.getFullYear() + 1);
|
||||
// $.cookie("activeTags", null);
|
||||
// $.cookie("activeTags", JSON.stringify(tags), {
|
||||
// expires: d,
|
||||
// path: "/",
|
||||
// });
|
||||
Misc.setCookie("activeTags", JSON.stringify(tags), 365);
|
||||
} catch (e) {}
|
||||
}
|
||||
|
||||
function loadConfigFromCookie() {
|
||||
console.log("loading cookie config");
|
||||
// let newConfig = $.cookie("config");
|
||||
|
@ -304,6 +284,26 @@ function applyConfig(configObj) {
|
|||
updateTestModesNotice();
|
||||
}
|
||||
|
||||
function saveActiveTagsToCookie() {
|
||||
let tags = [];
|
||||
|
||||
try {
|
||||
db_getSnapshot().tags.forEach((tag) => {
|
||||
if (tag.active === true) {
|
||||
tags.push(tag.id);
|
||||
}
|
||||
});
|
||||
// let d = new Date();
|
||||
// d.setFullYear(d.getFullYear() + 1);
|
||||
// $.cookie("activeTags", null);
|
||||
// $.cookie("activeTags", JSON.stringify(tags), {
|
||||
// expires: d,
|
||||
// path: "/",
|
||||
// });
|
||||
Misc.setCookie("activeTags", JSON.stringify(tags), 365);
|
||||
} catch (e) {}
|
||||
}
|
||||
|
||||
function loadActiveTagsFromCookie() {
|
||||
// let newTags = $.cookie("activeTags");
|
||||
let newTags = Misc.getCookie("activeTags");
|
||||
|
|
Loading…
Reference in a new issue