Minimal change solution: submit confirmation form automatically by javascript - I could not find any other sane way, since the code expects a POST-call with tokens and stuff.
Edit style template: mark_forum_thread
Changes highlighted in red. Sorry, wasn't able to change text color inside a code block, so pasting as is.. just copy the red bits if needed..
(edit: added overlay-container hide for cleaner click)
<xf:if is="$forum">
<xf:title>{{ phrase('mark_forum_read') }}</xf:title>
<xf:else />
<xf:title>{{ phrase('mark_forums_read') }}</xf:title>
</xf:if>
<xf:form action="{{ link('forums/mark-read', $forum, {'date': $date}) }}" class="block" ajax="true" id="_customidMarkForumsRead">
<div class="block-container" style="display: none;">
<xf:if is="$forum">
<div class="block-body">
<xf:inforow rowtype="confirm">
{{ phrase('you_sure_you_want_to_mark_this_forum_read') }}
<strong><a href="{{ link('forums', $forum) }}">{$forum.title}</a></strong>
</xf:inforow>
</div>
<xf:submitrow submit="{{ phrase('mark_forum_read') }}" rowtype="simple" icon="markRead" />
<xf:else />
<div class="block-body">
<xf:inforow rowtype="confirm">{{ phrase('you_sure_you_want_to_mark_all_forums_read') }}</xf:inforow>
</div>
<xf:submitrow submit="{{ phrase('mark_forums_read') }}" rowtype="simple" icon="markRead" />
</xf:if>
</div>
</xf:form>
<xf:js>
$('.overlay-container').hide();
$('#_customidMarkForumsRead').submit();
</xf:js>