Remove some whitelines
This commit is contained in:
parent
8518f98812
commit
a2912b94b6
13
js/imgur.js
13
js/imgur.js
@ -104,10 +104,8 @@ weechat.factory('imgur', ['$rootScope', 'settings', function($rootScope, setting
|
|||||||
};
|
};
|
||||||
|
|
||||||
if( "upload" in xhttp ) {
|
if( "upload" in xhttp ) {
|
||||||
|
|
||||||
// Set progress
|
// Set progress
|
||||||
xhttp.upload.onprogress = function (event) {
|
xhttp.upload.onprogress = function (event) {
|
||||||
|
|
||||||
// Check if we can compute progress
|
// Check if we can compute progress
|
||||||
if (event.lengthComputable) {
|
if (event.lengthComputable) {
|
||||||
// Complete in percent
|
// Complete in percent
|
||||||
@ -117,12 +115,9 @@ weechat.factory('imgur', ['$rootScope', 'settings', function($rootScope, setting
|
|||||||
currentProgressBar.style.width = complete + '%';
|
currentProgressBar.style.width = complete + '%';
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Send request with form data
|
// Send request with form data
|
||||||
xhttp.send(fd);
|
xhttp.send(fd);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Delete an image from imgur with the deletion link
|
// Delete an image from imgur with the deletion link
|
||||||
@ -156,22 +151,16 @@ weechat.factory('imgur', ['$rootScope', 'settings', function($rootScope, setting
|
|||||||
|
|
||||||
// Handler for response
|
// Handler for response
|
||||||
xhttp.onload = function() {
|
xhttp.onload = function() {
|
||||||
|
|
||||||
// Check state and response status
|
// Check state and response status
|
||||||
if(xhttp.status === 200) {
|
if(xhttp.status === 200) {
|
||||||
|
|
||||||
callback();
|
callback();
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
showErrorMsg();
|
showErrorMsg();
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// Send request with form data
|
// Send request with form data
|
||||||
xhttp.send(null);
|
xhttp.send(null);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
var showErrorMsg = function() {
|
var showErrorMsg = function() {
|
||||||
|
Loading…
Reference in New Issue
Block a user