From 8e3abdbe7ac38788c308e672a6d1b2c96172f26b Mon Sep 17 00:00:00 2001 From: ccd0 Date: Sat, 31 Jan 2015 00:19:06 -0800 Subject: [PATCH] Read max WebM filesize from the page. --- src/Posting/QR.coffee | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Posting/QR.coffee b/src/Posting/QR.coffee index 6ced6d19a..0c6e815ad 100644 --- a/src/Posting/QR.coffee +++ b/src/Posting/QR.coffee @@ -486,7 +486,11 @@ QR = nodes.fileInput.max = $('input[name=MAX_FILE_SIZE]').value - QR.max_size_video = 3145728 + QR.max_size_video = if m = Get.scriptData().match /\bmaxWebmFilesize *= *(\d+)\b/ + +m[1] + else + +nodes.fileInput.max + QR.max_width_video = QR.max_height_video = 2048 QR.max_duration_video = 120