Indeed UX+

Reveals hidden reviews, Removes Archived, Saved & Applied Job Posts from showing up & Allows select Job Posts via Arrow Keys

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

ستحتاج إلى تثبيت إضافة مثل Stylus لتثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتتمكن من تثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتثبيت هذا النمط.

(لدي بالفعل مثبت أنماط للمستخدم، دعني أقم بتثبيته!)

// ==UserScript==
// @name         Indeed UX+
// @namespace    http://tampermonkey.net/
// @version      1.0.1
// @description  Reveals hidden reviews, Removes Archived, Saved & Applied Job Posts from showing up & Allows select Job Posts via Arrow Keys
// @author       TigerYT
// @include      *://*.indeed.tld/*
// @icon         https://uk.indeed.com/images/favicon.ico
// @grant        GM_addStyle
// @grant        GM_registerMenuCommand
// @license      The Unlicense
// ==/UserScript==

(function checkDocumentReady() { document.readyState === 'complete' ? executeUsercript() : setTimeout(checkDocumentReady, 0); })();

function executeUsercript() {
    'use strict';

    const customCSS = `
#reviewDescription {
    :is(&, & + div) {
        :is([itemprop="reviewBody"] > span, h2 + div) {
            &, * {
                background-color: rgba(0, 0, 0, 0) !important;
                color: rgb(89, 89, 89) !important;
                font-weight: 400 !important;
                text-shadow: none !important;
                -webkit-user-select: auto !important;
                user-select: auto !important;
            }
        }
    }

    & ~ button {
        display: none !important;
    }
}
    `;
    GM_addStyle(customCSS);

    let getViewJobPanelElem = () => document.getElementById('jobsearch-JobFullDetailsTitle')?.parentElement.querySelector('.fastviewjob');
    let getJobResultsPanelElem = () => document.getElementById('mosaic-provider-jobcards')?.firstElementChild;
    let allPosts = Array.from(getJobResultsPanelElem()?.children ?? []);
    let getJobPosts = () => allPosts.filter((jobPost) => jobPost.firstElementChild.classList.contains('tapItem')).map((({firstElementChild}) => firstElementChild));
    let getVisiblePosts = () => getJobPosts().filter((jobPostElem) => !jobPostElem.classList.contains('disliked'));
    let getCurrentJobPostId = () => getViewJobPanelElem()?.querySelector('.jobsearch-HeaderContainer a')?.href.split("&fromjk=")[1];
    let getCurrentJobPostElem = () => getVisiblePosts().find((jobPostElem) => getCurrentJobPostId() == getjobPostId(jobPostElem));
    let getCurrentJobPostElemIndex = () => getVisiblePosts().findIndex((jobPostElem) => getCurrentJobPostId() == getjobPostId(jobPostElem));
    let getjobPostId = (jobPostElem) => jobPostElem.className.split(' ').find((classStr) => classStr.startsWith('job_'))?.slice(4);

    /* Hide All Saved Job Posts */
    getJobPosts().forEach((jobPostElem) => {
        let jobPostId = getjobPostId(jobPostElem);

        if ((jobPostElem.querySelector('div.underShelfFooter span')?.textContent.startsWith('Saved ') || jobPostElem.querySelector('div.underShelfFooter span')?.textContent.startsWith('Archived ') || jobPostElem.querySelector('.mainContentTable div[data-testid="appliedSnippet"]')?.textContent == 'Applied') && !jobPostElem.classList.contains('disliked')) {
            jobPostElem.classList.add('disliked');
            if (jobPostId == getCurrentJobPostId() || !getCurrentJobPostElem()) getViewJobPanelElem()?.firstElementChild?.click();
        } else if (jobPostId == getCurrentJobPostId()) getCurrentJobPostElem().classList.add('vjs-highlight');

    });

    /* Allow Arrow Keys to Select Job Posts */

    let newJobPostElemIndex, currentJobPostElemIndex
    newJobPostElemIndex = currentJobPostElemIndex = getCurrentJobPostElemIndex();

    let jobPostSelector = (e) => {
        let upKey = ['ArrowUp', 'ArrowLeft'].includes(e.key);
        let downKey = ['ArrowDown', 'ArrowRight'].includes(e.key);

        if (!getCurrentJobPostElem()) getViewJobPanelElem()?.firstElementChild?.click();

        if (currentJobPostElemIndex > 0 && upKey) newJobPostElemIndex--;
        else if (currentJobPostElemIndex < (getVisiblePosts().length - 1) && downKey) newJobPostElemIndex++;
        else return;

        let newJobPostElem = getVisiblePosts()[newJobPostElemIndex];
        let newJobPostId = getjobPostId(newJobPostElem);

        newJobPostElem.scrollIntoView({ behavior: 'auto', block: 'center', inline: 'center' });
        document.querySelector(`#sj_${newJobPostId}, #job_${newJobPostId}`).click();

        currentJobPostElemIndex = newJobPostElemIndex;
    }

    window.addEventListener('keydown', (e) => jobPostSelector(e));
}

// Register context menu option
GM_registerMenuCommand("Execute", executeUsercript);