|
@@ -13,11 +13,12 @@ async function getDom(sel) {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
async function getDomAll(sel) {
|
|
|
for (let i = 0; i < 100; i++) {
|
|
|
let dom = document.querySelectorAll(sel);
|
|
|
console.log(dom);
|
|
|
- if (dom) {
|
|
|
+ if (dom.length > 0) {
|
|
|
return dom;
|
|
|
} else {
|
|
|
await sleep(100);
|
|
@@ -47,11 +48,13 @@ function GetQueryString(name) {
|
|
|
r = null;
|
|
|
return context == null || context === "" || context === "undefined" ? "" : decodeURI(context);
|
|
|
}
|
|
|
+
|
|
|
function getRandomInt(min, max) {
|
|
|
min = Math.ceil(min);
|
|
|
max = Math.floor(max);
|
|
|
return Math.floor(Math.random() * (max - min) + min); //The maximum is exclusive and the minimum is inclusive
|
|
|
}
|
|
|
+
|
|
|
function myCopy(inner_html) {
|
|
|
let tmpId = "tmpId123123" + getRandomInt(1, 10000);
|
|
|
let a = document.createElement('div');
|