From fc7bda2d4c8770186871bdaef09b0d08b896828a Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Sun, 17 Jun 2012 16:08:28 +0200 Subject: [PATCH] Enable all file types in the open file dialog for Opera. --- 4chan_x.user.js | 4 +++- script.coffee | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index 160e744e3..d2aa2d40b 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -1961,7 +1961,9 @@ QR.mimeTypes.push(''); fileInput = $('input[type=file]', QR.el); fileInput.max = $('input[name=MAX_FILE_SIZE]').value; - fileInput.accept = mimeTypes; + if ($.engine !== 'presto') { + fileInput.accept = mimeTypes; + } QR.spoiler = !!$('input[name=spoiler]'); spoiler = $('#spoilerLabel', QR.el); spoiler.hidden = !QR.spoiler; diff --git a/script.coffee b/script.coffee index 9d36f741d..44dae30e0 100644 --- a/script.coffee +++ b/script.coffee @@ -1460,7 +1460,7 @@ QR = QR.mimeTypes.push '' fileInput = $ 'input[type=file]', QR.el fileInput.max = $('input[name=MAX_FILE_SIZE]').value - fileInput.accept = mimeTypes + fileInput.accept = mimeTypes if $.engine isnt 'presto' # Opera's accept attribute is fucked up QR.spoiler = !!$ 'input[name=spoiler]' spoiler = $ '#spoilerLabel', QR.el