Merge remote-tracking branch 'origin/master'

This commit is contained in:
Kokomi 2023-05-31 03:21:38 +08:00
commit 8d6efa7666
4 changed files with 6 additions and 3 deletions

View File

@ -246,7 +246,10 @@ class PluginsLoader {
/** 判断事件 */
if (v.event && !this.filtEvent(e, v)) continue
if (new RegExp(v.reg).test(e.msg)) {
const regExp = new RegExp(v.reg);
/** 匹配消息或者小程序 */
const messageOrApplet = e.msg || e.message?.[0]?.data;
if (regExp.test(messageOrApplet)) {
e.logFnc = `[${plugin.name}][${v.fnc}]`
if (v.log !== false) {

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

View File

@ -10,7 +10,7 @@ chromiumPath:
puppeteerWS:
# headless
headless: 'new'
headless: "new"
# puppeteer启动args注意args的--前缀
args:

View File

@ -23,7 +23,7 @@ export default class PuppeteerRenderer {
/** 截图次数 */
this.renderNum = 0
this.config = {
headless: Data.def(config.headless, true),
headless: Data.def(config.headless, "new"),
args: Data.def(config.args, [
'--disable-gpu',
'--disable-setuid-sandbox',