Skip to content

Instantly share code, notes, and snippets.

@davidshumway
Created July 7, 2024 15:52
Show Gist options
  • Save davidshumway/0aa40880e3b418024079712a136d1e05 to your computer and use it in GitHub Desktop.
Save davidshumway/0aa40880e3b418024079712a136d1e05 to your computer and use it in GitHub Desktop.
LinkedIn company page, redirect to US-based company job search
// ==UserScript==
// @name LinkedIn Company
// @version 1
// @grant none
// @include https://www.linkedin.com/company/*
// ==/UserScript==
// ex.
// https://www.linkedin.com/company/haas-automation/life/haas/
// https://www.linkedin.com/company/applied-intuition-inc/life/1d1d8313-131e-46f4-ac88-f8cdf5dbd49d/
// https://www.linkedin.com/company/radix-photonics/
function redirJobs() {
if (/\/life(\/*|$)/.exec(window.location.href) || /\/jobs(\/*|$)/.exec(window.location.href) || /company\/[^\/]+\/$/.exec(window.location.href)) {
// first instance of fsd_company:\d+,
var x = /fsd_company:(\d+)/.exec(document.body.innerHTML);
if (x) {
clearInterval(redirInv);
window.location.href = 'https://www.linkedin.com/jobs/search/?currentJobId=&f_C='+x[1]+'&geoId=103644278&location=United%20States&origin=JOB_SEARCH_PAGE_LOCATION_AUTOCOMPLETE&refresh=true';
}
}
}
var redirInv = setInterval(redirJobs, 500);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment