mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-10-22 02:36:15 +03:00
Remove unneeded polyfill
All browsers already have native support for it.
This commit is contained in:
parent
9192c988ed
commit
e1fa7e01c6
1 changed files with 0 additions and 27 deletions
|
@ -137,33 +137,6 @@ window.qBittorrent.Misc = (function() {
|
|||
return parseFloat(value).toFixed(precision);
|
||||
};
|
||||
|
||||
/*
|
||||
* From: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString
|
||||
*/
|
||||
if (!Date.prototype.toISOString) {
|
||||
(function() {
|
||||
|
||||
function pad(number) {
|
||||
if (number < 10) {
|
||||
return '0' + number;
|
||||
}
|
||||
return number;
|
||||
}
|
||||
|
||||
Date.prototype.toISOString = function() {
|
||||
return this.getUTCFullYear()
|
||||
+ '-' + pad(this.getUTCMonth() + 1)
|
||||
+ '-' + pad(this.getUTCDate())
|
||||
+ 'T' + pad(this.getUTCHours())
|
||||
+ ':' + pad(this.getUTCMinutes())
|
||||
+ ':' + pad(this.getUTCSeconds())
|
||||
+ '.' + (this.getUTCMilliseconds() / 1000).toFixed(3).slice(2, 5)
|
||||
+ 'Z';
|
||||
};
|
||||
|
||||
}());
|
||||
}
|
||||
|
||||
/*
|
||||
* JS counterpart of the function in src/misc.cpp
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue