Greasy Fork

Greasy Fork is available in English.

LinkedIn jobs filter

Filter jobs based on title and company

当前为 2020-08-27 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         LinkedIn jobs filter
// @description  Filter jobs based on title and company
// @namespace    http://greasyfork.icu/en/users/673321-christianmemije
// @version      0.1.0
// @license      MIT
// @author       christianmemije
// @match        *://www.linkedin.com/*
// @grant        none
// @supportURL   https://github.com/christianmemije/jobfilters
// ==/UserScript==
(function () {
    var debugMode = false;
    var goodTitles = /frontend|front-end|front end|ui engineer|user interface|web/i;
    var badTitles = /remote/i;
    var badCompanies = /Optello|Jobot|Jobs Interviewing Now from|The Phoenix Group|Amazon|Facebook|Stealth Startup|Intelletec/i;
    // Selectors will probably have to be constantly updated
    var job = 'li.artdeco-list__item';
    var jobTitle = '.job-card-list__title';
    var jobCompany = '.job-card-container__company-name';
    var card = 'li.card-list__item';
    var carouseCard = 'li.artdeco-carousel__item';
    var cardTitle = '.job-card-square__title';
    new MutationObserver(function (mutationRecords) {
        setTimeout(function () {
            mutationRecords.forEach(function (_a) {
                var addedNodes = _a.addedNodes;
                addedNodes.forEach(function (_a) {
                    var nodeType = _a.nodeType;
                    if (nodeType === Node.ELEMENT_NODE) {
                        document
                            .querySelectorAll(card + ", " + carouseCard + ", " + job)
                            .forEach(function (li) {
                            var title = li.querySelector(cardTitle + ", " + jobTitle);
                            var company = li.querySelector("" + jobCompany);
                            var trashCompany = !!li.querySelector('.ghost-company');
                            if (title &&
                                company &&
                                (trashCompany ||
                                    !goodTitles.test(title.textContent) ||
                                    badTitles.test(title.textContent) ||
                                    badCompanies.test(company.textContent))) {
                                if (debugMode) {
                                    li.style.border = 'solid red';
                                }
                                else {
                                    li.remove();
                                }
                            }
                        });
                    }
                });
            });
        });
    }).observe(document.body, { childList: true, subtree: true });
})();