-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 07063d3
Showing
2 changed files
with
62 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# LinkedIn Profile Viewers Viewer | ||
|
||
Userscript that allows you to see who recently viewed your profile without buying premium - tested and used on [ViolentMonkey](https://violentmonkey.github.io/), but should work with any userscript manager | ||
|
||
Side note, if nothing shows up then try reloading the `/me/profile-views` page until it works lol |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
// ==UserScript== | ||
// @name See LinkedIn Profile Views | ||
// @namespace Violentmonkey Scripts | ||
// @match https://www.linkedin.com/me/profile-views/urn:li:wvmp:summary/ | ||
// @grant none | ||
// @version 1.0 | ||
// @author turtlebasket | ||
// @description 3/30/2022 | ||
// ==/UserScript== | ||
|
||
let docStr = new XMLSerializer().serializeToString(document) | ||
|
||
let stalkersHTML = "<u><h3>PROFILE VIEWERS</h3></u><br>" | ||
|
||
for (let line of docStr.split('\n')) { | ||
if (line.search("firstName") != 0 && line.search("lastName" != 0)) { | ||
try { | ||
let res = JSON.parse(line)["included"] ?? null | ||
if (res != null) { | ||
for (let item of res) { | ||
if (item["$type"] == "com.linkedin.voyager.identity.shared.MiniProfile") { | ||
|
||
photoUrl = item["picture"]["rootUrl"] + | ||
item["picture"]["artifacts"].filter(a => a.width == 200)[0]["fileIdentifyingUrlPathSegment"] | ||
|
||
stalkersHTML += | ||
`<div style="display:flex; flex-direction:row; margin-bottom: 10px;"> | ||
<div class="display:flex;"> | ||
<img style="min-width: 52px; max-width: 52px" src="${photoUrl}"> | ||
</div> | ||
<div style="display:flex flex-direction:column; margin-left: 12px;"> | ||
<strong><a href="https://linkedin.com/in/${item.publicIdentifier}"><h4>${item.firstName} ${item.lastName}</h4></a></strong> | ||
<i>${item.occupation}</i> | ||
</div> | ||
</div>`; | ||
} | ||
} | ||
} | ||
} catch (e) {} | ||
} | ||
} | ||
|
||
// create button | ||
let list = document.createElement("div") | ||
list.style.padding = "18px" | ||
list.style.backgroundColor = "lightgray" | ||
list.style.borderRadius = "5px" | ||
list.style.color = "black" | ||
list.style.fontFamily = ["Comic Sans", "Sans-Serif"] | ||
list.style.display = "flex" | ||
list.style.flexDirection = "column" | ||
list.innerHTML = stalkersHTML | ||
|
||
console.log(list) | ||
|
||
let el = document.getElementById("ember37") | ||
el.appendChild(list) |