ADDED Code of Version 2.0.0 of the Advanced Composer Blocks for Newsletter Plugin

This commit is contained in:
Daniel Reintanz 2025-10-01 11:43:20 +02:00
commit 028d595144
28 changed files with 2187 additions and 0 deletions

View file

@ -0,0 +1,26 @@
jQuery(function ($) {
// -------------------------------------------------------------------
// Extract the ID from the URL
var urlParams = new URLSearchParams(window.location.search);
var id = urlParams.get('id');
// Only proceed if the ID is present
if (id) {
// Get the root domain
var domain = window.location.protocol + '//' + window.location.hostname;
// Create the new button
var livePreviewButton = $('<a/>', {
class: 'button-primary',
href: domain + '/?na=view&id=' + id,
target: '_blank',
html: '<i class="fas fa-eye"></i>'
});
// Append the button to the menu
$('.tnpb-actions').append(livePreviewButton);
}
// -------------------------------------------------------------------
});