[Posts] Add a confirmation dialogue to the tag script "apply all" button (#857)

This commit is contained in:
Cinder 2025-01-26 07:28:02 -08:00 committed by GitHub
parent 0db551db62
commit 72d0878a0b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -107,7 +107,9 @@ PostModeMenu.initialize_tag_script_field = function () {
PostModeMenu.tag_script_apply_all = function (event) {
event.preventDefault();
$("article.thumbnail").trigger("click");
const posts = $("article.thumbnail");
if (!confirm(`Apply the tag script to ${posts.length} posts?`)) return;
posts.trigger("click");
};
PostModeMenu.update_sets_menu = function () {