Add an option to click current mascot to switch between mascots.

This commit is contained in:
Zixaphir 2013-06-20 19:31:34 -07:00
parent 283a33c443
commit 8490850939
4 changed files with 14 additions and 3 deletions

View File

@ -287,6 +287,7 @@
},
Mascots: {
'Mascots': [true, 'Add a pretty picture of your waifu to Appchan.'],
'Click to Toggle': [true, 'Click your current mascot to switch between your enabled mascots.'],
'Mascot Location': ['sidebar', 'Change where your mascot is located.', ['sidebar', 'opposite']],
'Mascot Position': ['default', 'Change where your mascot is placed in relation to the post form.', ['above post form', 'default', 'bottom', 'middle']],
'Mascots Overlap Posts': [true, 'Mascots overlap threads and posts.'],
@ -10927,7 +10928,9 @@
id: "mascot",
innerHTML: "<img>"
});
$.on(this.el, 'mousedown', MascotTools.click);
if (Conf['Click to Toggle']) {
$.on(this.el, 'mousedown', MascotTools.click);
}
$.asap((function() {
return d.body;
}), function() {

View File

@ -268,6 +268,7 @@
},
Mascots: {
'Mascots': [true, 'Add a pretty picture of your waifu to Appchan.'],
'Click to Toggle': [true, 'Click your current mascot to switch between your enabled mascots.'],
'Mascot Location': ['sidebar', 'Change where your mascot is located.', ['sidebar', 'opposite']],
'Mascot Position': ['default', 'Change where your mascot is placed in relation to the post form.', ['above post form', 'default', 'bottom', 'middle']],
'Mascots Overlap Posts': [true, 'Mascots overlap threads and posts.'],
@ -10915,7 +10916,9 @@
id: "mascot",
innerHTML: "<img>"
});
$.on(this.el, 'mousedown', MascotTools.click);
if (Conf['Click to Toggle']) {
$.on(this.el, 'mousedown', MascotTools.click);
}
$.asap((function() {
return d.body;
}), function() {

View File

@ -609,6 +609,10 @@ Config =
true
'Add a pretty picture of your waifu to Appchan.'
]
'Click to Toggle': [
true
'Click your current mascot to switch between your enabled mascots.'
]
'Mascot Location': [
'sidebar'
'Change where your mascot is located.'

View File

@ -11,7 +11,8 @@ MascotTools =
id: "mascot"
innerHTML: "<img>"
$.on @el, 'mousedown', MascotTools.click
if Conf['Click to Toggle']
$.on @el, 'mousedown', MascotTools.click
$.asap (-> d.body), =>
$.add d.body, @el