mirror of
https://github.com/geekgeekrun/geekgeekrun.git
synced 2026-09-09 01:17:06 +08:00
remove period screenshot
This commit is contained in:
@@ -15,7 +15,7 @@ import SqlitePluginModule from '@geekgeekrun/sqlite-plugin'
|
|||||||
import gtag from '../../utils/gtag'
|
import gtag from '../../utils/gtag'
|
||||||
import GtagPlugin from '../../utils/gtag/GtagPlugin'
|
import GtagPlugin from '../../utils/gtag/GtagPlugin'
|
||||||
import { connectToDaemon, sendToDaemon } from '../OPEN_SETTING_WINDOW/connect-to-daemon'
|
import { connectToDaemon, sendToDaemon } from '../OPEN_SETTING_WINDOW/connect-to-daemon'
|
||||||
import { PeriodPushCurrentPageScreenshotPlugin } from '../../utils/screenshot'
|
// import { PeriodPushCurrentPageScreenshotPlugin } from '../../utils/screenshot'
|
||||||
import { checkShouldExit } from '../../utils/worker'
|
import { checkShouldExit } from '../../utils/worker'
|
||||||
import { UserResponseInfoPlugin } from '../../features/boss-user-info-response-plugin'
|
import { UserResponseInfoPlugin } from '../../features/boss-user-info-response-plugin'
|
||||||
const { default: SqlitePlugin } = SqlitePluginModule
|
const { default: SqlitePlugin } = SqlitePluginModule
|
||||||
@@ -35,7 +35,7 @@ const initPlugins = (hooks) => {
|
|||||||
new DingtalkPlugin(dingTalkAccessToken).apply(hooks)
|
new DingtalkPlugin(dingTalkAccessToken).apply(hooks)
|
||||||
new SqlitePlugin(getPublicDbFilePath()).apply(hooks)
|
new SqlitePlugin(getPublicDbFilePath()).apply(hooks)
|
||||||
new GtagPlugin().apply(hooks)
|
new GtagPlugin().apply(hooks)
|
||||||
new PeriodPushCurrentPageScreenshotPlugin().apply(hooks)
|
// new PeriodPushCurrentPageScreenshotPlugin().apply(hooks)
|
||||||
new UserResponseInfoPlugin().apply(hooks)
|
new UserResponseInfoPlugin().apply(hooks)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -52,29 +52,29 @@ export const pageMapByName: {
|
|||||||
boss?: Page | null
|
boss?: Page | null
|
||||||
} = {}
|
} = {}
|
||||||
|
|
||||||
async function periodPushCurrentPageScreenshot () {
|
// async function periodPushCurrentPageScreenshot () {
|
||||||
try {
|
// try {
|
||||||
if (pageMapByName.boss?.isClosed()) {
|
// if (pageMapByName.boss?.isClosed()) {
|
||||||
return
|
// return
|
||||||
}
|
// }
|
||||||
const shouldExit = await checkShouldExit()
|
// const shouldExit = await checkShouldExit()
|
||||||
if (shouldExit) {
|
// if (shouldExit) {
|
||||||
return
|
// return
|
||||||
}
|
// }
|
||||||
try {
|
// try {
|
||||||
await pushCurrentPageScreenshot(pageMapByName.boss)
|
// await pushCurrentPageScreenshot(pageMapByName.boss)
|
||||||
}
|
// }
|
||||||
catch (err) {
|
// catch (err) {
|
||||||
if (err?.message?.includes(`PAGE_CLOSED`)) {
|
// if (err?.message?.includes(`PAGE_CLOSED`)) {
|
||||||
return
|
// return
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
setTimeout(periodPushCurrentPageScreenshot, SCREENSHOT_INTERVAL_MS)
|
// setTimeout(periodPushCurrentPageScreenshot, SCREENSHOT_INTERVAL_MS)
|
||||||
}
|
// }
|
||||||
catch {}
|
// catch {}
|
||||||
}
|
// }
|
||||||
|
|
||||||
periodPushCurrentPageScreenshot()
|
// periodPushCurrentPageScreenshot()
|
||||||
|
|
||||||
async function saveCurrentChatRecord(page) {
|
async function saveCurrentChatRecord(page) {
|
||||||
const userInfo = await page.evaluate(
|
const userInfo = await page.evaluate(
|
||||||
|
|||||||
Reference in New Issue
Block a user