From b42c438dd06987e9057b150a979d971b6542d68a Mon Sep 17 00:00:00 2001 From: Luna D Date: Thu, 6 Jun 2024 20:37:11 -0400 Subject: [PATCH] Remove long-obsolete owner options scripts --- assets/js/comment.js | 5 ----- assets/js/communications/comment.js | 10 ---------- assets/js/communications/post.js | 10 ---------- assets/js/when-ready.js | 5 ----- 4 files changed, 30 deletions(-) delete mode 100644 assets/js/communications/comment.js delete mode 100644 assets/js/communications/post.js diff --git a/assets/js/comment.js b/assets/js/comment.js index de245fa8..5dbdfac6 100644 --- a/assets/js/comment.js +++ b/assets/js/comment.js @@ -3,7 +3,6 @@ */ import { $ } from './utils/dom'; -import { showOwnedComments } from './communications/comment'; import { filterNode } from './imagesclientside'; import { fetchHtml } from './utils/requests'; import { timeAgo } from './timeago'; @@ -131,9 +130,6 @@ function displayComments(container, commentsHtml) { // Filter images in the comments filterNode(container); - // Show options on own comments - showOwnedComments(); - } function loadComments(event) { @@ -175,7 +171,6 @@ function setupComments() { } else { filterNode(comments); - showOwnedComments(); } } diff --git a/assets/js/communications/comment.js b/assets/js/communications/comment.js deleted file mode 100644 index a4661c61..00000000 --- a/assets/js/communications/comment.js +++ /dev/null @@ -1,10 +0,0 @@ -import { $ } from '../utils/dom'; - -function showOwnedComments() { - const editableComments = $('.js-editable-comments'); - const editableCommentIds = editableComments && JSON.parse(editableComments.dataset.editable); - - if (editableCommentIds) editableCommentIds.forEach(id => $(`#comment_${id} .owner-options`).classList.remove('hidden')); -} - -export { showOwnedComments }; diff --git a/assets/js/communications/post.js b/assets/js/communications/post.js deleted file mode 100644 index d2172220..00000000 --- a/assets/js/communications/post.js +++ /dev/null @@ -1,10 +0,0 @@ -import { $ } from '../utils/dom'; - -function showOwnedPosts() { - const editablePost = $('.js-editable-posts'); - const editablePostIds = editablePost && JSON.parse(editablePost.dataset.editable); - - if (editablePostIds) editablePostIds.forEach(id => $(`#post_${id} .owner-options`).classList.remove('hidden')); -} - -export { showOwnedPosts }; diff --git a/assets/js/when-ready.js b/assets/js/when-ready.js index b17e247b..3bd3e049 100644 --- a/assets/js/when-ready.js +++ b/assets/js/when-ready.js @@ -4,9 +4,6 @@ import { whenReady } from './utils/dom'; -import { showOwnedComments } from './communications/comment'; -import { showOwnedPosts } from './communications/post'; - import { listenAutocomplete } from './autocomplete'; import { loadBooruData } from './booru'; import { registerEvents } from './boorujs'; @@ -39,8 +36,6 @@ import { imageSourcesCreator } from './sources'; whenReady(() => { - showOwnedComments(); - showOwnedPosts(); loadBooruData(); listenAutocomplete(); registerEvents();