HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: /var/www/html/triad-infosec/wp-content/plugins/fusion-builder/js/fusion-plugin.js
/* global tinymce, FusionPageBuilderApp, openShortcodeGenerator */
( function( $ ) {
	if ( 'undefined' !== typeof tinymce ) {

		tinymce.PluginManager.add( 'fusion_button', function( editor ) {
			if ( ( ( 'undefined' !== typeof FusionPageBuilderApp && true === FusionPageBuilderApp.allowShortcodeGenerator && true !== FusionPageBuilderApp.shortcodeGenerator ) || 'content' === editor.id || 'excerpt' === editor.id ) || ( ( jQuery( 'body' ).hasClass( 'gutenberg-editor-page' ) || jQuery( 'body' ).hasClass( 'block-editor-page' ) ) && 0 === editor.id.indexOf( 'editor-' ) ) ) {

				editor.addButton( 'fusion_button', {
					title: 'Avada Builder Element Generator',
					icon: 'insertdatetime',
					onclick: function() {

						// Set editor that triggered shortcode generator.
						if ( 'undefined' !== typeof FusionPageBuilderApp ) {
							FusionPageBuilderApp.shortcodeGeneratorActiveEditor = editor;
						}

						// Open shortcode generator.
						openShortcodeGenerator( $( this ) );
					}
				} );
			}
		} );
	}
}( jQuery ) );