| @@ -1929,9 +1929,9 @@ | ||
| 1929 | 1929 | const sourceHtml = entry.has_link |
| 1930 | 1930 | ? '<a href="' + entry.source_url + '" target="_blank" style="color: var(--mxch-primary); text-decoration: none;"><span class="dashicons dashicons-external" style="font-size: 14px;"></span> View</a>' |
| 1931 | 1931 | : '<span style="color: var(--mxch-text-muted);">Manual</span>'; |
| 1932 | 1932 | |
| 1933 | - const deleteUrl = mxchatAdmin.admin_url + 'admin-post.php?action=mxchat_delete_prompt&id=' + entry.id + '&_wpnonce=' + entry.delete_nonce; | |
| 1933 | + const deleteUrl = mxchatAdmin.admin_url + 'admin-post.php?action=mxchat_delete_prompt&id=' + entry.id + '&bot_id=' + encodeURIComponent(mxchatAdmin.bot_id || 'default') + '&_wpnonce=' + entry.delete_nonce; | |
| 1934 | 1934 | |
| 1935 | 1935 | // Check if content needs expand button (content longer than preview) |
| 1936 | 1936 | const needsExpand = entry.content_length > entry.preview_length; |
| 1937 | 1937 | |
| @@ -2383,5 +2383,17 @@ | ||
| 2383 | 2383 | $chip.find('.mxchat-meta-chip-tick').text('✓ Added'); |
| 2384 | 2384 | } |
| 2385 | 2385 | }); |
| 2386 | 2386 | })(); |
| 2387 | + | |
| 2388 | + // ======================================== | |
| 2389 | + // VIDEO CARDS — threshold follows the master switch (plan f52492) | |
| 2390 | + // ======================================== | |
| 2391 | + // Presentation only. The server gate does NOT consult the threshold when | |
| 2392 | + // the switch is off, so hiding the field never changes behavior — it just | |
| 2393 | + // stops the page offering a number that is currently inert. Mirrors the | |
| 2394 | + // YouTube import form's own show/hide idiom on this same page. Autosave is | |
| 2395 | + // untouched: both fields keep their own change handler in mxchat-admin.js. | |
| 2396 | + $('#mxchat_video_embed_enabled').on('change', function() { | |
| 2397 | + $('#mxchat-video-embed-threshold-field').toggle($(this).is(':checked')); | |
| 2398 | + }); | |
| 2387 | 2399 | }); |