trello-done-checkbox.user.js
//Invokes listener after dialog box activation
Invokes listener after dialog box activation
Invokes listener after dialog box activation
function onDialogBoxActivation(listener) {
        var dialogBoxWasActive = false;
        $windowWrapper = $('div.window-wrapper');
        setInterval(function () {
            var dialogBoxActive = $windowWrapper.children().length > 0;
            if (dialogBoxActive && !dialogBoxWasActive) {
                listener();
            } else if (!dialogBoxActive) {
                unbindEventHandlers();
            }
            dialogBoxWasActive = dialogBoxActive;
        }, 250);
        function unbindEventHandlers() {
            if ($addDoneButton) {
                $addDoneButton.unbind();
                $addDoneButton = null;
            }
        }
    }
function onDialogBoxActivation ( listener ) { var dialogBoxWasActive = false ; $windowWrapper = $ ( 'div.window-wrapper' ) ; setInterval ( function ( ) { var dialogBoxActive = $windowWrapper . children ( ) . length > 0 ; if ( dialogBoxActive && ! dialogBoxWasActive ) { listener ( ) ; } else if ( ! dialogBoxActive ) { unbindEventHandlers ( ) ; } dialogBoxWasActive = dialogBoxActive ; } , 250 ) ; function unbindEventHandlers ( ) { if ( $addDoneButton ) { $addDoneButton . unbind ( ) ; $addDoneButton = null ; } } }
Invokes listener after dialog box activation
Invokes listener after dialog box activation
//Locate task dialog box div //Monitor dialog box state change