Easy Handy Ignore Button Script and CSS

  • Sometimes you want to ignore a topic. But you can't be fucked to open it up, scroll to the end, and use the (half-hidden) dropdown.

    Well now you don't have to! On your /unread list, you can have a big honking red IGNORE button (with confirmation).


    // ==UserScript==
    // @name        tdwtf - ignore on topic list
    // @namespace   Lorne
    // @include     https://what.thedailywtf.com/*
    // @version     1
    // @grant       all
    // @runat       document-end
    // ==/UserScript==
    var $ = unsafeWindow.jQuery;
    function changeWatching(tid, type, callback){
         callback = callback || function(){}; //callback's optional i guess
         var window = unsafeWindow;
                tid: tid,
                type: type
    function watchTopic(tid, callback){
         changeWatching(tid, 'follow', callback);
    function normalTopic(tid, callback){
         changeWatching(tid, 'unfollow', callback);
    function ignoreTopic(tid, callback){
         changeWatching(tid, 'ignore', callback);
    function topicChangeWatchCallback(a,b,c)
        console.log("done ", a, b, c);
        var $ = unsafeWindow.jQuery;  
        $(window).on('action:topics.loaded', function(event, data) 
            $button = $("<a href='#' class='ignore'>IGNORE</a>");
            console.log("topics loaded", event, data);
        $(document).on("click", ".topic-list .ignore", function(e)
            var tid = $(this).parents("[component='category/topic']:first").attr("data-tid")
            if(confirm("Are you sure you want to ignore this topic? " + tid ))
                ignoreTopic(tid, topicChangeWatchCallback);
            return false;

    Cascading Shitty Style:

    ul.topic-list .ignore
        border-width:2px !important;
        border-color: #551111 !important;
        background-color:#aa0505 !important;
        color:white !important;
        padding:0.5em 1em;
        cursor: pointer;

    Next version will remove the li from the list, once NodeBB actually puts information in the callback.

Log in to reply

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.