HEX
Server: Apache
System: Linux host.fiblib.com 5.14.0-611.5.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Nov 11 08:09:09 EST 2025 x86_64
User: agritoday (1002)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: /home/agritoday/www/wp-content/plugins/td-composer/assets/js/js_files_for_gutenberg_editor.min.js
(function(b){var c={init:function(){var a=this;setTimeout(function(){a.elements();a.events()},10)},elements:function(){this.cache={};this.cache.$gutenbergEditor=b("#editor");this.cache.$gutenbergSwitch=b(b("#tdc-gutenberg-button-switch").html());this.cache.$gutenbergEditor.find(".edit-post-header-toolbar").after(this.cache.$gutenbergSwitch);this.cache.$switchButton=this.cache.$gutenbergSwitch.find("#tdc-switch-button")},events:function(){var a=this;a.cache.$switchButton.on("click",function(b){b.preventDefault();
wp.data.select("core/editor").getEditedPostAttribute("title")||wp.data.dispatch("core/editor").editPost({title:"TagDiv Composer Draft"});wp.data.dispatch("core/editor").savePost();a.redirectWhenSave()})},redirectWhenSave:function(){var a=this;setTimeout(function(){wp.data.select("core/editor").isSavingPost()?a.redirectWhenSave():location.href=tdcGutenbergSettings.tdcEditLink},300)}};b(function(){c.init()})})(jQuery);