17

I'm having trouble finding an option to disable the tablet-like prompts after performing an action on the site. For example, after casting a vote:

enter image description here

There's no need to distract me when things are successful. I prefer dark and silent cockpits. I also don't use a tablet. I want to disable the distraction.

My Settings preferences only include the standard Keyboard, Navigation, Custom Questions and Advertisements. I don't see a setting for unneeded prompts.

How do I disable the prompts?


And just for fun. It looks like I am on a porn site competing for my clicks:

enter image description here

8
  • 5
    I don’t recognise that prompt. Is it new?
    – Tim
    Dec 21, 2018 at 11:38
  • 3
    It is new @Tim, just tried it. Looks very out of place on a desktop, at the top of the page.
    – user247702
    Dec 21, 2018 at 11:40
  • 1
    I don't think SE will create a way to do this, and hope there's a friendly JavaScript programmer somewhere that feels like creating a userscript for it.
    – Erik A
    Dec 21, 2018 at 12:33
  • The downvote tooltip when under the rep threshold now uses this new prompt.
    – fbueckert
    Dec 21, 2018 at 15:18
  • 5
    Related: meta.stackoverflow.com/questions/378125/…
    – Turnip
    Dec 21, 2018 at 15:58
  • 1
    @ErikvonAsmuth I wouldn't mind trying to create a userscript for it if I could see the inspect element for these elements. Unfortunately seems like a lot of work to see that prompt for me Dec 21, 2018 at 17:18
  • @GrumpyCrouton See my answer below.
    – TylerH
    Dec 21, 2018 at 17:21
  • adblock should work... but... i'd rather them just not be annoying. I'd hate to block it then not get a notification when i've only got a few votes left.
    – Kevin B
    Dec 21, 2018 at 18:04

1 Answer 1

2

It is highly unlikely that we will ever get the option to disable such messages; we've never been able to turn these off before.

However, one can write a userscript that targets this information to block it. However, because it is inserted via JavaScript, this will most likely require a JavaScript userscript to counter it, as a CSS userscript will typically only apply its changes on page-load:

browser tools screenshot of inserted div

(ignore the highlighted line in this image. The actual message div is the div class="grid--cell" one a few lines up)

I did try to block this with Stylus and it was unsuccessful (I believe because it was inserted after page load via JS).

Here is the JS function that stretches its legs whenever this action occurs (from /content/Js/full.en.js?v=30556cc8faea):

    D = function(e, t, n) {
        var i = e.text().indexOf("undelete") > -1;
        if (n && n.Success)
            if (e.html(n.Message), e.addClass("load-tooltip-on-hover"), n.NewScore < 0) {
                var o = $(".question:has(a[id='delete-post-" + t + "'])").length > 0,
                    a = o ? ".question, div.answer" : "#answer-" + t;
                R($(a), !i)
            } else S(e, i ? "Your undelete vote has been recorded" : "Your delete vote has been recorded");
        else {
            var r = n && n.Message ? n.Message : i ? "A problem occurred during undeletion" : "A problem occurred during deletion";
            k(e, r)
        }
        StackExchange.realtime.pauseQuestionNotifications = !1
    }
3
  • If I get some time, I may try to work on a userscript for this. A problem I see is that I'm not sure if actual (useful) error messages use the same structure, and I wouldn't want to block important information. To get around that, you could target elements with the words "Your delete vote has been recorded", and then transverse to the .s-toast parent and block that. I also have no way to test the userscript :/ Dec 21, 2018 at 17:25
  • @GrumpyCrouton Yes, I bet other messages use the same classes. Let me add the most immediate JS that plays a part.
    – TylerH
    Dec 21, 2018 at 17:31
  • 1
    Digging around the Stack Exchange code is often easier when looking at the unminified code. That shows S is really showInfoMessage, which is just a wrapper for StackExchange.helpers.showToast(). So, you can do what's desired by waiting until StackExchange.helpers.showToast() exists, then creating a wrapper for it that filters out the messages you desire to not see, or just add a transientTimeout property (in ms) to the options Object. If you want to know what options are available, the showToast() code is in stub.js.
    – Makyen Mod
    Dec 23, 2018 at 7:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .