yap_filter_200

"Hide posts with rating < 200"

当前为 2015-10-13 提交的版本,查看 最新版本

// ==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();
});

QingJ © 2025

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