summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rw-r--r--js/pomf.js10
1 files changed, 4 insertions, 6 deletions
diff --git a/js/pomf.js b/js/pomf.js
index 83c4813..49ff4bd 100644
--- a/js/pomf.js
+++ b/js/pomf.js
@@ -103,11 +103,12 @@ $(function() {
var totalRow = createRow('', files.humanSize, 'total');
totalRow.appendTo(uploadFiles);
+ var totalName = $('.file-name', totalRow);
+
if (files.size > MAX_SIZE) {
uploadFiles.addClass('error');
- $('.file-name', totalRow).html('onii-chan y-your upload is t-too ' +
- 'big…');
+ totalName.html('onii-chan y-your upload is t-too big…');
return;
}
@@ -123,8 +124,6 @@ $(function() {
});
};
- var totalName = $('.file-name', totalRow);
-
up.on('uploadprogress', function(e, files) {
eachRow(files, function(row, file, files) {
$('.progress-inner', row).width((file.percentUploaded * 100) + '%');
@@ -143,8 +142,7 @@ $(function() {
var res = JSON.parse(res);
if (!res.success) {
uploadFiles.addClass('error');
- $('.file-name', totalRow).text('Something went wrong; try again ' +
- 'later.');
+ totalName.text('Something went wrong; try again later.');
break;
}
eachRow(res.files, function(row, file, files) {