Com'Count

Permet de changer manuellement le nombre de messages non lus.

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

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

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         Com'Count
// @version      1.0.2
// @description  Permet de changer manuellement le nombre de messages non lus.
// @author       MockingJay
// @match        https://www.dreadcast.net/Main
// @grant        GM_setValue
// @grant        GM_getValue
// @grant        GM_deleteValue
// @grant        GM_listValues
// @license      http://creativecommons.org/licenses/by-nc-nd/4.0/
// @namespace https://greasyfork.org/users/30975
// ==/UserScript==

$(document).ready(function() {

    $("#zone_messagerie > .grid.grid-title > .icon").before('<div class="comcount btnTxt link" id="comcountInc" style="top: 1px;"><p>+1</p></div>');
    $("#comcountInc").after('<div class="comcount btnTxt link" id="comcountRes" style="top: 15px;"><p>0</p></div>');
    $("#comcountRes").after('<div class="comcount btnTxt link" id="comcountDec" style="top: 29px;"><p>-1</p></div>');

    $(".comcount").css({
        display: "block",
        position: "absolute",
        left: "-16px",
        width: "10px",
        height: "10px",
        padding: "0",
    });
    $(".comcount > p").css({
        "line-height": "12px",
        "font-size": "10px",
        margin: "0",
    });

    $("#comcountInc").click(function() {
        $("#zone_messagerie").trigger({ type: "nouveauMessage", quantity: 1})
    });
    $("#comcountRes").click(function() {
        $("#zone_messagerie").trigger({ type: "nouveauMessage", quantity: -parseInt($("#zone_messagerie > .grid > .icon > .nbrmessage").text()||0)})
    });
    $("#comcountDec").click(function() {
        $("#zone_messagerie").trigger({ type: "nouveauMessage", quantity: -1})
    });

});