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 (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}]` e.logFnc = `[${plugin.name}][${v.fnc}]`
if (v.log !== false) { if (v.log !== false) {

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

View File

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

View File

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