tower-tag

hilight defrent color

이 스크립트를 설치하려면 Tampermonkey, Greasemonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

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

이 스크립트를 설치하려면 Tampermonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Userscripts와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 유저 스크립트 관리자 확장 프로그램이 필요합니다.

(이미 유저 스크립트 관리자가 설치되어 있습니다. 설치를 진행합니다!)

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

(이미 유저 스타일 관리자가 설치되어 있습니다. 설치를 진행합니다!)

// ==UserScript==
// @name         tower-tag
// @namespace    http://tampermonkey.net/
// @version      0.2
// @description  hilight defrent color
// @author       jswh
// @match        https://tower.im/*
// @grant        none
// ==/UserScript==

(function () {
    $(document).ready(function() {change();});
    $(document).on('DOMNodeInserted', function(e) {
        if(e.target.className == 'todos-all todos-view member-view' || e.target.className == 'todos-all todos-view list-view' || e.target.className == 'simple-filedrop') {
        change();
        }
    });
    function change() {
        $('.tag').each(function (i, tag) {
        $tag = $(tag);
        tagText = $tag.text();
        switch (tagText) {
            case 'block-header':
                $todo = $tag.closest('.todo');
                $todo.css({
                    'margin':'10px 0',
                    'text-align':'center'
                });
                $wrap = $tag.closest('.todo-wrap');
                $wrap.children('.simple-checkbox').hide();
                $wrap.children('.todo-detail').hide();
                $wrap.children('.todo-content').css({ 'color':'#333333'});
                $tag.hide();
                break;
            case 'bug':
            case 'BUG':
                $tag.removeClass('tag');
                $tag.css({
                    'background-color': '#fb93b8 !important',
                    'color': '#fff !important',
                    'padding': '0.1em 0.2em',
                    'vertical-align': '1px',
                    'font-size': '82%',
                    'font-weight': 'normal',
                    'border-radius': '2px'
                });
                break;
            default:
                break;
        }

    });
    }
})();