(function(){var e=e=>String(e||``).replace(/\u00A0/g,` `).replace(/[\u200B-\u200F\u202A-\u202E\u2060\uFEFF]/g,``).replace(/[ \t]+\n/g,`
`).replace(/\n{3,}/g,`

`).trim(),t=()=>{let t=document,n=n=>{let r=t.querySelector(n);return e(r?.innerText||r?.textContent||``)};for(let e of[`.job-sec-text`,`.job-sec .job-sec-text`,`.job-sec .text`,`.job-detail-section .job-sec-text`,`.job-detail-section .text`,`.detail-content`,`.job-detail`,`[class*="job-sec-text"]`,`[class*="jobDetail"]`,`[class*="job-detail"]`]){let t=n(e);if(t&&t.replace(/\s+/g,``).length>=20)return t}let r=Array.from(t.querySelectorAll(`h2,h3,h4,dt,div,span`)).filter(e=>(e.textContent||``).replace(/\s+/g,``)===`职位描述`);for(let t of r){let n=t.closest(`section`)||t.parentElement,r=e(n?.innerText||n?.textContent||``);if(r.replace(/\s+/g,``).length>=40){let e=r.split(/\r?\n/).map(e=>e.trim()).filter(Boolean),t=e.findIndex(e=>e.replace(/\s+/g,``)===`职位描述`),n=(t>=0?e.slice(t+1).join(`
`):r).trim();if(n.replace(/\s+/g,``).length>=20)return n}}return``};chrome.runtime.onMessage.addListener((e,n,r)=>{if(e?.type===`EXTRACT_PAGE_JD`){if(!window.location.href.includes(`zhipin.com`))return r({success:!1,error:`当前页面不支持读取 JD`}),!0;let e=t();return e?(r({success:!0,jd:e}),!0):(r({success:!1,error:`未检测到职位描述`}),!0)}return e?.type===`EXTRACT_PAGE_SALARY`?window.location.href.includes(`zhipin.com`)?(r({success:!0,salaryText:``}),!0):(r({success:!1,error:`未检测到薪资`}),!0):!1});})()
