diff options
| author | WubTheCaptain <wub@partyvan.eu> | 2015-09-19 18:40:48 +0200 |
|---|---|---|
| committer | WubTheCaptain <wub@partyvan.eu> | 2015-09-20 09:07:53 +0200 |
| commit | 287d0536213783c778a69fc9a28ba8b819384156 (patch) | |
| tree | 1f92e73edb5fd7c31908894f87ac319c1b9c7ede | |
| parent | 556c60d9027d6da1dc373d50adede97ade86d61f (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.js | 15 |
1 files changed, 10 insertions, 5 deletions
@@ -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…'); + $('.file-name', totalRow).html('onii-chan y-your upload is t-too ' + + 'big…'); 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 '…' entity is left decoded - totalName.html($('<div/>').html('onii-chan, y-your upload is t-too big…').text()); + // Terrible work-around, but necessary since otherwise the '…' + // entity is left decoded. + totalName.html($('<div/>').html('onii-chan, y-your upload is t-too ' + + 'big…').text()); break; default: uploadFiles.addClass('error completed'); |
