Tweaks on kfet.js

This commit is contained in:
Ludovic Stephan 2017-04-14 12:12:43 -03:00
parent de865c61aa
commit 034a661444

View file

@ -370,6 +370,8 @@ var authDialog = new UserDialog({
'content': '<div class="capslock"><span class="glyphicon glyphicon-lock"></span><input type="password" name="password" autofocus><div>',
});
//Note/TODO: the returned ajax object can be improved by allowing chaining on errors 403/400
function api_with_auth(settings, password) {
if (window.api_lock == 1)
return false;
@ -418,7 +420,7 @@ function api_with_auth(settings, password) {
});
}
String.prototype.pluralize = function(count, irreg_plural = false) {
String.prototype.pluralize = function(count, irreg_plural) {
if (Math.abs(count) >= 2)
return irreg_plural ? irreg_plural : this+'s' ;
return this ;