shPost.addEventListener('click', () => {
            const postId = parseInt(elements.publishPostId.value);
            if (!isNaN(postId)) {
                worker.postMessage({ cmd: "publish_post", post_id: postId });
            } else {
                elements.publishResult.innerHTML = '<pre style="color: red">Please enter a valid post ID</pre>';
            }
        });

        elements.deletePost.addEventListener('click', () => {
            const title = elements.deletePostTitle.value.trim();
    