Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHamidreza Ghavami <hamid.r.gh.1998@gmail.com>2023-05-08 16:34:12 +0300
committerHamidreza Ghavami <hamid.r.gh.1998@gmail.com>2023-05-08 16:34:12 +0300
commitd137deccfa49fdd202dc7ce5147ad71d450c3134 (patch)
treed2b665f0cdf820cda9f69cfa767869db692bb02c /web/assets/js/util/utils.js
parent00777e3a258c19301c8b98e55b2b79df8d9585a6 (diff)
fix style height when rotating + move cookie util to their specific file
Diffstat (limited to 'web/assets/js/util/utils.js')
-rw-r--r--web/assets/js/util/utils.js15
1 files changed, 5 insertions, 10 deletions
diff --git a/web/assets/js/util/utils.js b/web/assets/js/util/utils.js
index 9c441537..28891cd4 100644
--- a/web/assets/js/util/utils.js
+++ b/web/assets/js/util/utils.js
@@ -68,13 +68,11 @@ class HttpUtil {
}
class PromiseUtil {
-
static async sleep(timeout) {
await new Promise(resolve => {
setTimeout(resolve, timeout)
});
}
-
}
const seq = [
@@ -95,7 +93,6 @@ const shortIdSeq = [
];
class RandomUtil {
-
static randomIntRange(min, max) {
return parseInt(Math.random() * (max - min) + min, 10);
}
@@ -153,8 +150,8 @@ class RandomUtil {
static randomText() {
var chars = 'abcdefghijklmnopqrstuvwxyz1234567890';
var string = '';
- var len = 6 + Math.floor(Math.random() * 5)
- for(var ii=0; ii<len; ii++){
+ var len = 6 + Math.floor(Math.random() * 5);
+ for (var ii = 0; ii < len; ii++) {
string += chars[Math.floor(Math.random() * chars.length)];
}
return string;
@@ -162,11 +159,11 @@ class RandomUtil {
static randowShortId() {
let str = '';
- str += this.randomShortIdSeq(8)
+ str += this.randomShortIdSeq(8);
return str;
}
-
- static randomShadowsocksPassword(){
+
+ static randomShadowsocksPassword() {
let array = new Uint8Array(32);
window.crypto.getRandomValues(array);
return btoa(String.fromCharCode.apply(null, array));
@@ -174,7 +171,6 @@ class RandomUtil {
}
class ObjectUtil {
-
static getPropIgnoreCase(obj, prop) {
for (const name in obj) {
if (!obj.hasOwnProperty(name)) {
@@ -322,5 +318,4 @@ class ObjectUtil {
}
return true;
}
-
}