HEX
Server: Apache/2.4.29 (Ubuntu)
System: Linux bareserver 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64
User: root (0)
PHP: 7.2.24-0ubuntu0.18.04.17
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
Upload Files
File: /var/www/html/site/newsiteanterior/wp-content/plugins/essential-blocks/assets/js/eb-patterns.js
document.querySelector('body').addEventListener("change", function (e) {
	var el = document.querySelector('.block-editor-inserter__tabs .block-editor-inserter__panel-header .components-select-control__input');
	if(el && el.value.trim().toLowerCase() === 'essential-blocks'){
		var btn = document.createElement('a');
		btn.classList.add('eb-more-patterns-btn');
		btn.href = '#';
		if(EssentialBlocksLocalize.is_templately_active){
			btn.innerHTML = 'See more in <strong>Templately</strong>';
			btn.classList.add('templately-active');
		}
		if(!EssentialBlocksLocalize.is_templately_active && EssentialBlocksLocalize.is_templately_installed){
			btn.innerHTML = 'Active <strong>Templately</strong> to get more';
			btn.href = EssentialBlocksLocalize.eb_admin_url + 'plugins.php';
			btn.target = "_blank";
		}
		if(!EssentialBlocksLocalize.is_templately_active && !EssentialBlocksLocalize.is_templately_installed){
			btn.innerHTML = 'Install <strong>Templately</strong> to get more';
			btn.href = EssentialBlocksLocalize.eb_admin_url + 'plugin-install.php?s=templately&tab=search&type=term';
			btn.target = "_blank";
		}
		el.closest('.components-tab-panel__tab-content').append(btn);
	}else{
		btn = document.querySelector('.eb-more-patterns-btn');
		if(btn){
			btn.remove();
		}
	}
	var templatelyBtn = document.querySelector('.eb-more-patterns-btn.templately-active');
	if(templatelyBtn){
		templatelyBtn.addEventListener('click', function (e) {
			document.querySelector('.gutenberg-add-templately-button').click();
			// document.querySelector('#templately-gutenberg-button').click();
		});
	}
});

/*var observer = new MutationObserver(function (mutationsList) {
	var el = document.querySelector('.block-editor-block-patterns-explorer');
	if(el){

	}
});

observer.observe(document.querySelector('body'), {childList: true});*/