[Userscript] Dashboard Vacation Mode

Dashboard Vacation Mode

Made this upon request a long time ago and didn’t think it needed its own thread, but it has a decent amount of installs so here we go.

What it does is add a shortcut to vacation mode to the menu. The button was previously located on the dashboard, but with the new update I figured this would be a better location.

Available At

→ The Shortcut Store ←

9 Likes

Hi there. This wasn’t working for me, and I made this change to get it to work. I don’t know if there is a better way to submit suggestions for changes to user scripts.

I’m on Firefox 78 and TamperMonkey 4.11.6117.

I changed this line:
btn.onclick = function() {$.post(form.url, form.data); window.location.reload();};

to:
btn.onclick = function() { $.post(form.url, form.data, function() { window.location.reload(); } );};

so that it doesn’t reload the page until the post returns success.

Thanks for the script. :slight_smile:

2 Likes

230185602321088514 I have incorporated your change

3 Likes

Great! Here’s another one.

This will change the ‘Manage vacation mode’ link to the account settings to a direct ‘Deactivate vacation mode’ to avoid needing to open the menu.

        var post = function() { $.post(form.url, form.data, function() { window.location.reload(); } );};
        btn.onclick = post;
        $('.sitemap__expandable-chunk--account >> .sitemap__page')[1].after(btn);
        $('[href="/settings/account#vacation-mode').text('Deactivate vacation mode').removeAttr('href').click(post);

Tweak it if the way I’ve done it is not optimal. :slight_smile:

3 Likes

Thanks! I don’t use this script myself, so I really appreciate the improvements! I have added this too, as well as a CSS rule to make the cursor a pointer so that it’s clear that you can click it.

4 Likes

Cool. I’m using it because I want to dedicate some time to Satori Reader before I keep going with my Wanis after feeling a little burnt out! :+1:

1 Like