Notyfikator

Dodaje informacje o powiadomieniach z tagów w karcie.

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name        Notyfikator
// @include     http://www.wykop.pl/*
// @description Dodaje informacje o powiadomieniach z tagów w karcie.
// @author      Deykun - aktualizacja dodatku Wicepsa
// @version     1.1
// @grant       none
// @run-at	document-end
// @namespace https://greasyfork.org/users/2399
// ==/UserScript==


var d = document.title;

function c(){
    //var wiad = $('#notificationsBtn span:eq(2):not(.dnone)').html();
    //var tagi = $('#hashNotificationsBtn span:eq(2):not(.dnone)').html();
	var tagi = $('b[id="hashtagsNotificationsCount"]').eq(0).text();
	var wiad = $('b[id="notificationsCount"]').eq(0).text();

    if(wiad == undefined ) wiad=0;
    if(tagi == undefined) tagi=0;

if (wiad!=0){
    if (tagi != 0){
    document.title = "("+wiad+") [#"+tagi+"] "+d;
    }

    else{
    document.title = "("+wiad+") "+d;
    }}



else{
    if (tagi != 0){
    document.title = "[#"+tagi+"] "+d;
    }}}

window.setInterval(c, 1000);