Merge pull request #874 from ccd0/master

Remove some duplicated event listeners.
This commit is contained in:
Zixaphir 2015-01-28 15:20:36 -07:00
commit 9bebf8e9c7
4 changed files with 3 additions and 17 deletions

View File

@ -1,5 +1,5 @@
/*
* appchan x - Version 2.10.4 - 2015-01-26
* appchan x - Version 2.10.4 - 2015-01-27
*
* Licensed under the MIT license.
* https://github.com/zixaphir/appchan-x/blob/master/LICENSE

View File

@ -28,7 +28,7 @@
// ==/UserScript==
/*
* appchan x - Version 2.10.4 - 2015-01-26
* appchan x - Version 2.10.4 - 2015-01-27
*
* Licensed under the MIT license.
* https://github.com/zixaphir/appchan-x/blob/master/LICENSE
@ -9813,9 +9813,6 @@
if ((e.ctrlKey || e.metaKey) && e.type === 'click') {
$.addClass(QR.nodes.filename, 'edit');
QR.nodes.filename.focus();
return $.on(QR.nodes.filename, 'blur', function() {
return $.rmClass(QR.nodes.filename, 'edit');
});
}
if (e.target.nodeName === 'INPUT' || (e.keyCode && ((_ref = e.keyCode) !== 32 && _ref !== 13)) || e.ctrlKey) {
return;
@ -9971,9 +9968,6 @@
$.on(nodes[name], event, save);
}
$.on(nodes['name'], 'blur', QR.tripcodeHider);
$.on(nodes.thread, 'change', function() {
return QR.selected.save(this);
});
if (Conf['Remember QR Size']) {
$.get('QR Size', '', function(item) {
return nodes.com.style.cssText = item['QR Size'];

View File

@ -1,6 +1,6 @@
// Generated by CoffeeScript
/*
* appchan x - Version 2.10.4 - 2015-01-26
* appchan x - Version 2.10.4 - 2015-01-27
*
* Licensed under the MIT license.
* https://github.com/zixaphir/appchan-x/blob/master/LICENSE
@ -9863,9 +9863,6 @@
if ((e.ctrlKey || e.metaKey) && e.type === 'click') {
$.addClass(QR.nodes.filename, 'edit');
QR.nodes.filename.focus();
return $.on(QR.nodes.filename, 'blur', function() {
return $.rmClass(QR.nodes.filename, 'edit');
});
}
if (e.target.nodeName === 'INPUT' || (e.keyCode && ((_ref = e.keyCode) !== 32 && _ref !== 13)) || e.ctrlKey) {
return;
@ -10021,9 +10018,6 @@
$.on(nodes[name], event, save);
}
$.on(nodes['name'], 'blur', QR.tripcodeHider);
$.on(nodes.thread, 'change', function() {
return QR.selected.save(this);
});
QR.generatePostableThreadsList();
QR.persona.init();
new QR.post(true);

View File

@ -357,7 +357,6 @@ QR =
if (e.ctrlKey or e.metaKey) and e.type is 'click'
$.addClass QR.nodes.filename, 'edit'
QR.nodes.filename.focus()
return $.on QR.nodes.filename, 'blur', -> $.rmClass QR.nodes.filename, 'edit'
return if e.target.nodeName is 'INPUT' or (e.keyCode and e.keyCode not in [32, 13]) or e.ctrlKey
e.preventDefault()
QR.nodes.fileInput.click()
@ -502,7 +501,6 @@ QR =
event = if node.nodeName is 'SELECT' then 'change' else 'input'
$.on nodes[name], event, save
$.on nodes['name'], 'blur', QR.tripcodeHider
$.on nodes.thread, 'change', -> QR.selected.save @
<% if (type === 'userscript') { %>
if Conf['Remember QR Size']