Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name name
- // @namespace namespace
- // @version 0.1
- // @match https://tjournal.ru/*
- // @description description
- // @author author
- // @require https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js
- // @grant none
- // ==/UserScript==
- (function() {
- 'use strict';
- var words = ['мегафон', 'republic', 'apple'];
- $(document).ready(function() {
- remove_posts();
- $(document).on( "click", function() {
- setTimeout(function () {
- remove_posts();
- },1500);
- });
- });
- function remove_posts()
- {
- $('.b-article h2 span').each(function( index ) {
- var title = $( this ).text();
- var title_low = title.toLowerCase();
- $.each(words, function( index, word ) {
- var word_low = word.toLowerCase();
- var includes = title_low.includes(word_low);
- if (includes == true) {
- var post = ".b-article h2 span:contains('" + title +"')";
- $(".feed__container").find(post).closest(".feed__item").hide();
- }
- });
- });
- }
- })();
Advertisement
Add Comment
Please, Sign In to add comment