NSFWコンテンツのぼかし解決策

OPの編集はもうできませんが、更新されたコードを共有します。あなたの「クリック時」の解決策も教えていただけますか?

<!-- 現在のユーザーのNSFW設定をbodyタグに追加 -->
<script type="text/discourse-plugin" version="0.8.7">

// https://meta.discourse.org/t/css-classes-for-group-membership-for-simplified-ui-mode/60838/2
if (window.jQuery) {
    window.jQuery(function ($) {

        let currentUser = api.getCurrentUser();
        
        if (currentUser) {
            api.container.lookup('store:main').find('user', currentUser.username).then((user) => {

                if (user.user_fields[2]) {
                    $('body').addClass('nsfw-always-show' );
                }
            });
        }
    });
};
</script>
「いいね!」 2