Beeminder Forum

Beeminder as task list, Tampermonkey script

Here is a tiny Tampermonkey (https://www.tampermonkey.net) script that will dim out a goal that has a value today.
https://1drv.ms/u/s!AlbCIHapmel9hOJf0bJAt9pNBYcxzQ
It looks like this

Alternatively one could change this to completely hide these goals, so that by the end of the day you end up with an empty page :slight_smile:

@dreev would be great if the same/similar CSS classes were added in the Gallery page (which is my main overview).

And on the subject, would be nice to have a different icon/CSS class for the case where there is a value for the current date, but is below the daily rate of the goal.

thank you

3 Likes

And since changes on Beeminder take time, here’s a Stylus (https://github.com/openstyles/stylus) CSS file that converts the overview page into a gallery-like page :smiley:
https://1drv.ms/u/s!AlbCIHapmel9hOJgj-TzMK482CQT9A?e=fAicS9

It’s a dream come true, all my goals fitting in a single screen :slight_smile:

2 Likes

I can’t import that .zip :frowning: It says it can’t parse it.


I don’t know, I just used the export function of Tapermonkey. It’s just a couple of text files, you can probably just copy/paste the code.

Hmm, it worked for me! Odd.

1 Like

Interesting! I’m not sure if I will use this much (I already have a good routine set up), but I’m playing with it! Thank you for sharing. :smiley:

3 Likes

Yes, it’s definitely a different routine. I’m now triggered to work in goals that have 20+ days of buffer and that i didn’t mean to be working on on a daily basis :smiley:
A victim of my success :smiley:

1 Like

Thanks so much for sharing this! Just to make sure everyone knows, there’s a similar built-in feature (or the opposite of it?) that puts checkmarks next to goals that have had data added today.

http://beeminder.com/changelog#870

1 Like

Actually the script works because of that check marks feature , it looks for the related elements on the page :slight_smile:

2 Likes

Just got around to installing this extension today. It’s really neat!

I made a couple modifications to animate the style change and rerun the script on deadline sort and data submit, and reverse the change on hover:

// ==UserScript==
// @name         Beeminder task list
// @namespace    
// @version      0.1
// @description  Hide goals that have a value today
// @author       Markos Giannopoulos
// @match        https://www.beeminder.com/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    function run() {
        jQuery(".todayta:visible").parent().parent().parent().animate({'background-color': 'white', 'opacity': '0.1'}, 500).mouseenter(function() {
            $(this).css('opacity', '1');
        }).mouseleave(function() {
            $(this).css('opacity', '0.1');
        });
    }

    jQuery('*[data-sort-string="losedate"]').click(run);
    jQuery('*[value="Add progress"]').click(function() {
        setTimeout(run, 3000);
    });

    run();
})();
1 Like

More tweaks!

  • Completely hide goals.
  • Don’t hide red goals.
  • Add toggle link.

// ==UserScript==
// @name         Beeminder task list
// @namespace
// @version      0.1
// @description  Hide goals that have a value today
// @author       Markos Giannopoulos
// @match        https://www.beeminder.com/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    var enabled = true;

    window.mgFilterTodos = function() {
        var targets = jQuery(".todayta:visible").parent().parent().parent().not('.red');
        if (enabled) {
            jQuery(".todayta:visible").parent().parent().parent().not('.red').slideUp();
        } else {
            jQuery(".todayta").parent().parent().parent().not('.red').slideDown();
        }
    }

    window.mgToggleTodos = function() {
        enabled = !enabled;
        mgFilterTodos();
    }

    jQuery('*[data-sort-string="losedate"]').click(mgFilterTodos);
    jQuery('*[value="Add progress"]').click(function() {
        setTimeout(mgFilterTodos, 3000);
    });

    var body = document.querySelector('body'),
        content = document.querySelector('.dashboard.content'),
        wrapper = document.createElement('div');

    wrapper.innerHTML = '<a href="#" onclick="mgToggleTodos(); return false;">Toggle Todos</a>';

    var node = body.insertBefore(wrapper, content);

    node.style.textAlign = "center";

    mgFilterTodos();
})();
1 Like

My Emacs beeminder client can do a similar thing, where the user gives a percentage and the goal is filtered out if donetoday is greater than that percentage of the daily slope of the YBR. So, for percentage equal to zero you get almost exactly this behavior. (Almost, since you can do an even nicer thing: you can define “today” to be the "until the goals’ deadlines, or the real “today”, or the real “today” but extended to e.g. 3am for people who still work after midnight.)

Also, I have other filters implemented, like “only show tasks due in n days”, “only show goals with deadline in n hours no matter which day”, and “do not show these particular goals I selected manually” (e.g. since I won’t do anything with them anyway today).

Just sayin’.

2 Likes