Remove long-obsolete owner options scripts

This commit is contained in:
Luna D 2024-06-06 20:37:11 -04:00 committed by Liam
parent d8fd98ea27
commit b42c438dd0
4 changed files with 0 additions and 30 deletions

View file

@ -3,7 +3,6 @@
*/ */
import { $ } from './utils/dom'; import { $ } from './utils/dom';
import { showOwnedComments } from './communications/comment';
import { filterNode } from './imagesclientside'; import { filterNode } from './imagesclientside';
import { fetchHtml } from './utils/requests'; import { fetchHtml } from './utils/requests';
import { timeAgo } from './timeago'; import { timeAgo } from './timeago';
@ -131,9 +130,6 @@ function displayComments(container, commentsHtml) {
// Filter images in the comments // Filter images in the comments
filterNode(container); filterNode(container);
// Show options on own comments
showOwnedComments();
} }
function loadComments(event) { function loadComments(event) {
@ -175,7 +171,6 @@ function setupComments() {
} }
else { else {
filterNode(comments); filterNode(comments);
showOwnedComments();
} }
} }

View file

@ -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 };

View file

@ -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 };

View file

@ -4,9 +4,6 @@
import { whenReady } from './utils/dom'; import { whenReady } from './utils/dom';
import { showOwnedComments } from './communications/comment';
import { showOwnedPosts } from './communications/post';
import { listenAutocomplete } from './autocomplete'; import { listenAutocomplete } from './autocomplete';
import { loadBooruData } from './booru'; import { loadBooruData } from './booru';
import { registerEvents } from './boorujs'; import { registerEvents } from './boorujs';
@ -39,8 +36,6 @@ import { imageSourcesCreator } from './sources';
whenReady(() => { whenReady(() => {
showOwnedComments();
showOwnedPosts();
loadBooruData(); loadBooruData();
listenAutocomplete(); listenAutocomplete();
registerEvents(); registerEvents();