function suppressVisited(parent) {
    var choiceButtons = $(parent).find('.ink-choice');

    for (var choiceButton of choiceButtons) {
        var message = game.collections.get("ChatMessage").get($(choiceButton).closest(".chat-message").data("messageId"));
        if (serde.SessionData.fromFlag(message)?.visited) {

            $(choiceButton).off('click');
            $(choiceButton).prop('disabled', true);
        }
    }
}
/** Suppresses DOM listeners on visited choices */
Suppresses DOM listeners on visited choices
Suppresses DOM listeners on visited choices
function suppressVisited(parent) {
    var choiceButtons = $(parent).find('.ink-choice');
    for (var choiceButton of choiceButtons) {
        var message = game.collections.get("ChatMessage").get($(choiceButton).closest(".chat-message").data("messageId"));
        if (serde.SessionData.fromFlag(message)?.visited) {
            $(choiceButton).off('click');
            $(choiceButton).prop('disabled', true);
        }
    }
}
function suppressVisited ( parent ) { var choiceButtons = $ ( parent ) . find ( '.ink-choice' ) ; for ( var choiceButton of choiceButtons ) { var message = game . collections . get ( "ChatMessage" ) . get ( $ ( choiceButton ) . closest ( ".chat-message" ) . data ( "messageId" ) ) ; if ( serde . SessionData . fromFlag ( message ) ?. visited ) { $ ( choiceButton ) . off ( 'click' ) ; $ ( choiceButton ) . prop ( 'disabled' , true ) ; } } }
Suppresses DOM listeners on visited choices
Suppresses DOM listeners on visited choices