LinkedInJunkFilter

Removes customizable job offers from LinkedIn

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         LinkedInJunkFilter
// @namespace    dakes.de
// @version      1.0
// @description  Removes customizable job offers from LinkedIn
// @author       Daniel Ostertag
// @match        https://*.linkedin.com/jobs/*
// @grant        none
// @require      https://cdn.jsdelivr.net/npm/jquery@3/dist/jquery.min.js
// @license      GPL-3.0
// ==/UserScript==

// Customize this list. Job offers, where the preview contains one of these Strings will be removed.
const filterList = ["Promoted", ".NET", " Java ", "Java S", "Java-Entwickler", "Java Entwickler", "Java Dev", "Java/Kotlin", "CHECK24", "PHP", "Microsoft"]

let $ = this.jQuery = jQuery.noConflict(true);

// case insensitive contains
// https://stackoverflow.com/a/8747204/9205894
$.expr[':'].icontains = function(a, i, m) {
  return jQuery(a).text().toUpperCase()
      .indexOf(m[3].toUpperCase()) >= 0;
};

function removeLi(str) {
    let list = $(`li.ember-view:icontains('${str}')`)
    for (let li of list)
    {
        if (li.hidden == false)
        {
            console.log( "LinkedInJunkFilter; filtered out: \t" + li.querySelector(".job-card-list__title").text.trim() )
            li.hidden = true
        }
    }

    setTimeout(function() {
        removeLi(str);
    }, 100);
}

function removeLiTimer() {
    setTimeout(function() {
        for (let filter of filterList)
            removeLi(filter);
    }, 300);
}

removeLiTimer();