مۇنازىرىلەر » قۇرۇش تەلىپى

Adding a map to Indeed / Linkedin job board posts?

§
يوللانغان ۋاقتى: 2023-08-13

Hi all,

I'm looking to see if there is a script that will add to job postings as they already have a location and sometimes a zipcode too. Trying to get an idea of where the job is by showing the general area of where the location is within the state via google maps. Trying to speed up the job searching process.

Thanks!

§
يوللانغان ۋاقتى: 2023-08-15
تەھرىرلەنگەن ۋاقتى: 2023-08-15

This is the concept for indeed, but I won't do it for you

const companyInfoElements = document.querySelectorAll(".companyInfo");

companyInfoElements.forEach((companyInfo, i) => {
const companyName = companyInfo.querySelector(".companyName").textContent;
const companyLocation = companyInfo.querySelector(".companyLocation").textContent;

const googleMapsUrl = `https://www.google.com/maps/search/?api=1&query=${encodeURIComponent(companyLocation)}`;

const iframe = document.createElement("iframe");
iframe.setAttribute("src", googleMapsUrl);
iframe.setAttribute("width", "300");
iframe.setAttribute("height", "200");
iframe.style.position = "absolute";
iframe.style.display = "none";

document.querySelectorAll("li")[i].addEventListener("mouseenter", () => {
iframe.style.display = "block";
});

document.querySelectorAll("li")[i].addEventListener("mouseleave", () => {
iframe.style.display = "none";
});

document.querySelectorAll("li")[i].appendChild(iframe);
});

جاۋاب قايتۇرۇش

جاۋاب قايتۇرۇش ئۈچۈن كىرىش.

长期地址
遇到问题?请前往 GitHub 提 Issues。