mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-29 17:11:52 +08:00
refactoring
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user