mirror of
https://github.com/geekgeekrun/geekgeekrun.git
synced 2026-09-08 17:09:07 +08:00
when disable company allow list, we will believe that the first one in the list is your expect job.
This commit is contained in:
+5
-1
@@ -26,6 +26,7 @@ if (!bossCookies?.length) {
|
|||||||
const recommendJobPageUrl = `https://www.zhipin.com/web/geek/job-recommend`
|
const recommendJobPageUrl = `https://www.zhipin.com/web/geek/job-recommend`
|
||||||
|
|
||||||
const expectCompanySet = new Set(targetCompanyList)
|
const expectCompanySet = new Set(targetCompanyList)
|
||||||
|
const enableCompanyAllowList = Boolean(expectCompanySet.size)
|
||||||
|
|
||||||
let browser, page
|
let browser, page
|
||||||
|
|
||||||
@@ -106,8 +107,11 @@ async function mainLoop (hooks) {
|
|||||||
document.querySelector('.job-recommend-main')?.__vue__?.jobList
|
document.querySelector('.job-recommend-main')?.__vue__?.jobList
|
||||||
`
|
`
|
||||||
)
|
)
|
||||||
let targetJobIndex = jobListData.findIndex(
|
// when disable company allow list, we will believe that the first one in the list is your expect job.
|
||||||
|
let targetJobIndex = enableCompanyAllowList ? jobListData.findIndex(
|
||||||
it => !blockBossNotNewChat.has(it.encryptBossId) && [...expectCompanySet].find(name => it.brandName.includes(name))
|
it => !blockBossNotNewChat.has(it.encryptBossId) && [...expectCompanySet].find(name => it.brandName.includes(name))
|
||||||
|
) : jobListData.findIndex(
|
||||||
|
it => !blockBossNotNewChat.has(it.encryptBossId)
|
||||||
)
|
)
|
||||||
|
|
||||||
let hasReachLastPage = false
|
let hasReachLastPage = false
|
||||||
|
|||||||
Reference in New Issue
Block a user