diff --git a/4chan_x.user.js b/4chan_x.user.js index 0309bf25f..272864146 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -6179,7 +6179,7 @@ _Class.prototype.save = function(input) { var value, _ref; value = input.value; - this[input.name] = value; + this[input.dataset.name] = value; if (input.nodeName !== 'TEXTAREA') { return; } @@ -6408,7 +6408,7 @@ }, dialog: function() { var dialog, key, mimeTypes, name, nodes, thread, threads, _i, _len, _ref, _ref1; - dialog = UI.dialog('qr', 'top:0;right:0;', "
\n \n \n ×\n
\n
\n
\n \n \n \n \n
\n
\n
\n +\n
\n
\n
\n \n \n
\n
\n \n \n
\n \n
".replace(/>\s+<')); + dialog = UI.dialog('qr', 'top:0;right:0;', "
\n \n \n ×\n
\n
\n
\n \n \n \n \n
\n
\n
\n +\n
\n
\n
\n \n \n
\n
\n \n \n
\n \n
".replace(/>\s+<')); QR.nodes = nodes = { el: dialog, move: $('.move', dialog), @@ -6416,10 +6416,10 @@ close: $('.close', dialog), form: $('form', dialog), dumpButton: $('#dump-button', dialog), - name: $('[name=name]', dialog), - email: $('[name=email]', dialog), - sub: $('[name=sub]', dialog), - com: $('[name=com]', dialog), + name: $('[data-name=name]', dialog), + email: $('[data-name=email]', dialog), + sub: $('[data-name=sub]', dialog), + com: $('[data-name=com]', dialog), addReply: $('#addReply', dialog), charCount: $('#charCount', dialog), fileInput: $('[type=file]', dialog), diff --git a/src/qr.coffee b/src/qr.coffee index bd43485de..359e92ee4 100644 --- a/src/qr.coffee +++ b/src/qr.coffee @@ -449,7 +449,7 @@ QR = QR.nodes.spoiler.checked = @spoiler save: (input) -> {value} = input - @[input.name] = value + @[input.dataset.name] = value return if input.nodeName isnt 'TEXTAREA' @nodes.span.textContent = value QR.characterCount() @@ -610,9 +610,9 @@ QR =
- - - + + +
@@ -620,7 +620,7 @@ QR =
- +
@@ -632,21 +632,21 @@ QR = """.replace />\s+<' # get rid of spaces between elements QR.nodes = nodes = - el: dialog - move: $ '.move', dialog - autohide: $ '#autohide', dialog - close: $ '.close', dialog - form: $ 'form', dialog - dumpButton: $ '#dump-button', dialog - name: $ '[name=name]', dialog - email: $ '[name=email]', dialog - sub: $ '[name=sub]', dialog - com: $ '[name=com]', dialog - addReply: $ '#addReply', dialog - charCount: $ '#charCount', dialog - fileInput: $ '[type=file]', dialog - spoiler: $ '#spoiler', dialog - status: $ '[type=submit]', dialog + el: dialog + move: $ '.move', dialog + autohide: $ '#autohide', dialog + close: $ '.close', dialog + form: $ 'form', dialog + dumpButton: $ '#dump-button', dialog + name: $ '[data-name=name]', dialog + email: $ '[data-name=email]', dialog + sub: $ '[data-name=sub]', dialog + com: $ '[data-name=com]', dialog + addReply: $ '#addReply', dialog + charCount: $ '#charCount', dialog + fileInput: $ '[type=file]', dialog + spoiler: $ '#spoiler', dialog + status: $ '[type=submit]', dialog # Allow only this board's supported files. mimeTypes = $('ul.rules > li').textContent.trim().match(/: (.+)/)[1].toLowerCase().replace /\w+/g, (type) ->