fix: detect fake imtype for qdreader cron

This commit is contained in:
2026-05-23 13:22:26 +08:00
parent 8d59be2d71
commit 7388cf8eb5
4 changed files with 42 additions and 26 deletions
+12 -5
View File
@@ -4,7 +4,7 @@
//[author: Hermes]
//[service: BOSS]
//[class: 工具类]
// [version: 2.15.1]
// [version: 2.15.2]
// [platform: web,qq,wx,tg,tb,fs,we]
// [public: false]
// [price: 0]
@@ -264,12 +264,19 @@ function maskUid(uid) {
return uid.slice(0, 2) + "***" + uid.slice(-2)
}
function contentText() {
var s = ""
function runtimeImType() {
var im = ""
try { if (typeof ImType === "function") im = ImType() || "" } catch (e) {}
try { if (!im && typeof GetImType === "function") im = GetImType() || "" } catch (e2) {}
if (lower(trim(im)) === "cron") return ""
return lower(trim(im))
}
function isSchedulerImType(im) {
im = lower(trim(im))
return im === "cron" || im === "task" || im === "fake"
}
function contentText() {
var s = ""
if (isSchedulerImType(runtimeImType())) return ""
try { if (typeof getContent === "function") s = getContent() || "" } catch (e3) {}
try { if (!s && typeof GetContent === "function") s = GetContent() || "" } catch (e4) {}
try { if (!s && typeof sender !== "undefined" && sender && sender.getContent) s = sender.getContent() || "" } catch (e5) {}
@@ -279,7 +286,7 @@ function contentText() {
}
function usage() {
return [
"启点读书签到插件 v2.15.1",
"启点读书签到插件 v2.15.2",
"【一级菜单】",
"账号管理:启点账号",
"执行查询:启点查询",