Doing It Wrong Userscripts - Stop Updates



  • Here's a simple one that I came up with. The way that topic list pages constantly update a new posts number in the title bar is annoying to me. This forum isn't even all that high-traffic, and it still updates every few seconds. I found it distracting, and wanted to stop it, and this seems to get the job done:

    // ==UserScript==
    // @name         Block Discourse title updates
    // @match        http://what.thedailywtf.com/*
    // @grant          unsafeWindow
    // ==/UserScript==
    
    _.each(
        _.filter(unsafeWindow.MessageBus.callbacks, 
            function(i) { return i.channel === '/latest' || i.channel === '/new'; }), 
        function(i) { unsafeWindow.MessageBus.unsubscribe(i.channel, i.func) });
    

    And it's easy to add as many Discourse sites as you'd like to the match tag.

    Naturally, Discourse shows no interest in developing or merging any changes to make this a user option. If you dare to let your attention drift from any Discourse forum for a moment, then you're clearly Doing It Wrong.


  • SockDev

    if it's only the title bar that's alloying you....


  • SockDev

    ...

    THERE WAS MORE TO THAT POST!

    DISCOURSE!!!!!!!!!!!!!!!!!!!!!!!!

    where did you put it? hmm?



  • did you mean "annoying"?


  • SockDev

    yes i did. i also wandered off to find the discobool in settings to disable that behavior, but it's gone.

    and discourse ate that comment.... naturally.



  • @ufmace said:

    This forum isn't even all that high-traffic, and it still updates every few seco

    The bar in chrome is an alloy. that's really alloying.

    @accalia said:

    yes i did

    oh



  • @Monarch said:

    chrome... alloy

    Doing it Right!


  • kills Dumbledore

    @accalia said:

    wandered off to find the discobool in settings to disable that behavior, but it's gone

    This one?

    But rereading the OP, I think he's talking about the tab title, like

    (1)What the daily WTF



  • @Jaloopa said:

    This one?

    I think it's these ones:

    From:

    @ufmace said:

    return i.channel === '/latest' || i.channel === '/new';

    Quite what's distracting about it updating I'm not sure since if I'm on here I'm usually on a topic page, and if I'm not on here, I'm usually looking at something else. And I've not actually noticed it 'updating' as such...

    FWP thread :random_arrows: etc.


  • kills Dumbledore

    @PJH said:

    FWP thread :random_arrows: etc

    You'll have trouble finding it with those directions. I think the current name is something about Discworld cheat codes



  • @Jaloopa said:

    cheat codes

    All the better for using random arrows with.



  • @Jaloopa said:

    But rereading the OP, I think he's talking about the tab title, like
    >(1)What the daily WTF

    Yeah, that's the one.

    It seems to update anytime anybody posts anywhere on the board. Even when it's in the background, it just sits there with it's little (1), then (2), then (5), then (13), beckoning you to look at what keeps updating.

    Mostly because of my habit of keeping a topic list tab open, and opening threads I want to read in their own tabs. Apparently, just keeping one DiscoTab open at once and moving around on that is the Right way to do it, and if you like to browse forums any other way, than you're Doing It Wrong.



  • @PJH said:

    I think it's these ones:

    <img src="/uploads/default/13042/9732036c79dc480d.png" width="493" height="37">

    From:

    @ufmace said:

    return i.channel === '/latest' || i.channel === '/new';

    Quite what's distracting about it updating I'm not sure since if I'm on here I'm usually on a topic page, and if I'm not on here, I'm usually looking at something else. And I've not actually noticed it 'updating' as such...

    FWP thread :random_arrows: etc.

    That one doesn't bother me much, since you can't see it when you're on another tab. But it does stop that as a side-effect, and the little bar at the top of the list saying X Updates, Click To View, which I also thought was annoying. I took the simple, broad method of removing the messagebus subscriptions for updates, so anything that uses updates to the whole forum will only see it on a page refresh. Live updates to other stuff like notifications and new posts in threads, still work fine.



  • @ufmace said:

    Yeah, that's the one.

    So you have this checked in http://what.thedailywtf.com/my/preferences ?:


  • SockDev

    i do not and i see the behavior that @ufmace is discribing.

    AFAICT checking it changes nothing....



  • @PJH said:

    So you have this checked in http://what.thedailywtf.com/my/preferences ?:

    <img src="/uploads/default/13067/51575852b7305197.png" width="350" height="33">

    Nope, never checked that. And if I had, it looks like it would put a notification thingy on the favicon, not really related to the number in the title text.


  • kills Dumbledore

    Not the favicon, the text version



  • Ah - OK. Forgot about that since munging the favicon seems to disable it.



  • Proposed workaround:



  • @tar said:

    Proposed workaround:
    Works for me!


Log in to reply
 

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