Cake_Seller / Joyreactor comment rating hider

// ==UserScript==
// @name         Joyreactor comment rating hider
// @namespace    http://cake-seller.blogspot.com/
// @version      0.1
// @description  
// @author       Evgeniy Kutischev
// @match      http://joyreactor.cc/*
// @match      http://*.joyreactor.cc/*
// @grant        none
// ==/UserScript==

(function () {
    if (!jQuery) return;
    
    var ls = window.localStorage;
    
    if (!ls) return;
    
    if (ls.getItem('ek_hide_comment_rating') === null) {
        ls.setItem('ek_hide_comment_rating', 'false');
    }

    function appendStyle (str) {
        var head = document.head || document.getElementsByTagName('head')[0],
            style = document.createElement('style');

        style.type = 'text/css';
        if (style.styleSheet){
            style.styleSheet.cssText = str;
        } else {
            style.appendChild(document.createTextNode(str));
        }

        style.id = "ek_hide_comment_rating";

        head.appendChild(style);
    }

    $(function () {
        var stl = 'body .article .ufoot .txt span.comment_rating {' +
                      'color: rgba(0,0,0,0)' +
                  '}';
        
        if (ls.getItem('ek_hide_comment_rating') === 'true') {
            appendStyle(stl);
        }
        
        $(document).on('keydown', function (e) {
            if (e.altKey === true && e.ctrlKey === true && e.which === 191) {
                if ($('#ek_hide_comment_rating').length) {
                    $('#ek_hide_comment_rating').remove();
                    ls.setItem('ek_hide_comment_rating', 'false');
                } else {
                    appendStyle(stl);
                    ls.setItem('ek_hide_comment_rating', 'true');
                }
            }
        });
        
        $(document).on('click', '.comment_rating .vote-plus, .comment_rating .vote-minus', function (e) {
            var me = $(this);
            var parent = me.parent().parent();
            parent.css('color', '#000');
        });
    });
})();