Fix the QR's thread select.
This commit is contained in:
parent
376a7a1218
commit
59c6b551a1
2
LICENSE
2
LICENSE
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* appchan x - Version 2.0.0 - 2013-05-05
|
* appchan x - Version 2.0.0 - 2013-05-06
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
|||||||
@ -19,7 +19,7 @@
|
|||||||
// ==/UserScript==
|
// ==/UserScript==
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* appchan x - Version 2.0.0 - 2013-05-05
|
* appchan x - Version 2.0.0 - 2013-05-06
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@ -7097,6 +7097,7 @@
|
|||||||
if (!com.value) {
|
if (!com.value) {
|
||||||
thread.value = OP.ID;
|
thread.value = OP.ID;
|
||||||
}
|
}
|
||||||
|
thread.nextElementSibling.firstElementChild.textContent = thread.options[thread.selectedIndex].textContent;
|
||||||
caretPos = com.selectionStart;
|
caretPos = com.selectionStart;
|
||||||
com.value = com.value.slice(0, caretPos) + text + com.value.slice(com.selectionEnd);
|
com.value = com.value.slice(0, caretPos) + text + com.value.slice(com.selectionEnd);
|
||||||
range = caretPos + text.length;
|
range = caretPos + text.length;
|
||||||
@ -7104,9 +7105,7 @@
|
|||||||
com.focus();
|
com.focus();
|
||||||
QR.selected.save(com);
|
QR.selected.save(com);
|
||||||
QR.selected.save(thread);
|
QR.selected.save(thread);
|
||||||
if (Conf['QR Shortcut']) {
|
return $.rmClass($('.qr-shortcut'), 'disabled');
|
||||||
return $.rmClass($('.qr-shortcut'), 'disabled');
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
characterCount: function() {
|
characterCount: function() {
|
||||||
var count, counter;
|
var count, counter;
|
||||||
@ -7776,7 +7775,7 @@
|
|||||||
for (thread in g.BOARD.threads) {
|
for (thread in g.BOARD.threads) {
|
||||||
$.add(nodes.thread, $.el('option', {
|
$.add(nodes.thread, $.el('option', {
|
||||||
value: thread,
|
value: thread,
|
||||||
textContent: "Thread No." + thread
|
textContent: "No." + thread
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
$.on(nodes.filename.parentNode, 'click keyup', QR.openFileInput);
|
$.on(nodes.filename.parentNode, 'click keyup', QR.openFileInput);
|
||||||
|
|||||||
@ -19,7 +19,7 @@
|
|||||||
// ==/UserScript==
|
// ==/UserScript==
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* appchan x - Version 2.0.0 - 2013-05-05
|
* appchan x - Version 2.0.0 - 2013-05-06
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@ -7093,6 +7093,7 @@
|
|||||||
if (!com.value) {
|
if (!com.value) {
|
||||||
thread.value = OP.ID;
|
thread.value = OP.ID;
|
||||||
}
|
}
|
||||||
|
thread.nextElementSibling.firstElementChild.textContent = thread.options[thread.selectedIndex].textContent;
|
||||||
caretPos = com.selectionStart;
|
caretPos = com.selectionStart;
|
||||||
com.value = com.value.slice(0, caretPos) + text + com.value.slice(com.selectionEnd);
|
com.value = com.value.slice(0, caretPos) + text + com.value.slice(com.selectionEnd);
|
||||||
range = caretPos + text.length;
|
range = caretPos + text.length;
|
||||||
@ -7100,9 +7101,7 @@
|
|||||||
com.focus();
|
com.focus();
|
||||||
QR.selected.save(com);
|
QR.selected.save(com);
|
||||||
QR.selected.save(thread);
|
QR.selected.save(thread);
|
||||||
if (Conf['QR Shortcut']) {
|
return $.rmClass($('.qr-shortcut'), 'disabled');
|
||||||
return $.rmClass($('.qr-shortcut'), 'disabled');
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
characterCount: function() {
|
characterCount: function() {
|
||||||
var count, counter;
|
var count, counter;
|
||||||
@ -7781,7 +7780,7 @@
|
|||||||
for (thread in g.BOARD.threads) {
|
for (thread in g.BOARD.threads) {
|
||||||
$.add(nodes.thread, $.el('option', {
|
$.add(nodes.thread, $.el('option', {
|
||||||
value: thread,
|
value: thread,
|
||||||
textContent: "Thread No." + thread
|
textContent: "No." + thread
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
$.on(nodes.filename.parentNode, 'click keyup', QR.openFileInput);
|
$.on(nodes.filename.parentNode, 'click keyup', QR.openFileInput);
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* appchan x - Version 2.0.0 - 2013-05-05
|
* appchan x - Version 2.0.0 - 2013-05-06
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@ -7095,6 +7095,7 @@
|
|||||||
if (!com.value) {
|
if (!com.value) {
|
||||||
thread.value = OP.ID;
|
thread.value = OP.ID;
|
||||||
}
|
}
|
||||||
|
thread.nextElementSibling.firstElementChild.textContent = thread.options[thread.selectedIndex].textContent;
|
||||||
caretPos = com.selectionStart;
|
caretPos = com.selectionStart;
|
||||||
com.value = com.value.slice(0, caretPos) + text + com.value.slice(com.selectionEnd);
|
com.value = com.value.slice(0, caretPos) + text + com.value.slice(com.selectionEnd);
|
||||||
range = caretPos + text.length;
|
range = caretPos + text.length;
|
||||||
@ -7102,9 +7103,7 @@
|
|||||||
com.focus();
|
com.focus();
|
||||||
QR.selected.save(com);
|
QR.selected.save(com);
|
||||||
QR.selected.save(thread);
|
QR.selected.save(thread);
|
||||||
if (Conf['QR Shortcut']) {
|
return $.rmClass($('.qr-shortcut'), 'disabled');
|
||||||
return $.rmClass($('.qr-shortcut'), 'disabled');
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
characterCount: function() {
|
characterCount: function() {
|
||||||
var count, counter;
|
var count, counter;
|
||||||
@ -7775,7 +7774,7 @@
|
|||||||
for (thread in g.BOARD.threads) {
|
for (thread in g.BOARD.threads) {
|
||||||
$.add(nodes.thread, $.el('option', {
|
$.add(nodes.thread, $.el('option', {
|
||||||
value: thread,
|
value: thread,
|
||||||
textContent: "Thread No." + thread
|
textContent: "No." + thread
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
$.on(nodes.filename.parentNode, 'click keyup', QR.openFileInput);
|
$.on(nodes.filename.parentNode, 'click keyup', QR.openFileInput);
|
||||||
|
|||||||
@ -355,6 +355,7 @@ QR =
|
|||||||
QR.cooldown.auto = true
|
QR.cooldown.auto = true
|
||||||
{com, thread} = QR.nodes
|
{com, thread} = QR.nodes
|
||||||
thread.value = OP.ID unless com.value
|
thread.value = OP.ID unless com.value
|
||||||
|
thread.nextElementSibling.firstElementChild.textContent = thread.options[thread.selectedIndex].textContent
|
||||||
|
|
||||||
caretPos = com.selectionStart
|
caretPos = com.selectionStart
|
||||||
# Replace selection for text.
|
# Replace selection for text.
|
||||||
@ -367,8 +368,7 @@ QR =
|
|||||||
QR.selected.save com
|
QR.selected.save com
|
||||||
QR.selected.save thread
|
QR.selected.save thread
|
||||||
|
|
||||||
if Conf['QR Shortcut']
|
$.rmClass $('.qr-shortcut'), 'disabled'
|
||||||
$.rmClass $('.qr-shortcut'), 'disabled'
|
|
||||||
|
|
||||||
characterCount: ->
|
characterCount: ->
|
||||||
counter = QR.nodes.charCount
|
counter = QR.nodes.charCount
|
||||||
@ -915,7 +915,7 @@ QR =
|
|||||||
for thread of g.BOARD.threads
|
for thread of g.BOARD.threads
|
||||||
$.add nodes.thread, $.el 'option',
|
$.add nodes.thread, $.el 'option',
|
||||||
value: thread
|
value: thread
|
||||||
textContent: "Thread No.#{thread}"
|
textContent: "No.#{thread}"
|
||||||
|
|
||||||
$.on nodes.filename.parentNode, 'click keyup', QR.openFileInput
|
$.on nodes.filename.parentNode, 'click keyup', QR.openFileInput
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user