\
\
- \
+ \
\
\
');
@@ -1816,6 +1825,9 @@
return qr.selected.el.lastChild.textContent = this.value;
});
$.on(fileInput, 'change', qr.fileInput);
+ $.on(fileInput, 'click', function(e) {
+ if (e.shiftKey) return qr.selected.rmFile() || e.preventDefault();
+ });
$.on(spoiler.firstChild, 'change', function() {
return $('input', qr.selected.el).click();
});
diff --git a/changelog b/changelog
index db392fa3b..76770c09f 100644
--- a/changelog
+++ b/changelog
@@ -3,7 +3,8 @@ master
General performance improvements.
Threads will now be updated instantly after posting through the QR.
Your own posts will not count toward the unread count after posting through the QR.
- QR thumbnails of high-res pictures will not slow down anymore.
+ Performance issues are now lessened with QR thumbnails of high-res pictures.
+ You can now use Shift+Click on the file input to remove the selected reply's file.
Reply navigation keybinds will now scroll as you navigate.
- noface
Add unique ID to filter.
diff --git a/script.coffee b/script.coffee
index f8a03c54a..37ed65d13 100644
--- a/script.coffee
+++ b/script.coffee
@@ -1327,6 +1327,13 @@ qr =
url.revokeObjectURL fileUrl
img.src = fileUrl
+ rmFile: ->
+ qr.resetFileInput()
+ delete @file
+ @el.title = null
+ @el.style.backgroundImage = null
+ $('label', @el).hidden = true if qr.spoiler
+ (window.URL or window.webkitURL).revokeObjectURL @url
select: ->
qr.selected?.el.id = null
qr.selected = @
@@ -1442,7 +1449,7 @@ qr =