diff options
author | Devaev Maxim <[email protected]> | 2018-12-18 23:25:23 +0300 |
---|---|---|
committer | Devaev Maxim <[email protected]> | 2018-12-18 23:28:08 +0300 |
commit | 3e7b5bf04908dbcf14bbeafc052bce9c51bb6b2c (patch) | |
tree | 9d7d008bb4f65769beeb2196dd7d4cae8143a169 /web/share/js/tools.js | |
parent | 8867b32356d0731dfffa2687e669cb9462f206b8 (diff) |
refactoring
Diffstat (limited to 'web/share/js/tools.js')
-rw-r--r-- | web/share/js/tools.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/web/share/js/tools.js b/web/share/js/tools.js index 80b074ee..fbd5abc6 100644 --- a/web/share/js/tools.js +++ b/web/share/js/tools.js @@ -1,6 +1,8 @@ var tools = new function() { var __debug = (new URL(window.location.href)).searchParams.get("debug"); + this.forEach = (...args) => Array.prototype.forEach.call(...args); + this.makeRequest = function(method, url, callback, body=null, content_type=null) { var http = new XMLHttpRequest(); http.open(method, url, true); @@ -134,3 +136,4 @@ var tools = new function() { var $ = (id) => document.getElementById(id); var $$ = (cls) => document.getElementsByClassName(cls); +var $$$ = (selector) => document.querySelectorAll(selector); |