Point.im UnreadCommentMarker

Подкраска постов с непрочитанными комментами

Od 12.12.2014.. Pogledajte najnovija verzija.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

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.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name           Point.im UnreadCommentMarker
// @description    Подкраска постов с непрочитанными комментами
// @icon           http://point.im/img/logo.png
// @include        http*://*.point.im/comments*
// @grant          none
// @version 0.0.1.20141212214848
// @namespace https://greasyfork.org/users/7568
// ==/UserScript==

var divs = document.getElementsByClassName("post"); // массив постов
for (var i=0; i<divs.length; i++) { // обыск постов
 var spans = divs[i].getElementsByClassName("unread"); // поиск метки непрочитанных комментов
 if (spans.length > 0) { // если в посте есть непрочитанные комменты...
  divs[i].style = "background-color: #EEFFEE; border-radius:10px;"; //...залить пост зеленоватым и скруглить
 }
}