From f677febb3f87096c1109be745b23a09bb55b5b51 Mon Sep 17 00:00:00 2001 From: PAN Lei Date: Thu, 26 Sep 2024 00:09:20 +0200 Subject: [PATCH] support RMX3151 --- src/workers/CommandorPage.js | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/src/workers/CommandorPage.js b/src/workers/CommandorPage.js index 3b0a334..aefdb20 100644 --- a/src/workers/CommandorPage.js +++ b/src/workers/CommandorPage.js @@ -776,19 +776,6 @@ class CommandorPage { let browserInfo = await this.page.evaluate(() => { const ua = navigator.userAgent; return ua - // let tem; - // let M = ua.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i) || []; - // if (/trident/i.test(M[1])) { - // tem = /\brv[ :]+(\d+)/g.exec(ua) || []; - // return 'IE ' + (tem[1] || ''); - // } - // if (M[1] === 'Chrome') { - // tem = ua.match(/\b(OPR|Edge)\/(\d+)/); - // if (tem != null) return tem.slice(1).join(' ').replace('OPR', 'Opera'); - // } - // M = M[2] ? [M[1], M[2]] : [navigator.appName, navigator.appVersion, '-?']; - // if ((tem = ua.match(/version\/(\d+)/i)) != null) M.splice(1, 1, tem[1]); - // return M.join(' '); }) console.log(browserInfo); // outputs: `Chrome 62` // save to mongoDb @@ -1454,6 +1441,8 @@ class CommandorPage { this.device.shell("input tap " + 385 + " " + 1930) } else if (model === "ASUS_X00QD") { this.device.shell("input tap " + 490 + " " + 1910) + } else if (model === "RMX3151") { + this.device.shell("input tap " + 492 + " " + 1960) } else if (model === "Mi Note 10") { this.device.shell("input tap " + 550 + " " + 1920) } else if (model === "ONEPLUS A6000") {