summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWubTheCaptain <wub@partyvan.eu>2015-09-19 18:40:48 +0200
committerWubTheCaptain <wub@partyvan.eu>2015-09-20 09:07:53 +0200
commit287d0536213783c778a69fc9a28ba8b819384156 (patch)
tree1f92e73edb5fd7c31908894f87ac319c1b9c7ede
parent556c60d9027d6da1dc373d50adede97ade86d61f (diff)
Wrap long lines to 80 characters in length
String concatenation is used because line terminating characters are not allowed in the ECMAScript spec. Certain style guides such as Airbnb also endorse using string concatenation.
-rw-r--r--js/pomf.js15
1 files changed, 10 insertions, 5 deletions
diff --git a/js/pomf.js b/js/pomf.js
index c1d89de..7375797 100644
--- a/js/pomf.js
+++ b/js/pomf.js
@@ -84,7 +84,8 @@ $(function() {
if (files.size > MAX_SIZE) {
uploadFiles.addClass('error');
- $('.file-name', totalRow).html('onii-chan y-your upload is t-too big&hellip;');
+ $('.file-name', totalRow).html('onii-chan y-your upload is t-too ' +
+ 'big&hellip;');
return;
}
@@ -94,7 +95,8 @@ $(function() {
var hits = {};
files.forEach(function(file) {
++hits[file.name] || (hits[file.name] = 0);
- var row = $($('li[data-filename="' + escape(file.name) + '"]')[hits[file.name] || 0]);
+ var row = $($('li[data-filename="' + escape(file.name) + '"]') +
+ [hits[file.name] || 0]);
fn.call(row, row, file, files);
});
};
@@ -119,7 +121,8 @@ $(function() {
var res = JSON.parse(res);
if (!res.success) {
uploadFiles.addClass('error');
- $('.file-name', totalRow).text('Something went wrong; try again later.');
+ $('.file-name', totalRow).text('Something went wrong; try again ' +
+ 'later.');
break;
}
eachRow(res.files, function(row, file, files) {
@@ -136,8 +139,10 @@ $(function() {
break;
case 413:
uploadFiles.addClass('error completed');
- // Terrible work-around, but necessary since otherwise the '&hellip;' entity is left decoded
- totalName.html($('<div/>').html('onii-chan, y-your upload is t-too big&hellip;').text());
+ // Terrible work-around, but necessary since otherwise the '&hellip;'
+ // entity is left decoded.
+ totalName.html($('<div/>').html('onii-chan, y-your upload is t-too ' +
+ 'big&hellip;').text());
break;
default:
uploadFiles.addClass('error completed');