Remove Communities from Pikabu

Удаляет посты из сообществ, попавшие в Горячее.

目前为 2016-07-30 提交的版本。查看 最新版本

// ==UserScript==
// @name         Remove Communities from Pikabu
// @version      0.4
// @description  Удаляет посты из сообществ, попавшие в Горячее.
// @author       Neur0toxine
// @license      WTFPL
// @include      *//pikabu.ru/*
// @grant        GM_addStyle
// @grant        GM_info
// @namespace    https://gf.qytechs.cn/users/12790
// @run-at       document-start
// ==/UserScript==

(function() {
    'use strict';
    function qall(sel,html,proc){for(var t=document.querySelectorAll(sel),i=0;i<t.length;i++)html.test(t[i].innerHTML)&&eval("t[i]."+proc)}
    var cssText = '.search-result-communities, .best_comm, ';
    cssText += 'a[href="http://pikabu.ru/communities"][class="no_ch"], ';
    cssText += 'td[class="rating_bl b-community-top-caption"] {display:none!important}';
    GM_addStyle(cssText);
    function remove_posts_by_communities_tag() {$('a[href="http://pikabu.ru/communities"][class="no_ch"]').remove();
        $('td[class="rating_bl b-community-top-caption"]').closest('div').remove();
        $('a[href^="/community"]').closest('.story').remove();
        $('.story__sponsor,.story__gag-nice').closest('.story').remove();
        $(document).ajaxComplete(function(){$('.story__sponsor,.story__gag-nice').closest('.story').remove();});
        qall('td.rating_bl.menu-block-title', /О\sсообществе/, 'closest(\'div\').remove();');}
    window.onload = function(){$(document).ajaxComplete(remove_posts_by_communities_tag);remove_posts_by_communities_tag();console.log('['+GM_info.script.name+']: Выполнена очистка!');}; 
})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址