diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-07-12 04:12:38 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-07-12 04:12:38 +0200 |
commit | 1bc8b4885a95c6f50bae075b83ca9e5850f09a01 (patch) | |
tree | e1d0b561fc3ca5c99680f56667f266cd0e65ec0f /static/script.js | |
parent | Created events dt{start,end} now correct date. (diff) | |
download | calp-1bc8b4885a95c6f50bae075b83ca9e5850f09a01.tar.gz calp-1bc8b4885a95c6f50bae075b83ca9e5850f09a01.tar.xz |
Add deleteIndex to javascript arrays.
Diffstat (limited to 'static/script.js')
-rw-r--r-- | static/script.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/static/script.js b/static/script.js index 220451d9..0338cee5 100644 --- a/static/script.js +++ b/static/script.js @@ -1,3 +1,9 @@ +Array.prototype.deleteIndex = function(idx) { + if (idx != -1) { + this.splice(idx, 1); + } +} + /* -------------------------------------------------- */ function round_time (time, fraction) { |