6

A Screenshot

To help people not accidentally delete them, especially the short ones.
(Also see the cause to get them removed permanentely)

Sorry to not provide a file for download but i am sure you will manage somehow, adjust includes and exlcudes as needed:

// ==UserScript==
// @name           Remove Favourite-Tag-Delete-Buttons
// @namespace      stackoverflow
// @include        *stackoverflow.com*
// @exclude        *stackoverflow.com/users/preferences/*
// ==/UserScript==

(function ()
{
    var cancelWaiting = false;
    jq_wait();

    function jq_wait()
    {
        if (typeof unsafeWindow.jQuery == 'undefined')
        {
            window.setTimeout(jq_wait, 100);
        } else
        {
            $ = unsafeWindow.jQuery;
            window.setTimeout(function () { cancelWaiting = true; }, 5000);
            $(document).ready(tag_wait);
        }
    }

    function tag_wait()
    {
        var items = $("#interesting-tags .delete-tag");
        if (items.length == 0)
        {
            if (cancelWaiting) return;
            window.setTimeout(tag_wait, 10);
        } else
        {
            items.remove();
        }
    }
})();

Edits:

  • Selector also matched the delete buttons on comments, which was not wanted.
  • Added @exclude exception for the preferences page

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.