Fix mascot and theme saving
This commit is contained in:
parent
c13b3731b7
commit
2f9e7a06d7
2
LICENSE
2
LICENSE
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* appchan x - Version 2.3.5 - 2013-08-20
|
||||
* appchan x - Version 2.3.5 - 2013-08-21
|
||||
*
|
||||
* Licensed under the MIT license.
|
||||
* https://github.com/zixaphir/appchan-x/blob/master/LICENSE
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
// ==/UserScript==
|
||||
|
||||
/*
|
||||
* appchan x - Version 2.3.5 - 2013-08-20
|
||||
* appchan x - Version 2.3.5 - 2013-08-21
|
||||
*
|
||||
* Licensed under the MIT license.
|
||||
* https://github.com/zixaphir/appchan-x/blob/master/LICENSE
|
||||
@ -12136,10 +12136,10 @@
|
||||
}
|
||||
}
|
||||
Mascots[name] = imported;
|
||||
$.get("userMascots", {}, function(item) {
|
||||
$.get("userMascots", {}, function(_arg) {
|
||||
var userMascots;
|
||||
|
||||
userMascots = item['userMascots'];
|
||||
userMascots = _arg.userMascots;
|
||||
userMascots[name] = Mascots[name];
|
||||
return $.set('userMascots', userMascots);
|
||||
});
|
||||
@ -15374,17 +15374,23 @@
|
||||
};
|
||||
}
|
||||
$.extend(Conf, {
|
||||
'userThemes': [],
|
||||
'userMascots': [],
|
||||
'Enabled Mascots': [],
|
||||
'Enabled Mascots sfw': [],
|
||||
'Enabled Mascots nsfw': [],
|
||||
'Deleted Mascots': [],
|
||||
'Hidden Categories': ["Questionable"],
|
||||
'userThemes': {},
|
||||
'userMascots': {},
|
||||
'selectedArchives': {},
|
||||
'CachedTitles': {}
|
||||
});
|
||||
return $.get(Conf, function(items) {
|
||||
if (items.userMascots instanceof Array) {
|
||||
$.set('userMascots', items.userMascots = {});
|
||||
}
|
||||
if (items.userThemes instanceof Array) {
|
||||
$.set('userThemes', items.userThemes = {});
|
||||
}
|
||||
$.extend(Conf, items);
|
||||
return Main.initFeatures();
|
||||
});
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
// Generated by CoffeeScript
|
||||
/*
|
||||
* appchan x - Version 2.3.5 - 2013-08-20
|
||||
* appchan x - Version 2.3.5 - 2013-08-21
|
||||
*
|
||||
* Licensed under the MIT license.
|
||||
* https://github.com/zixaphir/appchan-x/blob/master/LICENSE
|
||||
@ -12129,10 +12129,10 @@
|
||||
}
|
||||
}
|
||||
Mascots[name] = imported;
|
||||
$.get("userMascots", {}, function(item) {
|
||||
$.get("userMascots", {}, function(_arg) {
|
||||
var userMascots;
|
||||
|
||||
userMascots = item['userMascots'];
|
||||
userMascots = _arg.userMascots;
|
||||
userMascots[name] = Mascots[name];
|
||||
return $.set('userMascots', userMascots);
|
||||
});
|
||||
@ -15359,17 +15359,23 @@
|
||||
};
|
||||
}
|
||||
$.extend(Conf, {
|
||||
'userThemes': [],
|
||||
'userMascots': [],
|
||||
'Enabled Mascots': [],
|
||||
'Enabled Mascots sfw': [],
|
||||
'Enabled Mascots nsfw': [],
|
||||
'Deleted Mascots': [],
|
||||
'Hidden Categories': ["Questionable"],
|
||||
'userThemes': {},
|
||||
'userMascots': {},
|
||||
'selectedArchives': {},
|
||||
'CachedTitles': {}
|
||||
});
|
||||
return $.get(Conf, function(items) {
|
||||
if (items.userMascots instanceof Array) {
|
||||
$.set('userMascots', items.userMascots = {});
|
||||
}
|
||||
if (items.userThemes instanceof Array) {
|
||||
$.set('userThemes', items.userThemes = {});
|
||||
}
|
||||
$.extend(Conf, items);
|
||||
if (!items) {
|
||||
new Notice('error', $.el('span', {
|
||||
|
||||
@ -18,17 +18,20 @@ Main =
|
||||
Conf[db] = boards: {}
|
||||
|
||||
$.extend Conf,
|
||||
'userThemes': []
|
||||
'userMascots': []
|
||||
'Enabled Mascots': []
|
||||
'Enabled Mascots sfw': []
|
||||
'Enabled Mascots nsfw': []
|
||||
'Deleted Mascots': []
|
||||
'Hidden Categories': ["Questionable"]
|
||||
'userThemes': {}
|
||||
'userMascots': {}
|
||||
'selectedArchives': {}
|
||||
'CachedTitles': {}
|
||||
|
||||
$.get Conf, (items) ->
|
||||
# TempFix for accidental declaration as an array. Remove by 2.4.?
|
||||
$.set 'userMascots', items.userMascots = {} if items.userMascots instanceof Array
|
||||
$.set 'userThemes', items.userThemes = {} if items.userThemes instanceof Array
|
||||
$.extend Conf, items
|
||||
<% if (type === 'crx') { %>
|
||||
unless items
|
||||
|
||||
@ -315,8 +315,7 @@ MascotTools =
|
||||
|
||||
Mascots[name] = imported
|
||||
|
||||
$.get "userMascots", {}, (item) ->
|
||||
userMascots = item['userMascots']
|
||||
$.get "userMascots", {}, ({userMascots}) ->
|
||||
userMascots[name] = Mascots[name]
|
||||
$.set 'userMascots', userMascots
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user