diff --git a/4chan_x.user.js b/4chan_x.user.js index 3d59133b7..13a565cf8 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -1248,7 +1248,7 @@ return 'image/' + type; } }); - QR.file = "click here"; + QR.file = "click hereX"; QR.MAX_FILE_SIZE = $('input[name=MAX_FILE_SIZE]').value; QR.spoiler = $('.postarea label') ? ' ' : ''; if (conf['Persistent QR']) { @@ -1270,6 +1270,9 @@ $.bind($('img', div), 'click', function() { return this.previousSibling.click(); }); + $.bind($('.x', div), 'click', function() { + return $.rm(this.parentNode); + }); $.add(files, div); return file.click(); }, @@ -3496,7 +3499,6 @@ display: none;\ }\ #qr #files img {\ - display: block;\ max-height: 250px;\ max-width: 250px;\ }\ diff --git a/script.coffee b/script.coffee index 4419108cd..b4a845c9c 100644 --- a/script.coffee +++ b/script.coffee @@ -980,7 +980,7 @@ QR = 'application/' + type else 'image/' + type - QR.file = "click here" + QR.file = "click hereX" QR.MAX_FILE_SIZE = $('input[name=MAX_FILE_SIZE]').value QR.spoiler = if $('.postarea label') then ' ' else '' if conf['Persistent QR'] @@ -995,6 +995,7 @@ QR = file = $ 'input', div $.bind file, 'change', QR.change $.bind $('img', div), 'click', -> @previousSibling.click() + $.bind $('.x', div), 'click', -> $.rm @parentNode $.add files, div file.click() attach: -> @@ -2804,7 +2805,6 @@ main = display: none; } #qr #files img { - display: block; max-height: 250px; max-width: 250px; }