Merge pull request #182 from desuwa/qrsize
Remember the size of the QR on Firefox
This commit is contained in:
commit
1e30d8af6c
@ -118,6 +118,7 @@
|
|||||||
'Cooldown': [true, 'Prevent "flood detected" errors.'],
|
'Cooldown': [true, 'Prevent "flood detected" errors.'],
|
||||||
'Persistent QR': [false, 'The Quick reply won\'t disappear after posting.'],
|
'Persistent QR': [false, 'The Quick reply won\'t disappear after posting.'],
|
||||||
'Auto Hide QR': [true, 'Automatically hide the quick reply when posting.'],
|
'Auto Hide QR': [true, 'Automatically hide the quick reply when posting.'],
|
||||||
|
'Remember QR size': [false, 'Remember the size of the Quick reply (Firefox only).'],
|
||||||
'Remember Subject': [false, 'Remember the subject field, instead of resetting after posting.'],
|
'Remember Subject': [false, 'Remember the subject field, instead of resetting after posting.'],
|
||||||
'Remember Spoiler': [false, 'Remember the spoiler state, instead of resetting after posting.'],
|
'Remember Spoiler': [false, 'Remember the spoiler state, instead of resetting after posting.'],
|
||||||
'Hide Original Post Form': [true, 'Replace the normal post form with a shortcut to open the QR.']
|
'Hide Original Post Form': [true, 'Replace the normal post form with a shortcut to open the QR.']
|
||||||
@ -1570,7 +1571,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
dialog: function() {
|
dialog: function() {
|
||||||
var e, fileInput, input, mimeTypes, name, spoiler, thread, threads, _i, _j, _len, _len2, _ref, _ref2;
|
var e, fileInput, input, mimeTypes, name, spoiler, ta, thread, threads, _i, _j, _len, _len2, _ref, _ref2;
|
||||||
qr.el = ui.dialog('qr', 'top:0;right:0;', '\
|
qr.el = ui.dialog('qr', 'top:0;right:0;', '\
|
||||||
<div class=move>\
|
<div class=move>\
|
||||||
Quick Reply <input type=checkbox id=autohide title=Auto-hide>\
|
Quick Reply <input type=checkbox id=autohide title=Auto-hide>\
|
||||||
@ -1586,6 +1587,12 @@
|
|||||||
<label id=spoilerLabel><input type=checkbox id=spoiler> Spoiler Image</label>\
|
<label id=spoilerLabel><input type=checkbox id=spoiler> Spoiler Image</label>\
|
||||||
<div class=warning></div>\
|
<div class=warning></div>\
|
||||||
</form>');
|
</form>');
|
||||||
|
if (conf['Remember QR size'] && engine === 'gecko') {
|
||||||
|
$.on(ta = $('textarea', qr.el), 'mouseup', function() {
|
||||||
|
return $.set('qr.size', this.style.cssText);
|
||||||
|
});
|
||||||
|
ta.style.cssText = $.get('qr.size', '');
|
||||||
|
}
|
||||||
mimeTypes = $('.rules').textContent.match(/: (.+) /)[1].toLowerCase().replace(/\w+/g, function(type) {
|
mimeTypes = $('.rules').textContent.match(/: (.+) /)[1].toLowerCase().replace(/\w+/g, function(type) {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 'jpg':
|
case 'jpg':
|
||||||
|
|||||||
@ -1,4 +1,6 @@
|
|||||||
master
|
master
|
||||||
|
- desuwa
|
||||||
|
New option: remember the size of the QR on Firefox.
|
||||||
- aeosynth
|
- aeosynth
|
||||||
prevent post form flicker
|
prevent post form flicker
|
||||||
- Mayhem
|
- Mayhem
|
||||||
|
|||||||
@ -38,6 +38,7 @@ config =
|
|||||||
'Cooldown': [true, 'Prevent "flood detected" errors.']
|
'Cooldown': [true, 'Prevent "flood detected" errors.']
|
||||||
'Persistent QR': [false, 'The Quick reply won\'t disappear after posting.']
|
'Persistent QR': [false, 'The Quick reply won\'t disappear after posting.']
|
||||||
'Auto Hide QR': [true, 'Automatically hide the quick reply when posting.']
|
'Auto Hide QR': [true, 'Automatically hide the quick reply when posting.']
|
||||||
|
'Remember QR size': [false, 'Remember the size of the Quick reply (Firefox only).']
|
||||||
'Remember Subject': [false, 'Remember the subject field, instead of resetting after posting.']
|
'Remember Subject': [false, 'Remember the subject field, instead of resetting after posting.']
|
||||||
'Remember Spoiler': [false, 'Remember the spoiler state, instead of resetting after posting.']
|
'Remember Spoiler': [false, 'Remember the spoiler state, instead of resetting after posting.']
|
||||||
'Hide Original Post Form': [true, 'Replace the normal post form with a shortcut to open the QR.']
|
'Hide Original Post Form': [true, 'Replace the normal post form with a shortcut to open the QR.']
|
||||||
@ -1189,6 +1190,11 @@ qr =
|
|||||||
<div class=warning></div>
|
<div class=warning></div>
|
||||||
</form>'
|
</form>'
|
||||||
|
|
||||||
|
if conf['Remember QR size'] and engine is 'gecko'
|
||||||
|
$.on ta = $('textarea', qr.el), 'mouseup', ->
|
||||||
|
$.set 'qr.size', @style.cssText
|
||||||
|
ta.style.cssText = $.get 'qr.size', ''
|
||||||
|
|
||||||
# Allow only this board's supported files.
|
# Allow only this board's supported files.
|
||||||
mimeTypes = $('.rules').textContent.match(/: (.+) /)[1].toLowerCase().replace /\w+/g, (type) ->
|
mimeTypes = $('.rules').textContent.match(/: (.+) /)[1].toLowerCase().replace /\w+/g, (type) ->
|
||||||
switch type
|
switch type
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user