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.
|
* Licensed under the MIT license.
|
||||||
* https://github.com/zixaphir/appchan-x/blob/master/LICENSE
|
* https://github.com/zixaphir/appchan-x/blob/master/LICENSE
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
// ==/UserScript==
|
// ==/UserScript==
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* appchan x - Version 2.3.5 - 2013-08-20
|
* appchan x - Version 2.3.5 - 2013-08-21
|
||||||
*
|
*
|
||||||
* Licensed under the MIT license.
|
* Licensed under the MIT license.
|
||||||
* https://github.com/zixaphir/appchan-x/blob/master/LICENSE
|
* https://github.com/zixaphir/appchan-x/blob/master/LICENSE
|
||||||
@ -12136,10 +12136,10 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
Mascots[name] = imported;
|
Mascots[name] = imported;
|
||||||
$.get("userMascots", {}, function(item) {
|
$.get("userMascots", {}, function(_arg) {
|
||||||
var userMascots;
|
var userMascots;
|
||||||
|
|
||||||
userMascots = item['userMascots'];
|
userMascots = _arg.userMascots;
|
||||||
userMascots[name] = Mascots[name];
|
userMascots[name] = Mascots[name];
|
||||||
return $.set('userMascots', userMascots);
|
return $.set('userMascots', userMascots);
|
||||||
});
|
});
|
||||||
@ -15374,17 +15374,23 @@
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
$.extend(Conf, {
|
$.extend(Conf, {
|
||||||
'userThemes': [],
|
|
||||||
'userMascots': [],
|
|
||||||
'Enabled Mascots': [],
|
'Enabled Mascots': [],
|
||||||
'Enabled Mascots sfw': [],
|
'Enabled Mascots sfw': [],
|
||||||
'Enabled Mascots nsfw': [],
|
'Enabled Mascots nsfw': [],
|
||||||
'Deleted Mascots': [],
|
'Deleted Mascots': [],
|
||||||
'Hidden Categories': ["Questionable"],
|
'Hidden Categories': ["Questionable"],
|
||||||
|
'userThemes': {},
|
||||||
|
'userMascots': {},
|
||||||
'selectedArchives': {},
|
'selectedArchives': {},
|
||||||
'CachedTitles': {}
|
'CachedTitles': {}
|
||||||
});
|
});
|
||||||
return $.get(Conf, function(items) {
|
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);
|
$.extend(Conf, items);
|
||||||
return Main.initFeatures();
|
return Main.initFeatures();
|
||||||
});
|
});
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
// Generated by CoffeeScript
|
// 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.
|
* Licensed under the MIT license.
|
||||||
* https://github.com/zixaphir/appchan-x/blob/master/LICENSE
|
* https://github.com/zixaphir/appchan-x/blob/master/LICENSE
|
||||||
@ -12129,10 +12129,10 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
Mascots[name] = imported;
|
Mascots[name] = imported;
|
||||||
$.get("userMascots", {}, function(item) {
|
$.get("userMascots", {}, function(_arg) {
|
||||||
var userMascots;
|
var userMascots;
|
||||||
|
|
||||||
userMascots = item['userMascots'];
|
userMascots = _arg.userMascots;
|
||||||
userMascots[name] = Mascots[name];
|
userMascots[name] = Mascots[name];
|
||||||
return $.set('userMascots', userMascots);
|
return $.set('userMascots', userMascots);
|
||||||
});
|
});
|
||||||
@ -15359,17 +15359,23 @@
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
$.extend(Conf, {
|
$.extend(Conf, {
|
||||||
'userThemes': [],
|
|
||||||
'userMascots': [],
|
|
||||||
'Enabled Mascots': [],
|
'Enabled Mascots': [],
|
||||||
'Enabled Mascots sfw': [],
|
'Enabled Mascots sfw': [],
|
||||||
'Enabled Mascots nsfw': [],
|
'Enabled Mascots nsfw': [],
|
||||||
'Deleted Mascots': [],
|
'Deleted Mascots': [],
|
||||||
'Hidden Categories': ["Questionable"],
|
'Hidden Categories': ["Questionable"],
|
||||||
|
'userThemes': {},
|
||||||
|
'userMascots': {},
|
||||||
'selectedArchives': {},
|
'selectedArchives': {},
|
||||||
'CachedTitles': {}
|
'CachedTitles': {}
|
||||||
});
|
});
|
||||||
return $.get(Conf, function(items) {
|
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);
|
$.extend(Conf, items);
|
||||||
if (!items) {
|
if (!items) {
|
||||||
new Notice('error', $.el('span', {
|
new Notice('error', $.el('span', {
|
||||||
|
|||||||
@ -18,17 +18,20 @@ Main =
|
|||||||
Conf[db] = boards: {}
|
Conf[db] = boards: {}
|
||||||
|
|
||||||
$.extend Conf,
|
$.extend Conf,
|
||||||
'userThemes': []
|
|
||||||
'userMascots': []
|
|
||||||
'Enabled Mascots': []
|
'Enabled Mascots': []
|
||||||
'Enabled Mascots sfw': []
|
'Enabled Mascots sfw': []
|
||||||
'Enabled Mascots nsfw': []
|
'Enabled Mascots nsfw': []
|
||||||
'Deleted Mascots': []
|
'Deleted Mascots': []
|
||||||
'Hidden Categories': ["Questionable"]
|
'Hidden Categories': ["Questionable"]
|
||||||
|
'userThemes': {}
|
||||||
|
'userMascots': {}
|
||||||
'selectedArchives': {}
|
'selectedArchives': {}
|
||||||
'CachedTitles': {}
|
'CachedTitles': {}
|
||||||
|
|
||||||
$.get Conf, (items) ->
|
$.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
|
$.extend Conf, items
|
||||||
<% if (type === 'crx') { %>
|
<% if (type === 'crx') { %>
|
||||||
unless items
|
unless items
|
||||||
|
|||||||
@ -315,8 +315,7 @@ MascotTools =
|
|||||||
|
|
||||||
Mascots[name] = imported
|
Mascots[name] = imported
|
||||||
|
|
||||||
$.get "userMascots", {}, (item) ->
|
$.get "userMascots", {}, ({userMascots}) ->
|
||||||
userMascots = item['userMascots']
|
|
||||||
userMascots[name] = Mascots[name]
|
userMascots[name] = Mascots[name]
|
||||||
$.set 'userMascots', userMascots
|
$.set 'userMascots', userMascots
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user