Why? Because I can.
This commit is contained in:
parent
a420859a97
commit
92ffb4ff8c
@ -204,7 +204,8 @@
|
|||||||
'Cooldown': [true, 'Indicate the remaining time before posting again.'],
|
'Cooldown': [true, 'Indicate the remaining time before posting again.'],
|
||||||
'Cooldown Prediction': [true, 'Decrease the cooldown time by taking into account upload speed. Disable it if it\'s inaccurate for you.'],
|
'Cooldown Prediction': [true, 'Decrease the cooldown time by taking into account upload speed. Disable it if it\'s inaccurate for you.'],
|
||||||
'Posting Success Notifications': [true, 'Show notifications on successful post creation or file uploading.'],
|
'Posting Success Notifications': [true, 'Show notifications on successful post creation or file uploading.'],
|
||||||
'Captcha Warning Notifications': [true, 'When disabled, shows a red border on the CAPTCHA input until a key is pressed instead of a notification.']
|
'Captcha Warning Notifications': [true, 'When disabled, shows a red border on the CAPTCHA input until a key is pressed instead of a notification.'],
|
||||||
|
'Dump List Before Comment': [false, 'Position of the QR\'s Dump List.']
|
||||||
},
|
},
|
||||||
'Quote Links': {
|
'Quote Links': {
|
||||||
'Quote Backlinks': [true, 'Add quote backlinks.'],
|
'Quote Backlinks': [true, 'Add quote backlinks.'],
|
||||||
@ -8043,7 +8044,7 @@
|
|||||||
title: 'Verification',
|
title: 'Verification',
|
||||||
autocomplete: 'off',
|
autocomplete: 'off',
|
||||||
spellcheck: false,
|
spellcheck: false,
|
||||||
tabIndex: 55
|
tabIndex: 45
|
||||||
});
|
});
|
||||||
this.nodes = {
|
this.nodes = {
|
||||||
challenge: $.id('recaptcha_challenge_field_holder'),
|
challenge: $.id('recaptcha_challenge_field_holder'),
|
||||||
@ -8072,7 +8073,7 @@
|
|||||||
$.on(input, 'blur', QR.focusout);
|
$.on(input, 'blur', QR.focusout);
|
||||||
$.on(input, 'focus', QR.focusin);
|
$.on(input, 'focus', QR.focusin);
|
||||||
$.addClass(QR.nodes.el, 'has-captcha');
|
$.addClass(QR.nodes.el, 'has-captcha');
|
||||||
return $.after(QR.nodes.dumpList.parentElement, [imgContainer, input]);
|
return $.after(QR.nodes.com.parentElement, [imgContainer, input]);
|
||||||
},
|
},
|
||||||
sync: function(captchas) {
|
sync: function(captchas) {
|
||||||
QR.captcha.captchas = captchas;
|
QR.captcha.captchas = captchas;
|
||||||
@ -8183,45 +8184,46 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
dialog: function() {
|
dialog: function() {
|
||||||
var dialog, elm, mimeTypes, name, nodes, thread, _i, _j, _k, _len, _len1, _len2, _ref, _ref1, _ref2;
|
var check, dialog, elm, key, mimeTypes, name, nodes, thread, value, _i, _j, _k, _len, _len1, _len2, _ref, _ref1, _ref2, _ref3;
|
||||||
|
|
||||||
dialog = UI.dialog('qr', 'top:0;right:0;', "<div id=qrtab class=move><input type=checkbox id=autohide title=Auto-hide><div id=qr-thread-select><select data-name=thread title='Create a new thread / Reply'><option value=new>New thread</option></select></div><a href=javascript:; class=close title=Close>✖</a></div><form><div class=persona><input name=name data-name=name list=\"list-name\" placeholder=Name class=field size=1 tabindex=10><input name=email data-name=email list=\"list-email\" placeholder=E-mail class=field size=1 tabindex=20><input name=sub data-name=sub list=\"list-sub\" placeholder=Subject class=field size=1 tabindex=30></div><div class=textarea><textarea data-name=com placeholder=Comment class=field tabindex=40></textarea><span id=char-count></span></div><div id=dump-list-container><div id=dump-list></div><a id=add-post href=javascript:; title=\"Add a post\" tabindex=50>+</a></div><div id=file-n-submit><span id=qr-filename-container class=field tabindex=60><span id=qr-no-file>No selected file</span><span id=qr-filename></span><span id=qr-extras-container><label id=qr-spoiler-label><input type=checkbox id=qr-file-spoiler title='Spoiler image' tabindex=70></label><span class=description>Spoiler</span><a id=dump-button title='Dump list'>+</a><span class=description>Dump</span><a id=qr-filerm href=javascript:; title='Remove file'>✖</a><span class=description>Remove File</span></span></span><input type=submit tabindex=80></div><input type=file multiple></form><datalist id=\"list-name\"></datalist><datalist id=\"list-email\"></datalist><datalist id=\"list-sub\"></datalist>");
|
|
||||||
QR.nodes = nodes = {
|
QR.nodes = nodes = {
|
||||||
el: dialog,
|
el: dialog = UI.dialog('qr', 'top:0;right:0;', "<div id=qrtab class=move><input type=checkbox id=autohide title=Auto-hide><div id=qr-thread-select><select data-name=thread title='Create a new thread / Reply'><option value=new>New thread</option></select></div><a href=javascript:; class=close title=Close>✖</a></div><form><div class=persona><input name=name data-name=name list=\"list-name\" placeholder=Name class=field size=1 tabindex=10><input name=email data-name=email list=\"list-email\" placeholder=E-mail class=field size=1 tabindex=20><input name=sub data-name=sub list=\"list-sub\" placeholder=Subject class=field size=1 tabindex=30></div><div class=textarea><textarea data-name=com placeholder=Comment class=field tabindex=40></textarea><span id=char-count></span></div><div id=dump-list-container><div id=dump-list></div><a id=add-post href=javascript:; title=\"Add a post\" tabindex=50>+</a></div><div id=file-n-submit><span id=qr-filename-container class=field tabindex=60><span id=qr-no-file>No selected file</span><span id=qr-filename></span><span id=qr-extras-container><label id=qr-spoiler-label><input type=checkbox id=qr-file-spoiler title='Spoiler image' tabindex=70></label><span class=description>Spoiler</span><a id=dump-button title='Dump list'>+</a><span class=description>Dump</span><a id=qr-filerm href=javascript:; title='Remove file'>✖</a><span class=description>Remove File</span></span></span><input type=submit tabindex=80></div><input type=file multiple></form><datalist id=\"list-name\"></datalist><datalist id=\"list-email\"></datalist><datalist id=\"list-sub\"></datalist>")
|
||||||
move: $('.move', dialog),
|
};
|
||||||
autohide: $('#autohide', dialog),
|
_ref = {
|
||||||
thread: $('select', dialog),
|
move: '.move',
|
||||||
threadPar: $('#qr-thread-select', dialog),
|
autohide: '#autohide',
|
||||||
close: $('.close', dialog),
|
thread: 'select',
|
||||||
form: $('form', dialog),
|
threadPar: '#qr-thread-select',
|
||||||
dumpButton: $('#dump-button', dialog),
|
close: '.close',
|
||||||
name: $('[data-name=name]', dialog),
|
form: 'form',
|
||||||
email: $('[data-name=email]', dialog),
|
dumpButton: '#dump-button',
|
||||||
sub: $('[data-name=sub]', dialog),
|
name: '[data-name=name]',
|
||||||
com: $('[data-name=com]', dialog),
|
email: '[data-name=email]',
|
||||||
dumpList: $('#dump-list', dialog),
|
sub: '[data-name=sub]',
|
||||||
addPost: $('#add-post', dialog),
|
com: '[data-name=com]',
|
||||||
charCount: $('#char-count', dialog),
|
dumpList: '#dump-list',
|
||||||
fileSubmit: $('#file-n-submit', dialog),
|
addPost: '#add-post',
|
||||||
filename: $('#qr-filename', dialog),
|
charCount: '#char-count',
|
||||||
fileRM: $('#qr-filerm', dialog),
|
fileSubmit: '#file-n-submit',
|
||||||
fileExtras: $('#qr-extras-container', dialog),
|
filename: '#qr-filename',
|
||||||
spoiler: $('#qr-file-spoiler', dialog),
|
fileRM: '#qr-filerm',
|
||||||
spoilerPar: $('#qr-spoiler-label', dialog),
|
fileExtras: '#qr-extras-container',
|
||||||
status: $('[type=submit]', dialog),
|
spoiler: '#qr-file-spoiler',
|
||||||
fileInput: $('[type=file]', dialog)
|
spoilerPar: '#qr-spoiler-label',
|
||||||
|
status: '[type=submit]',
|
||||||
|
fileInput: '[type=file]'
|
||||||
|
};
|
||||||
|
for (key in _ref) {
|
||||||
|
value = _ref[key];
|
||||||
|
nodes[key] = $(value, dialog);
|
||||||
|
}
|
||||||
|
check = {
|
||||||
|
jpg: 'image/jpeg',
|
||||||
|
pdf: 'application/pdf',
|
||||||
|
swf: 'application/x-shockwave-flash'
|
||||||
};
|
};
|
||||||
mimeTypes = $('ul.rules > li').textContent.trim().match(/: (.+)/)[1].toLowerCase().replace(/\w+/g, function(type) {
|
mimeTypes = $('ul.rules > li').textContent.trim().match(/: (.+)/)[1].toLowerCase().replace(/\w+/g, function(type) {
|
||||||
switch (type) {
|
return check[type] || ("image/" + type);
|
||||||
case 'jpg':
|
|
||||||
return 'image/jpeg';
|
|
||||||
case 'pdf':
|
|
||||||
return 'application/pdf';
|
|
||||||
case 'swf':
|
|
||||||
return 'application/x-shockwave-flash';
|
|
||||||
default:
|
|
||||||
return "image/" + type;
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
QR.mimeTypes = mimeTypes.split(', ');
|
QR.mimeTypes = mimeTypes.split(', ');
|
||||||
QR.mimeTypes.push('');
|
QR.mimeTypes.push('');
|
||||||
@ -8232,6 +8234,10 @@
|
|||||||
} else {
|
} else {
|
||||||
nodes.spoiler.parentElement.hidden = true;
|
nodes.spoiler.parentElement.hidden = true;
|
||||||
}
|
}
|
||||||
|
if (Conf['Dump List Before Comment']) {
|
||||||
|
$.after(nodes.name.parentElement, nodes.dumpList.parentElement);
|
||||||
|
nodes.addPost.tabIndex = 35;
|
||||||
|
}
|
||||||
if (g.BOARD.ID === 'f') {
|
if (g.BOARD.ID === 'f') {
|
||||||
nodes.flashTag = $.el('select', {
|
nodes.flashTag = $.el('select', {
|
||||||
name: 'filetag',
|
name: 'filetag',
|
||||||
@ -8246,9 +8252,9 @@
|
|||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
$.on(nodes.filename.parentNode, 'click keyup', QR.openFileInput);
|
$.on(nodes.filename.parentNode, 'click keyup', QR.openFileInput);
|
||||||
_ref = $$('*', QR.nodes.el);
|
_ref1 = $$('*', QR.nodes.el);
|
||||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
|
||||||
elm = _ref[_i];
|
elm = _ref1[_i];
|
||||||
$.on(elm, 'blur', QR.focusout);
|
$.on(elm, 'blur', QR.focusout);
|
||||||
$.on(elm, 'focus', QR.focusin);
|
$.on(elm, 'focus', QR.focusin);
|
||||||
}
|
}
|
||||||
@ -8273,14 +8279,14 @@
|
|||||||
return QR.selected.nodes.spoiler.click();
|
return QR.selected.nodes.spoiler.click();
|
||||||
});
|
});
|
||||||
$.on(nodes.fileInput, 'change', QR.fileInput);
|
$.on(nodes.fileInput, 'change', QR.fileInput);
|
||||||
_ref1 = ['spoilerPar', 'dumpButton', 'fileRM'];
|
_ref2 = ['spoilerPar', 'dumpButton', 'fileRM'];
|
||||||
for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
|
for (_j = 0, _len1 = _ref2.length; _j < _len1; _j++) {
|
||||||
name = _ref1[_j];
|
name = _ref2[_j];
|
||||||
$.on(nodes[name], 'mouseover', QR.mouseover);
|
$.on(nodes[name], 'mouseover', QR.mouseover);
|
||||||
}
|
}
|
||||||
_ref2 = ['name', 'email', 'sub', 'com'];
|
_ref3 = ['name', 'email', 'sub', 'com'];
|
||||||
for (_k = 0, _len2 = _ref2.length; _k < _len2; _k++) {
|
for (_k = 0, _len2 = _ref3.length; _k < _len2; _k++) {
|
||||||
name = _ref2[_k];
|
name = _ref3[_k];
|
||||||
$.on(nodes[name], 'input', function() {
|
$.on(nodes[name], 'input', function() {
|
||||||
return QR.selected.save(this);
|
return QR.selected.save(this);
|
||||||
});
|
});
|
||||||
|
|||||||
@ -187,7 +187,8 @@
|
|||||||
'Cooldown': [true, 'Indicate the remaining time before posting again.'],
|
'Cooldown': [true, 'Indicate the remaining time before posting again.'],
|
||||||
'Cooldown Prediction': [true, 'Decrease the cooldown time by taking into account upload speed. Disable it if it\'s inaccurate for you.'],
|
'Cooldown Prediction': [true, 'Decrease the cooldown time by taking into account upload speed. Disable it if it\'s inaccurate for you.'],
|
||||||
'Posting Success Notifications': [true, 'Show notifications on successful post creation or file uploading.'],
|
'Posting Success Notifications': [true, 'Show notifications on successful post creation or file uploading.'],
|
||||||
'Captcha Warning Notifications': [true, 'When disabled, shows a red border on the CAPTCHA input until a key is pressed instead of a notification.']
|
'Captcha Warning Notifications': [true, 'When disabled, shows a red border on the CAPTCHA input until a key is pressed instead of a notification.'],
|
||||||
|
'Dump List Before Comment': [false, 'Position of the QR\'s Dump List.']
|
||||||
},
|
},
|
||||||
'Quote Links': {
|
'Quote Links': {
|
||||||
'Quote Backlinks': [true, 'Add quote backlinks.'],
|
'Quote Backlinks': [true, 'Add quote backlinks.'],
|
||||||
@ -8045,7 +8046,7 @@
|
|||||||
title: 'Verification',
|
title: 'Verification',
|
||||||
autocomplete: 'off',
|
autocomplete: 'off',
|
||||||
spellcheck: false,
|
spellcheck: false,
|
||||||
tabIndex: 55
|
tabIndex: 45
|
||||||
});
|
});
|
||||||
this.nodes = {
|
this.nodes = {
|
||||||
challenge: $.id('recaptcha_challenge_field_holder'),
|
challenge: $.id('recaptcha_challenge_field_holder'),
|
||||||
@ -8072,7 +8073,7 @@
|
|||||||
$.sync('captchas', this.sync);
|
$.sync('captchas', this.sync);
|
||||||
this.reload();
|
this.reload();
|
||||||
$.addClass(QR.nodes.el, 'has-captcha');
|
$.addClass(QR.nodes.el, 'has-captcha');
|
||||||
return $.after(QR.nodes.dumpList.parentElement, [imgContainer, input]);
|
return $.after(QR.nodes.com.parentElement, [imgContainer, input]);
|
||||||
},
|
},
|
||||||
sync: function(captchas) {
|
sync: function(captchas) {
|
||||||
QR.captcha.captchas = captchas;
|
QR.captcha.captchas = captchas;
|
||||||
@ -8183,45 +8184,46 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
dialog: function() {
|
dialog: function() {
|
||||||
var dialog, mimeTypes, name, nodes, thread, _i, _j, _len, _len1, _ref, _ref1;
|
var check, dialog, key, mimeTypes, name, nodes, thread, value, _i, _j, _len, _len1, _ref, _ref1, _ref2;
|
||||||
|
|
||||||
dialog = UI.dialog('qr', 'top:0;right:0;', "<div id=qrtab class=move><input type=checkbox id=autohide title=Auto-hide><div id=qr-thread-select><select data-name=thread title='Create a new thread / Reply'><option value=new>New thread</option></select></div><a href=javascript:; class=close title=Close>✖</a></div><form><div class=persona><input name=name data-name=name list=\"list-name\" placeholder=Name class=field size=1 tabindex=10><input name=email data-name=email list=\"list-email\" placeholder=E-mail class=field size=1 tabindex=20><input name=sub data-name=sub list=\"list-sub\" placeholder=Subject class=field size=1 tabindex=30></div><div class=textarea><textarea data-name=com placeholder=Comment class=field tabindex=40></textarea><span id=char-count></span></div><div id=dump-list-container><div id=dump-list></div><a id=add-post href=javascript:; title=\"Add a post\" tabindex=50>+</a></div><div id=file-n-submit><span id=qr-filename-container class=field tabindex=60><span id=qr-no-file>No selected file</span><span id=qr-filename></span><span id=qr-extras-container><label id=qr-spoiler-label><input type=checkbox id=qr-file-spoiler title='Spoiler image' tabindex=70></label><span class=description>Spoiler</span><a id=dump-button title='Dump list'>+</a><span class=description>Dump</span><a id=qr-filerm href=javascript:; title='Remove file'>✖</a><span class=description>Remove File</span></span></span><input type=submit tabindex=80></div><input type=file multiple></form><datalist id=\"list-name\"></datalist><datalist id=\"list-email\"></datalist><datalist id=\"list-sub\"></datalist>");
|
|
||||||
QR.nodes = nodes = {
|
QR.nodes = nodes = {
|
||||||
el: dialog,
|
el: dialog = UI.dialog('qr', 'top:0;right:0;', "<div id=qrtab class=move><input type=checkbox id=autohide title=Auto-hide><div id=qr-thread-select><select data-name=thread title='Create a new thread / Reply'><option value=new>New thread</option></select></div><a href=javascript:; class=close title=Close>✖</a></div><form><div class=persona><input name=name data-name=name list=\"list-name\" placeholder=Name class=field size=1 tabindex=10><input name=email data-name=email list=\"list-email\" placeholder=E-mail class=field size=1 tabindex=20><input name=sub data-name=sub list=\"list-sub\" placeholder=Subject class=field size=1 tabindex=30></div><div class=textarea><textarea data-name=com placeholder=Comment class=field tabindex=40></textarea><span id=char-count></span></div><div id=dump-list-container><div id=dump-list></div><a id=add-post href=javascript:; title=\"Add a post\" tabindex=50>+</a></div><div id=file-n-submit><span id=qr-filename-container class=field tabindex=60><span id=qr-no-file>No selected file</span><span id=qr-filename></span><span id=qr-extras-container><label id=qr-spoiler-label><input type=checkbox id=qr-file-spoiler title='Spoiler image' tabindex=70></label><span class=description>Spoiler</span><a id=dump-button title='Dump list'>+</a><span class=description>Dump</span><a id=qr-filerm href=javascript:; title='Remove file'>✖</a><span class=description>Remove File</span></span></span><input type=submit tabindex=80></div><input type=file multiple></form><datalist id=\"list-name\"></datalist><datalist id=\"list-email\"></datalist><datalist id=\"list-sub\"></datalist>")
|
||||||
move: $('.move', dialog),
|
};
|
||||||
autohide: $('#autohide', dialog),
|
_ref = {
|
||||||
thread: $('select', dialog),
|
move: '.move',
|
||||||
threadPar: $('#qr-thread-select', dialog),
|
autohide: '#autohide',
|
||||||
close: $('.close', dialog),
|
thread: 'select',
|
||||||
form: $('form', dialog),
|
threadPar: '#qr-thread-select',
|
||||||
dumpButton: $('#dump-button', dialog),
|
close: '.close',
|
||||||
name: $('[data-name=name]', dialog),
|
form: 'form',
|
||||||
email: $('[data-name=email]', dialog),
|
dumpButton: '#dump-button',
|
||||||
sub: $('[data-name=sub]', dialog),
|
name: '[data-name=name]',
|
||||||
com: $('[data-name=com]', dialog),
|
email: '[data-name=email]',
|
||||||
dumpList: $('#dump-list', dialog),
|
sub: '[data-name=sub]',
|
||||||
addPost: $('#add-post', dialog),
|
com: '[data-name=com]',
|
||||||
charCount: $('#char-count', dialog),
|
dumpList: '#dump-list',
|
||||||
fileSubmit: $('#file-n-submit', dialog),
|
addPost: '#add-post',
|
||||||
filename: $('#qr-filename', dialog),
|
charCount: '#char-count',
|
||||||
fileRM: $('#qr-filerm', dialog),
|
fileSubmit: '#file-n-submit',
|
||||||
fileExtras: $('#qr-extras-container', dialog),
|
filename: '#qr-filename',
|
||||||
spoiler: $('#qr-file-spoiler', dialog),
|
fileRM: '#qr-filerm',
|
||||||
spoilerPar: $('#qr-spoiler-label', dialog),
|
fileExtras: '#qr-extras-container',
|
||||||
status: $('[type=submit]', dialog),
|
spoiler: '#qr-file-spoiler',
|
||||||
fileInput: $('[type=file]', dialog)
|
spoilerPar: '#qr-spoiler-label',
|
||||||
|
status: '[type=submit]',
|
||||||
|
fileInput: '[type=file]'
|
||||||
|
};
|
||||||
|
for (key in _ref) {
|
||||||
|
value = _ref[key];
|
||||||
|
nodes[key] = $(value, dialog);
|
||||||
|
}
|
||||||
|
check = {
|
||||||
|
jpg: 'image/jpeg',
|
||||||
|
pdf: 'application/pdf',
|
||||||
|
swf: 'application/x-shockwave-flash'
|
||||||
};
|
};
|
||||||
mimeTypes = $('ul.rules > li').textContent.trim().match(/: (.+)/)[1].toLowerCase().replace(/\w+/g, function(type) {
|
mimeTypes = $('ul.rules > li').textContent.trim().match(/: (.+)/)[1].toLowerCase().replace(/\w+/g, function(type) {
|
||||||
switch (type) {
|
return check[type] || ("image/" + type);
|
||||||
case 'jpg':
|
|
||||||
return 'image/jpeg';
|
|
||||||
case 'pdf':
|
|
||||||
return 'application/pdf';
|
|
||||||
case 'swf':
|
|
||||||
return 'application/x-shockwave-flash';
|
|
||||||
default:
|
|
||||||
return "image/" + type;
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
QR.mimeTypes = mimeTypes.split(', ');
|
QR.mimeTypes = mimeTypes.split(', ');
|
||||||
QR.mimeTypes.push('');
|
QR.mimeTypes.push('');
|
||||||
@ -8232,6 +8234,10 @@
|
|||||||
} else {
|
} else {
|
||||||
nodes.spoiler.parentElement.hidden = true;
|
nodes.spoiler.parentElement.hidden = true;
|
||||||
}
|
}
|
||||||
|
if (Conf['Dump List Before Comment']) {
|
||||||
|
$.after(nodes.name.parentElement, nodes.dumpList.parentElement);
|
||||||
|
nodes.addPost.tabIndex = 35;
|
||||||
|
}
|
||||||
if (g.BOARD.ID === 'f') {
|
if (g.BOARD.ID === 'f') {
|
||||||
nodes.flashTag = $.el('select', {
|
nodes.flashTag = $.el('select', {
|
||||||
name: 'filetag',
|
name: 'filetag',
|
||||||
@ -8267,14 +8273,14 @@
|
|||||||
return QR.selected.nodes.spoiler.click();
|
return QR.selected.nodes.spoiler.click();
|
||||||
});
|
});
|
||||||
$.on(nodes.fileInput, 'change', QR.fileInput);
|
$.on(nodes.fileInput, 'change', QR.fileInput);
|
||||||
_ref = ['spoilerPar', 'dumpButton', 'fileRM'];
|
_ref1 = ['spoilerPar', 'dumpButton', 'fileRM'];
|
||||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
|
||||||
name = _ref[_i];
|
name = _ref1[_i];
|
||||||
$.on(nodes[name], 'mouseover', QR.mouseover);
|
$.on(nodes[name], 'mouseover', QR.mouseover);
|
||||||
}
|
}
|
||||||
_ref1 = ['name', 'email', 'sub', 'com'];
|
_ref2 = ['name', 'email', 'sub', 'com'];
|
||||||
for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
|
for (_j = 0, _len1 = _ref2.length; _j < _len1; _j++) {
|
||||||
name = _ref1[_j];
|
name = _ref2[_j];
|
||||||
$.on(nodes[name], 'input', function() {
|
$.on(nodes[name], 'input', function() {
|
||||||
return QR.selected.save(this);
|
return QR.selected.save(this);
|
||||||
});
|
});
|
||||||
|
|||||||
@ -297,6 +297,10 @@ Config =
|
|||||||
true
|
true
|
||||||
'When disabled, shows a red border on the CAPTCHA input until a key is pressed instead of a notification.'
|
'When disabled, shows a red border on the CAPTCHA input until a key is pressed instead of a notification.'
|
||||||
]
|
]
|
||||||
|
'Dump List Before Comment': [
|
||||||
|
false
|
||||||
|
'Position of the QR\'s Dump List.'
|
||||||
|
]
|
||||||
|
|
||||||
'Quote Links':
|
'Quote Links':
|
||||||
'Quote Backlinks': [
|
'Quote Backlinks': [
|
||||||
|
|||||||
@ -45,8 +45,8 @@ QR =
|
|||||||
initReady: ->
|
initReady: ->
|
||||||
QR.postingIsEnabled = !!$.id 'postForm'
|
QR.postingIsEnabled = !!$.id 'postForm'
|
||||||
unless QR.postingIsEnabled
|
unless QR.postingIsEnabled
|
||||||
return
|
return
|
||||||
|
|
||||||
$.on d, 'QRGetSelectedPost', ({detail: cb}) ->
|
$.on d, 'QRGetSelectedPost', ({detail: cb}) ->
|
||||||
cb QR.selected
|
cb QR.selected
|
||||||
$.on d, 'QRAddPreSubmitHook', ({detail: cb}) ->
|
$.on d, 'QRAddPreSubmitHook', ({detail: cb}) ->
|
||||||
@ -757,7 +757,7 @@ QR =
|
|||||||
title: 'Verification'
|
title: 'Verification'
|
||||||
autocomplete: 'off'
|
autocomplete: 'off'
|
||||||
spellcheck: false
|
spellcheck: false
|
||||||
tabIndex: 55
|
tabIndex: 45
|
||||||
@nodes =
|
@nodes =
|
||||||
challenge: $.id 'recaptcha_challenge_field_holder'
|
challenge: $.id 'recaptcha_challenge_field_holder'
|
||||||
img: imgContainer.firstChild
|
img: imgContainer.firstChild
|
||||||
@ -785,7 +785,7 @@ QR =
|
|||||||
<% } %>
|
<% } %>
|
||||||
|
|
||||||
$.addClass QR.nodes.el, 'has-captcha'
|
$.addClass QR.nodes.el, 'has-captcha'
|
||||||
$.after QR.nodes.dumpList.parentElement, [imgContainer, input]
|
$.after QR.nodes.com.parentElement, [imgContainer, input]
|
||||||
|
|
||||||
sync: (captchas) ->
|
sync: (captchas) ->
|
||||||
QR.captcha.captchas = captchas
|
QR.captcha.captchas = captchas
|
||||||
@ -864,46 +864,44 @@ QR =
|
|||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
|
|
||||||
dialog: ->
|
dialog: ->
|
||||||
dialog = UI.dialog 'qr', 'top:0;right:0;', """
|
|
||||||
<%= grunt.file.read('src/General/html/Features/QuickReply.html').replace(/>\s+</g, '><').trim() %>
|
|
||||||
"""
|
|
||||||
|
|
||||||
QR.nodes = nodes =
|
QR.nodes = nodes =
|
||||||
el: dialog
|
el:
|
||||||
move: $ '.move', dialog
|
dialog = UI.dialog 'qr', 'top:0;right:0;', """<%= grunt.file.read('src/General/html/Features/QuickReply.html').replace(/>\s+</g, '><').trim() %>"""
|
||||||
autohide: $ '#autohide', dialog
|
|
||||||
thread: $ 'select', dialog
|
nodes[key] = $ value, dialog for key, value of {
|
||||||
threadPar: $ '#qr-thread-select', dialog
|
move: '.move'
|
||||||
close: $ '.close', dialog
|
autohide: '#autohide'
|
||||||
form: $ 'form', dialog
|
thread: 'select'
|
||||||
dumpButton: $ '#dump-button', dialog
|
threadPar: '#qr-thread-select'
|
||||||
name: $ '[data-name=name]', dialog
|
close: '.close'
|
||||||
email: $ '[data-name=email]', dialog
|
form: 'form'
|
||||||
sub: $ '[data-name=sub]', dialog
|
dumpButton: '#dump-button'
|
||||||
com: $ '[data-name=com]', dialog
|
name: '[data-name=name]'
|
||||||
dumpList: $ '#dump-list', dialog
|
email: '[data-name=email]'
|
||||||
addPost: $ '#add-post', dialog
|
sub: '[data-name=sub]'
|
||||||
charCount: $ '#char-count', dialog
|
com: '[data-name=com]'
|
||||||
fileSubmit: $ '#file-n-submit', dialog
|
dumpList: '#dump-list'
|
||||||
filename: $ '#qr-filename', dialog
|
addPost: '#add-post'
|
||||||
fileRM: $ '#qr-filerm', dialog
|
charCount: '#char-count'
|
||||||
fileExtras: $ '#qr-extras-container', dialog
|
fileSubmit: '#file-n-submit'
|
||||||
spoiler: $ '#qr-file-spoiler', dialog
|
filename: '#qr-filename'
|
||||||
spoilerPar: $ '#qr-spoiler-label', dialog
|
fileRM: '#qr-filerm'
|
||||||
status: $ '[type=submit]', dialog
|
fileExtras: '#qr-extras-container'
|
||||||
fileInput: $ '[type=file]', dialog
|
spoiler: '#qr-file-spoiler'
|
||||||
|
spoilerPar: '#qr-spoiler-label'
|
||||||
|
status: '[type=submit]'
|
||||||
|
fileInput: '[type=file]'
|
||||||
|
}
|
||||||
|
|
||||||
|
check =
|
||||||
|
jpg: 'image/jpeg'
|
||||||
|
pdf: 'application/pdf'
|
||||||
|
swf: 'application/x-shockwave-flash'
|
||||||
|
|
||||||
# Allow only this board's supported files.
|
# Allow only this board's supported files.
|
||||||
mimeTypes = $('ul.rules > li').textContent.trim().match(/: (.+)/)[1].toLowerCase().replace /\w+/g, (type) ->
|
mimeTypes = $('ul.rules > li').textContent.trim().match(/: (.+)/)[1].toLowerCase().replace /\w+/g, (type) ->
|
||||||
switch type
|
check[type] or "image/#{type}"
|
||||||
when 'jpg'
|
|
||||||
'image/jpeg'
|
|
||||||
when 'pdf'
|
|
||||||
'application/pdf'
|
|
||||||
when 'swf'
|
|
||||||
'application/x-shockwave-flash'
|
|
||||||
else
|
|
||||||
"image/#{type}"
|
|
||||||
QR.mimeTypes = mimeTypes.split ', '
|
QR.mimeTypes = mimeTypes.split ', '
|
||||||
# Add empty mimeType to avoid errors with URLs selected in Window's file dialog.
|
# Add empty mimeType to avoid errors with URLs selected in Window's file dialog.
|
||||||
QR.mimeTypes.push ''
|
QR.mimeTypes.push ''
|
||||||
@ -915,6 +913,10 @@ QR =
|
|||||||
else
|
else
|
||||||
nodes.spoiler.parentElement.hidden = true
|
nodes.spoiler.parentElement.hidden = true
|
||||||
|
|
||||||
|
if Conf['Dump List Before Comment']
|
||||||
|
$.after nodes.name.parentElement, nodes.dumpList.parentElement
|
||||||
|
nodes.addPost.tabIndex = 35
|
||||||
|
|
||||||
if g.BOARD.ID is 'f'
|
if g.BOARD.ID is 'f'
|
||||||
nodes.flashTag = $.el 'select',
|
nodes.flashTag = $.el 'select',
|
||||||
name: 'filetag'
|
name: 'filetag'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user