Greasy Fork

Greasy Fork is available in English.

智联职位助手

屏蔽智联招聘列表中无用的公司与职位.可选择屏蔽该职位或者该公司.

当前为 2016-10-15 提交的版本,查看 最新版本

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         智联职位助手
// @namespace    http://tampermonkey.net/
// @version      0.3
// @description  屏蔽智联招聘列表中无用的公司与职位.可选择屏蔽该职位或者该公司.
// @author       L.Rain
// @match        http://sou.zhaopin.com/jobs/searchresult.ashx*
// @match        http://www.zhaopin.com/
// @match        http://jobs.zhaopin.com/*
// @grant        none
// ==/UserScript==

//table页添加btn
if (/sou\.zhaopin\.com/.test(location.href)) {
    //添加列表页删除按钮
    $('.newlist_list_xlbtn').map(function (x, y) {
        $(y).after("<br> <button style='margin-bottom:9px;margin-left:5px;width:15px' onclick='return false'>X<button> <button name='ALL' style='margin-bottom:9px;margin-left:5px;width:25px' onclick='return false'>ALL<button>");
    });
    var table = $('tbody tr:first-child');
    var list = localStorage.list?JSON.parse(localStorage.list):{};

    //添加btn事件委托
    table.delegate('button', 'click', function (e) {
        //屏蔽所有该公司招聘
        var gsmc = $(this).parent().siblings('.gsmc').text().trim();
        var htr = $(this).closest('tr');
        if (e.target.name == 'ALL') {
            list[gsmc] = ['ALL'];
        } else {
            var zwmc = $(this).parent().siblings('.zwmc').find('a').text().trim();
            if (list[gsmc]) {
                list[gsmc].push(zwmc);
            } else {
                list[gsmc] = [zwmc];
            }
        }
        localStorage.setItem('list', JSON.stringify(list));
        removegsmc();
    });
    removegsmc();

} else if (/jobs\.zhaopin\.com/.test(location.href)) {
    //detail页面添加btn
    //$('#applyVacButton2').after("<button class='close' style='margin: 20px 0 0 0;height:40px;width:35px'>X</button>");
    //$(document).delegate('button','click',function(){
    //   if($(this).hasClass('.close'))window.close();
    //});
} else {
    $('#globalHeader,#footer,#wrapper,#adFilter').remove();
}
  
function removegsmc() {
    for (var i in list) {
        table.map(function (x, y) {
            if ($(y).children('.gsmc').text() == i) {
                if (list[i][0] == ['ALL'] || list[i].includes($(y).children('.zwmc').text().trim())) {
                    $(y).hide();
                }
            }
        });
    }
}