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 ) {
|
||||
|
||||
// Set progress
|
||||
xhttp.upload.onprogress = function (event) {
|
||||
|
||||
// Check if we can compute progress
|
||||
if (event.lengthComputable) {
|
||||
// Complete in percent
|
||||
@ -117,12 +115,9 @@ weechat.factory('imgur', ['$rootScope', 'settings', function($rootScope, setting
|
||||
currentProgressBar.style.width = complete + '%';
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
// Send request with form data
|
||||
xhttp.send(fd);
|
||||
|
||||
};
|
||||
|
||||
// Delete an image from imgur with the deletion link
|
||||
@ -156,22 +151,16 @@ weechat.factory('imgur', ['$rootScope', 'settings', function($rootScope, setting
|
||||
|
||||
// Handler for response
|
||||
xhttp.onload = function() {
|
||||
|
||||
// Check state and response status
|
||||
if(xhttp.status === 200) {
|
||||
|
||||
callback();
|
||||
|
||||
} else {
|
||||
showErrorMsg();
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
// Send request with form data
|
||||
xhttp.send(null);
|
||||
|
||||
};
|
||||
|
||||
var showErrorMsg = function() {
|
||||
|
Loading…
Reference in New Issue
Block a user