Twitterの通知タブで表示されるRT系を表示しないようにする Tampermonkey スクリプト

// ==UserScript==
// @name         Kill RT notifications
// @namespace    http://koge2do.jp/
// @version      0.1
// @description  Twitterの通知タブで表示されるRT系を表示しないようにする
// @author       ISA
// @match        https://twitter.com/i/notifications
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    var css = $('<style type="text/css">.js-activity-retweeted_retweet,.js-activity-favorited_retweet{ display: none; }</style>');
    $('body').append(css);

    var button = $('<input type="checkbox">');
    var label = $('<label class="NotificationsSettingsButton"></label>').append(button).append('RT');
    $('.ProfileHeading-toggle > .NotificationsSettingsButton').after(label);

    button.change(function () {
        if ($(this).prop('checked')) {
            css.remove();
        } else {
            $('body').append(css);
        }
    });

})();