Merge branch 'master' of github.com:aeosynth/4chan-x
This commit is contained in:
commit
c0c5e5e179
@ -733,9 +733,6 @@
|
|||||||
if (!(key = keybinds.cb.keyCode(e))) {
|
if (!(key = keybinds.cb.keyCode(e))) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (key === 'BS') {
|
|
||||||
key = '';
|
|
||||||
}
|
|
||||||
thread = nav.getThread();
|
thread = nav.getThread();
|
||||||
switch (key) {
|
switch (key) {
|
||||||
case conf.close:
|
case conf.close:
|
||||||
@ -1257,7 +1254,7 @@
|
|||||||
data = e.data;
|
data = e.data;
|
||||||
if (data) {
|
if (data) {
|
||||||
$('input[name=recaptcha_response_field]', qr.el).value = '';
|
$('input[name=recaptcha_response_field]', qr.el).value = '';
|
||||||
$('#error', qr.el).textContent = data;
|
$.extend($('#error', qr.el), JSON.parse(data));
|
||||||
qr.autohide.unset();
|
qr.autohide.unset();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1353,7 +1350,7 @@
|
|||||||
THREAD_ID = g.THREAD_ID || $.x('ancestor::div[@class="thread"]/div', link).id;
|
THREAD_ID = g.THREAD_ID || $.x('ancestor::div[@class="thread"]/div', link).id;
|
||||||
spoiler = $('.postarea label') ? '<label> [<input type=checkbox name=spoiler>Spoiler Image?]</label>' : '';
|
spoiler = $('.postarea label') ? '<label> [<input type=checkbox name=spoiler>Spoiler Image?]</label>' : '';
|
||||||
challenge = $('input[name=recaptcha_challenge_field]').value;
|
challenge = $('input[name=recaptcha_challenge_field]').value;
|
||||||
html = " <div class=move> <input class=inputtext type=text name=name placeholder=Name form=qr_form> Quick Reply <input type=checkbox id=autohide title=autohide> <a name=close title=close>X</a> </div> <form name=post action=http://sys.4chan.org/" + g.BOARD + "/post method=POST enctype=multipart/form-data target=iframe id=qr_form> <input type=hidden name=resto value=" + THREAD_ID + "> <input type=hidden name=recaptcha_challenge_field value=" + challenge + "> <div><input class=inputtext type=text name=email placeholder=E-mail>" + spoiler + "</div> <div><input class=inputtext type=text name=sub placeholder=Subject><input type=submit value=" + submitValue + " id=com_submit " + submitDisabled + "><label><input type=checkbox id=auto>auto</label></div> <div><textarea class=inputtext name=com placeholder=Comment></textarea></div> <div><img src=http://www.google.com/recaptcha/api/image?c=" + challenge + "></div> <div><input class=inputtext type=text name=recaptcha_response_field placeholder=Verification required autocomplete=off></div> <div><input type=file name=upfile></div> <div><input class=inputtext type=password name=pwd maxlength=8 placeholder=Password><input type=hidden name=mode value=regist></div> </form> <div id=error class=error></div> ";
|
html = " <div class=move> <input class=inputtext type=text name=name placeholder=Name form=qr_form> Quick Reply <input type=checkbox id=autohide title=autohide> <a name=close title=close>X</a> </div> <form name=post action=http://sys.4chan.org/" + g.BOARD + "/post method=POST enctype=multipart/form-data target=iframe id=qr_form> <input type=hidden name=resto value=" + THREAD_ID + "> <input type=hidden name=recaptcha_challenge_field value=" + challenge + "> <div><input class=inputtext type=text name=email placeholder=E-mail>" + spoiler + "</div> <div><input class=inputtext type=text name=sub placeholder=Subject><input type=submit value=" + submitValue + " id=com_submit " + submitDisabled + "><label><input type=checkbox id=auto>auto</label></div> <div><textarea class=inputtext name=com placeholder=Comment></textarea></div> <div><img src=http://www.google.com/recaptcha/api/image?c=" + challenge + "></div> <div><input class=inputtext type=text name=recaptcha_response_field placeholder=Verification required autocomplete=off></div> <div><input type=file name=upfile></div> <div><input class=inputtext type=password name=pwd maxlength=8 placeholder=Password><input type=hidden name=mode value=regist></div> </form> <a id=error class=error></a> ";
|
||||||
qr.el = ui.dialog('qr', {
|
qr.el = ui.dialog('qr', {
|
||||||
top: '0px',
|
top: '0px',
|
||||||
left: '0px'
|
left: '0px'
|
||||||
@ -1391,8 +1388,16 @@
|
|||||||
in the global context.
|
in the global context.
|
||||||
*/
|
*/
|
||||||
$.globalEval(function() {
|
$.globalEval(function() {
|
||||||
var data, _ref;
|
var data, href, node, textContent, _ref;
|
||||||
data = ((_ref = document.querySelector('table font b')) != null ? _ref.firstChild.textContent : void 0) || '';
|
if (node = (_ref = document.querySelector('table font b')) != null ? _ref.firstChild : void 0) {
|
||||||
|
textContent = node.textContent, href = node.href;
|
||||||
|
data = JSON.stringify({
|
||||||
|
textContent: textContent,
|
||||||
|
href: href
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
data = '';
|
||||||
|
}
|
||||||
return parent.postMessage(data, '*');
|
return parent.postMessage(data, '*');
|
||||||
});
|
});
|
||||||
c = $('b').lastChild;
|
c = $('b').lastChild;
|
||||||
@ -2824,6 +2829,12 @@
|
|||||||
.error {\
|
.error {\
|
||||||
color: red;\
|
color: red;\
|
||||||
}\
|
}\
|
||||||
|
#error {\
|
||||||
|
cursor: default;\
|
||||||
|
}\
|
||||||
|
#error[href] {\
|
||||||
|
cursor: pointer;\
|
||||||
|
}\
|
||||||
td.replyhider {\
|
td.replyhider {\
|
||||||
vertical-align: top;\
|
vertical-align: top;\
|
||||||
}\
|
}\
|
||||||
|
|||||||
@ -521,7 +521,6 @@ keybinds =
|
|||||||
keydown: (e) ->
|
keydown: (e) ->
|
||||||
return if e.target.nodeName in ['TEXTAREA', 'INPUT'] and not e.altKey and not e.ctrlKey and not (e.keyCode is 27)
|
return if e.target.nodeName in ['TEXTAREA', 'INPUT'] and not e.altKey and not e.ctrlKey and not (e.keyCode is 27)
|
||||||
return unless key = keybinds.cb.keyCode e
|
return unless key = keybinds.cb.keyCode e
|
||||||
if key is 'BS' then key = ''
|
|
||||||
|
|
||||||
thread = nav.getThread()
|
thread = nav.getThread()
|
||||||
switch key
|
switch key
|
||||||
@ -981,7 +980,7 @@ qr =
|
|||||||
{data} = e
|
{data} = e
|
||||||
if data # error message
|
if data # error message
|
||||||
$('input[name=recaptcha_response_field]', qr.el).value = ''
|
$('input[name=recaptcha_response_field]', qr.el).value = ''
|
||||||
$('#error', qr.el).textContent = data
|
$.extend $('#error', qr.el), JSON.parse data
|
||||||
qr.autohide.unset()
|
qr.autohide.unset()
|
||||||
return
|
return
|
||||||
|
|
||||||
@ -1081,7 +1080,7 @@ qr =
|
|||||||
<div><input type=file name=upfile></div>
|
<div><input type=file name=upfile></div>
|
||||||
<div><input class=inputtext type=password name=pwd maxlength=8 placeholder=Password><input type=hidden name=mode value=regist></div>
|
<div><input class=inputtext type=password name=pwd maxlength=8 placeholder=Password><input type=hidden name=mode value=regist></div>
|
||||||
</form>
|
</form>
|
||||||
<div id=error class=error></div>
|
<a id=error class=error></a>
|
||||||
"
|
"
|
||||||
qr.el = ui.dialog 'qr', top: '0px', left: '0px', html
|
qr.el = ui.dialog 'qr', top: '0px', left: '0px', html
|
||||||
|
|
||||||
@ -1117,7 +1116,11 @@ qr =
|
|||||||
in the global context.
|
in the global context.
|
||||||
###
|
###
|
||||||
$.globalEval ->
|
$.globalEval ->
|
||||||
data = document.querySelector('table font b')?.firstChild.textContent or ''
|
if node = document.querySelector('table font b')?.firstChild
|
||||||
|
{textContent, href} = node
|
||||||
|
data = JSON.stringify {textContent, href}
|
||||||
|
else
|
||||||
|
data = ''
|
||||||
parent.postMessage data, '*'
|
parent.postMessage data, '*'
|
||||||
|
|
||||||
c = $('b').lastChild
|
c = $('b').lastChild
|
||||||
@ -2208,6 +2211,12 @@ main =
|
|||||||
.error {
|
.error {
|
||||||
color: red;
|
color: red;
|
||||||
}
|
}
|
||||||
|
#error {
|
||||||
|
cursor: default;
|
||||||
|
}
|
||||||
|
#error[href] {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
td.replyhider {
|
td.replyhider {
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user