forked from ohsusannamarie/random-LinkedIn-tools
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwhoViewedMe.txt
1 lines (1 loc) · 6.84 KB
/
whoViewedMe.txt
1
javascript:(function()%7Basync%20function%20popViewProfiles()%7Bvar%20reg%20%3D%20(elm%2C%20n)%20%3D%3E%20elm%20!%3D%20null%20%3F%20elm%5Bn%5D%20%3A%20''%3Bvar%20cn%20%3D%20(ob%2C%20nm)%20%3D%3E%20ob.getElementsByClassName(nm)%3Bvar%20tn%20%3D%20(ob%2C%20nm)%20%3D%3E%20ob.getElementsByTagName(nm)%3Bvar%20gi%20%3D%20(ob%2C%20nm)%20%3D%3E%20ob.getElementById(nm)%3Bvar%20noHTML%20%3D%20(str)%20%3D%3E%20str.replace(%2F%3C.%2B%3F%3E%2Fg%2C%20'').replace(%2F%5Cs%2B%2Fg%2C%20'%20').replace(%2F%26.%2B%3F%3B%2Fg%2C%20'')%3Bvar%20delay%20%3D%20(ms)%20%3D%3E%20new%20Promise(res%20%3D%3E%20setTimeout(res%2C%20ms))%3Bvar%20userJdata%20%3D%20gi(document%2C%20'smart-search-header')%20%3F%20JSON.parse(gi(document%2C%20'smart-search-header').getAttribute('data-meta'))%20%3A%20console.log('This%20only%20works%20on%20Recruiter%20Profiles.')%3Bvar%20csrf_id%20%3D%20gi(document%2C%20'smart-search-header')%20%3F%20gi(document%2C%20'smart-search-header').getAttribute('data-csrf')%20%3A%20console.log('This%20only%20works%20on%20Recruiter%20Profiles.')%3Bvar%20timer%20%3D%20new%20Date().getTime().toString().replace(%2F%5Cd%7B4%7D%24%2F%2C%20'0000')%3Bvar%20lirId%20%3D%20reg(%2F(%3F%3C%3Drecruiter%5C%2Fprofile%5C%2F)%5Cd%2B%2C.%2B%3F%2C.%2B%3F(%3F%3D%5C%3F%7C%24)%2F.exec(window.location.href)%2C%200)%3Bfunction%20close_pop()%20%7Bdocument.body.removeChild(document.getElementById(%22pop_container_whoview%22))%3B%7Dfunction%20parseprofile(obj)%7Bvar%20img%20%3D%20obj.picture%20%3F%20obj.picture.rootUrl%20%2B%20obj.picture.artifacts%5B0%5D.fileIdentifyingUrlPathSegment%20%3A%20'https%3A%2F%2Fstatic.licdn.com%2Fsc%2Fh%2Feuf48or6d74p938p90d6pjwkj'%3Bvar%20output%20%3D%20%7B%22niid%22%3A%20reg(%2F(%3F%3C%3Dfs_miniProfile%3A).%2B%2F.exec(obj.entityUrn)%2C0)%2C%22firstName%22%3A%20obj.firstName%2C%22lastName%22%3A%20obj.lastName%2C%22occupation%22%3A%20obj.occupation%2C%22publicIdentifier%22%3A%20obj.publicIdentifier%2C%22picture%22%3A%20img%2C%22trackingId%22%3A%20obj.trackingId%2C%7D%3Breturn%20output%3B%7Dasync%20function%20whoViewed(csrf%2Ctime)%20%7Bvar%20temp%20%3D%20%5B%5D%3Bvar%20res%20%3D%20await%20fetch(%22https%3A%2F%2Fwww.linkedin.com%2Fvoyager%2Fapi%2Fidentity%2Fcards%3Fcount%3D9%26endTime%3D%22%2Btime%2B%22%26model%3Didentity%252Fme%252Fcard%26q%3DprofileViewCards%26start%3D0%22%2C%20%7B%22credentials%22%3A%20%22include%22%2C%22headers%22%3A%20%7B%22accept%22%3A%20%22application%2Fvnd.linkedin.normalized%2Bjson%2B2.1%22%2C%22accept-language%22%3A%20%22en-US%2Cen%3Bq%3D0.9%22%2C%22csrf-token%22%3A%20csrf%2C%22x-li-lang%22%3A%20%22en_US%22%2C%22x-li-page-instance%22%3A%20%22urn%3Ali%3Apage%3Ad_flagship3_me_wvm_v2%3B0%2FyL5DQsQSS52uhDGWVxyQ%3D%3D%22%2C%22x-li-track%22%3A%20%22%7B%5C%22clientVersion%5C%22%3A%5C%221.2.7961%5C%22%2C%5C%22osName%5C%22%3A%5C%22web%5C%22%2C%5C%22timezoneOffset%5C%22%3A-5%2C%5C%22deviceFormFactor%5C%22%3A%5C%22DESKTOP%5C%22%2C%5C%22mpName%5C%22%3A%5C%22voyager-web%5C%22%7D%22%2C%22x-restli-protocol-version%22%3A%20%222.0.0%22%7D%2C%22referrer%22%3A%20%22https%3A%2F%2Fwww.linkedin.com%2Fme%2Fprofile-views%2Furn%3Ali%3Awvmp%3Asummary%2F%22%2C%22referrerPolicy%22%3A%20%22no-referrer-when-downgrade%22%2C%22body%22%3A%20null%2C%22method%22%3A%20%22GET%22%2C%22mode%22%3A%20%22cors%22%7D)%3Bvar%20dat%20%3D%20await%20res.json()%3Bvar%20included%20%3D%20dat.included%3Bincluded.forEach(itm%3D%3E%20%7Bif(itm.firstName)%7Btemp.push(parseprofile(itm))%3B%7D%7D)%3Breturn%20temp%3B%7Dfunction%20buildProfHTML(arr)%20%7Breturn%20'%3Cdiv%20id%3D%22'%20%2B%20arr.niid%20%2B%20'%22%20style%3D%22padding%3A%208px%3B%20width%3A%2090%25%3B%20background%3A%20white%3B%22%3E'%20%2B'%3Cimg%20src%3D'%20%2B%20arr.picture%20%2B%20'%20width%3D%2250px%22%20height%3D%2250px%22%20style%3D%22float%3A%20right%3B%20color%3A%20%230b868e%22%3E%3C%2Fimg%3E'%20%2B'%3Cdiv%3E%3Ca%20class%3D%22proflinker%22%20style%3D%22cursor%3A%20pointer%3B%22%20data-url%3D%22'%20%2B%20'%2Fin%2F'%2Barr.publicIdentifier%20%2B%20'%22%3E'%20%2B%20arr.firstName%20%2B%20'%20'%20%2B%20arr.lastName%20%2B%20'%3C%2Fa%3E%3C%2Fdiv%3E'%20%2B'%3Cdiv%20style%3D%22font-size%3A%20.9em%3B%22%3E'%20%2B%20arr.occupation%20%2B%20'%3C%2Fdiv%3E'%20%2B'%3C%2Fdiv%3E%3Cbr%3E'%3B%7Dasync%20function%20createPopHtml()%7Bvar%20html%20%3D%20''%3Bvar%20arr%20%3D%20await%20whoViewed(csrf_id%2C%20timer)%3Bawait%20arr.forEach(itm%20%3D%3E%20html%20%3D%20html%20%2B%20buildProfHTML(itm))%3Bvar%20cDiv%20%3D%20document.createElement(%22div%22)%3BcDiv.setAttribute(%22id%22%2C%20%22pop_container_whoview%22)%3Bdocument.body.appendChild(cDiv)%3BcDiv.style.display%20%3D%20%22inline-block%22%3BcDiv.style.position%20%3D%20%22fixed%22%3BcDiv.style.top%20%3D%20%228%25%22%3BcDiv.style.left%20%3D%20%221%25%22%3BcDiv.style.width%20%3D%20%2215%25%22%3BcDiv.style.height%20%3D%20%2250%25%22%3BcDiv.style.padding%20%3D%20%223px%22%3BcDiv.style.background%20%3D%20%22transparent%22%3BcDiv.style.transform%20%3D%20%22scale(.99%2C%20.99)%22%3BcDiv.style.zIndex%20%3D%20%2210000%22%3Bvar%20mDiv%20%3D%20document.createElement(%22div%22)%3BmDiv.setAttribute(%22id%22%2C%20%22mover_div%22)%3Bdocument.getElementById(%22pop_container_whoview%22).appendChild(mDiv)%3BmDiv.style.width%20%3D%20%2298%25%22%3BmDiv.style.height%20%3D%20%2225px%22%3BmDiv.style.border%20%3D%20%221px%20solid%20%231c1c1c%22%3BmDiv.style.backgroundColor%20%3D%20'%231c1c1c'%3BmDiv.style.color%20%3D%20%22white%22%3BmDiv.style.textAlign%20%3D%20%22right%22%3BmDiv.style.padding%20%3D%20%223px%22%3BmDiv.innerText%20%3D%20'Viewed%20your%20profile'%3Bvar%20clsBtn%20%3D%20document.createElement(%22button%22)%3BmDiv.appendChild(clsBtn)%3BclsBtn.setAttribute(%22id%22%2C%20%22btn_close%22)%3Bdocument.getElementById(%22btn_close%22).innerText%20%3D%20%22%2B%22%3BclsBtn.style.background%20%3D%20%22Transparent%22%3BclsBtn.style.display%20%3D%20%22inline-block%22%3BclsBtn.style.transform%20%3D%20%22scale(2.9%2C%202.9)%20rotate(45deg)%22%3BclsBtn.style.float%20%3D%20%22left%22%3BclsBtn.style.borderRadius%20%3D%20%221em%22%3BclsBtn.style.boxShadow%20%3D%20%220px%22%3BclsBtn.style.border%20%3D%20%220px%22%3BclsBtn.style.cursor%20%3D%20%22pointer%22%3BclsBtn.style.userSelect%20%3D%20%22none%22%3BclsBtn.style.fontSize%20%3D%20'1em'%3BclsBtn.style.fontWeight%20%3D%20%22bold%22%3BclsBtn.style.color%20%3D%20%22Crimson%22%3BclsBtn.addEventListener(%22click%22%2C%20close_pop)%3Bvar%20holder%20%3D%20document.createElement(%22div%22)%3BcDiv.appendChild(holder)%3Bholder.style.height%20%3D%20%2294%25%22%3Bholder.style.width%20%3D%20%22100%22%3Bholder.style.background%20%3D%20'white'%3Bholder.style.overflowY%20%3D%20%22scroll%22%3Bholder.innerHTML%20%3D%20arr.length%20%3E%200%20%3F%20html%20%3A%20'no%20results'%3BArray.from(document.getElementsByClassName(%22proflinker%22)).forEach(itm%20%3D%3E%20itm.addEventListener('click'%2C%20opener))%3Bfunction%20opener()%20%7Bwindow.open(this.getAttribute(%22data-url%22))%3B%7D%7DlirId%20%3F%20createPopHtml()%20%3A%20console.log('This%20only%20works%20on%20Recruiter%20Profiles.')%3B%7DpopViewProfiles()%7D)()