yap_filter_200

"Hide posts with rating < 200"

Stan na 13-10-2015. Zobacz najnowsza wersja.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name        yap_filter_200
// @namespace   yap_filter
// @description:en "Hide posts with rating < 200 and ad posts"
// @description:ru "Скрипт скрывает на yaplakal.com посты, с рейтингом меньше 200 и рекламные посты."
// @include     http://www.yaplakal.com/
// @include     http://www.yaplakal.com/st/*
// @version     3
// @grant       none
// @requre      https://code.jquery.com/jquery-2.1.4.min.js
// @description "Hide posts with rating < 200"
// ==/UserScript==

$(document).ready(function() 
{
  var min_rating = 200;
  
  // скрыть посты без оценок (реклама)
  $('noindex').parents('.lenta tr').hide();
  $('.newshead').not(':has(.rating-short-value)').parents('.lenta tr').each(function() {
   $(this).hide();
   $(this).nextAll(':lt(2)').hide();    
  });

  // скрыть посты с рейтингом < min_rating
  $('.rating-short-value a').each(function(){
    var rating = this.text;
    if(rating < min_rating) {
      var hd = $(this).parents('.lenta tr');
      hd.hide();
      hd.nextAll(':lt(2)').hide();
    }
  });
  
  // удалить все скрытое
  $('.lenta tr:hidden').remove();
});