mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-02-01 02:21:53 +08:00
web linting
This commit is contained in:
@@ -1,23 +1,23 @@
|
||||
var tools = new function() {
|
||||
var __debug = (new URL(window.location.href)).searchParams.get("debug");
|
||||
|
||||
this.makeRequest = function(method, url, callback, timeout=null) {
|
||||
var http = new XMLHttpRequest();
|
||||
http.open(method, url, true)
|
||||
http.open(method, url, true);
|
||||
http.onreadystatechange = callback;
|
||||
http.timeout = timeout ? timeout : 5000;
|
||||
http.timeout = (timeout ? timeout : 5000);
|
||||
http.send();
|
||||
return http;
|
||||
};
|
||||
|
||||
var __debug = (new URL(window.location.href)).searchParams.get("debug");
|
||||
|
||||
this.debug = function(...args) {
|
||||
if (__debug) {
|
||||
console.log("LOG/DEBUG", ...args);
|
||||
console.log("LOG/DEBUG", ...args); // eslint-disable-line no-console
|
||||
}
|
||||
};
|
||||
|
||||
this.info = (...args) => console.log("LOG/INFO", ...args);
|
||||
this.error = (...args) => console.error("LOG/ERROR", ...args);
|
||||
this.info = (...args) => console.log("LOG/INFO", ...args); // eslint-disable-line no-console
|
||||
this.error = (...args) => console.error("LOG/ERROR", ...args); // eslint-disable-line no-console
|
||||
};
|
||||
|
||||
var $ = function(id) { return document.getElementById(id); };
|
||||
var $ = (id) => document.getElementById(id);
|
||||
|
||||
Reference in New Issue
Block a user