diff --git a/builds/appchan-x.js b/builds/appchan-x.js index c382d06f7..c9f8fea82 100644 --- a/builds/appchan-x.js +++ b/builds/appchan-x.js @@ -12342,14 +12342,6 @@ status: $('[type=submit]', dialog), fileInput: $('[type=file]', dialog) }; - if (Conf['Remember QR Size']) { - $.get('QR.size', '', function(item) { - return nodes.com.style.cssText = item['QR.size']; - }); - $.on(nodes.com, 'mouseup', function() { - return $.set('QR.size', this.style.cssText); - }); - } mimeTypes = $('ul.rules > li').textContent.trim().match(/: (.+)/)[1].toLowerCase().replace(/\w+/g, function(type) { switch (type) { case 'jpg': @@ -12419,6 +12411,9 @@ QR.captcha.init(); Rice.nodes(dialog); $.add(d.body, dialog); + if (Conf['Auto Hide QR']) { + nodes.autohide.click(); + } return $.event('QRDialogCreation', null, dialog); }, submit: function(e) { diff --git a/builds/appchan-x.user.js b/builds/appchan-x.user.js index 6178a4d93..14a03554c 100644 --- a/builds/appchan-x.user.js +++ b/builds/appchan-x.user.js @@ -12341,14 +12341,6 @@ status: $('[type=submit]', dialog), fileInput: $('[type=file]', dialog) }; - if (Conf['Remember QR Size']) { - $.get('QR.size', '', function(item) { - return nodes.com.style.cssText = item['QR.size']; - }); - $.on(nodes.com, 'mouseup', function() { - return $.set('QR.size', this.style.cssText); - }); - } mimeTypes = $('ul.rules > li').textContent.trim().match(/: (.+)/)[1].toLowerCase().replace(/\w+/g, function(type) { switch (type) { case 'jpg': @@ -12435,6 +12427,9 @@ QR.captcha.init(); Rice.nodes(dialog); $.add(d.body, dialog); + if (Conf['Auto Hide QR']) { + nodes.autohide.click(); + } return $.event('QRDialogCreation', null, dialog); }, submit: function(e) { diff --git a/builds/appchan-x.zip b/builds/appchan-x.zip index ab3b052f6..3e92132ce 100644 Binary files a/builds/appchan-x.zip and b/builds/appchan-x.zip differ diff --git a/builds/crx.crx b/builds/crx.crx index b7bb07525..308eb7a25 100644 Binary files a/builds/crx.crx and b/builds/crx.crx differ diff --git a/builds/crx/script.js b/builds/crx/script.js index fb6a2017d..1e857c970 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -12283,14 +12283,6 @@ status: $('[type=submit]', dialog), fileInput: $('[type=file]', dialog) }; - if (Conf['Remember QR Size']) { - $.get('QR.size', '', function(item) { - return nodes.com.style.cssText = item['QR.size']; - }); - $.on(nodes.com, 'mouseup', function() { - return $.set('QR.size', this.style.cssText); - }); - } mimeTypes = $('ul.rules > li').textContent.trim().match(/: (.+)/)[1].toLowerCase().replace(/\w+/g, function(type) { switch (type) { case 'jpg': @@ -12360,6 +12352,9 @@ QR.captcha.init(); Rice.nodes(dialog); $.add(d.body, dialog); + if (Conf['Auto Hide QR']) { + nodes.autohide.click(); + } return $.event('QRDialogCreation', null, dialog); }, submit: function(e) { diff --git a/src/qr.coffee b/src/qr.coffee index 95ba12bb8..c2c6b0474 100644 --- a/src/qr.coffee +++ b/src/qr.coffee @@ -80,10 +80,13 @@ QR = QR.status() if !Conf['Remember Spoiler'] and QR.nodes.spoiler.checked QR.nodes.spoiler.click() + focusin: -> $.addClass QR.nodes.el, 'has-focus' + focusout: -> $.rmClass QR.nodes.el, 'has-focus' + hide: -> d.activeElement.blur() $.addClass QR.nodes.el, 'autohide' @@ -817,12 +820,6 @@ QR = status: $ '[type=submit]', dialog fileInput: $ '[type=file]', dialog - if Conf['Remember QR Size'] - $.get 'QR.size', '', (item) -> - nodes.com.style.cssText = item['QR.size'] - $.on nodes.com, 'mouseup', -> - $.set 'QR.size', @style.cssText - # Allow only this board's supported files. mimeTypes = $('ul.rules > li').textContent.trim().match(/: (.+)/)[1].toLowerCase().replace /\w+/g, (type) -> switch type @@ -896,7 +893,6 @@ QR = return if e.button isnt 0 $.set 'QR Size', @style.cssText <% } %> - new QR.post true QR.status() @@ -907,6 +903,9 @@ QR = $.add d.body, dialog + if Conf['Auto Hide QR'] + nodes.autohide.click() + # Create a custom event when the QR dialog is first initialized. # Use it to extend the QR's functionalities, or for XTRM RICE. $.event 'QRDialogCreation', null, dialog