Add "People with this name" button
This commit is contained in:
parent
f7f231244c
commit
652cb26f57
3 changed files with 15 additions and 0 deletions
|
@ -45,6 +45,10 @@ input.highlight {
|
||||||
cursor: wait !important;
|
cursor: wait !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.hidden {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
footer {
|
footer {
|
||||||
font-size: small !important;
|
font-size: small !important;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
|
|
|
@ -20,6 +20,8 @@
|
||||||
<input type="text" placeholder="Pajeet" name="name-box" id="name-box" readonly>
|
<input type="text" placeholder="Pajeet" name="name-box" id="name-box" readonly>
|
||||||
<br>
|
<br>
|
||||||
<button onclick="generate()" id="btn">Do the needful</button>
|
<button onclick="generate()" id="btn">Do the needful</button>
|
||||||
|
<br>
|
||||||
|
<a id="search" class="hidden" target="_blank">People with this name</a>
|
||||||
|
|
||||||
<footer>
|
<footer>
|
||||||
<p>Written by <a href="https://github.com/ejv2/">ejv2</a> in 2024 -- <a href="/ijeet.jpg">Inspiration</a></p>
|
<p>Written by <a href="https://github.com/ejv2/">ejv2</a> in 2024 -- <a href="/ijeet.jpg">Inspiration</a></p>
|
||||||
|
|
9
index.js
9
index.js
|
@ -13,6 +13,9 @@ let root;
|
||||||
let btn;
|
let btn;
|
||||||
let out;
|
let out;
|
||||||
|
|
||||||
|
const search_front = "https://www.linkedin.com/pub/dir?firstName=";
|
||||||
|
const search_back = "&lastName=&trk=people-guest_people-search-bar_search-submit";
|
||||||
|
|
||||||
function onready()
|
function onready()
|
||||||
{
|
{
|
||||||
root = document.querySelector("html")
|
root = document.querySelector("html")
|
||||||
|
@ -68,6 +71,10 @@ function cleanup_generate()
|
||||||
btn.classList.remove("loading");
|
btn.classList.remove("loading");
|
||||||
out.classList.remove("loading");
|
out.classList.remove("loading");
|
||||||
|
|
||||||
|
// People with this name
|
||||||
|
document.querySelector("#search").classList.remove("hidden");
|
||||||
|
document.querySelector("#search").href = search_front + out.value + search_back;
|
||||||
|
|
||||||
flashinterval = setInterval(() => {
|
flashinterval = setInterval(() => {
|
||||||
out.classList.toggle("highlight");
|
out.classList.toggle("highlight");
|
||||||
if (flashcount++ >= 6) {
|
if (flashcount++ >= 6) {
|
||||||
|
@ -118,6 +125,8 @@ function generate()
|
||||||
root.classList.add("loading");
|
root.classList.add("loading");
|
||||||
btn.classList.add("loading");
|
btn.classList.add("loading");
|
||||||
out.classList.add("loading");
|
out.classList.add("loading");
|
||||||
|
// People with this name
|
||||||
|
document.querySelector("#search").classList.add("hidden");
|
||||||
|
|
||||||
get_names(pull_names);
|
get_names(pull_names);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue