TransWikia.com

Jquery script loaded on every page

Joomla Asked by Gag on September 5, 2021

Every page on site has this script
Is there any role, seems like of tinymce editor
how to disable same, any plugin to disable, as i do not use tinymce on front end of site

<script type="text/javascript">
jQuery(function($) {
            SqueezeBox.initialize({});
            SqueezeBox.assign($('a.modal').get(), {
                parse: 'rel'
            });
        });

        window.jModalClose = function () {
            SqueezeBox.close();
        };

        // Add extra modal close functionality for tinyMCE-based editors
        document.onreadystatechange = function () {
            if (document.readyState == 'interactive' && typeof tinyMCE != 'undefined' && tinyMCE)
            {
                if (typeof window.jModalClose_no_tinyMCE === 'undefined')
                {   
                    window.jModalClose_no_tinyMCE = typeof(jModalClose) == 'function'  ?  jModalClose  :  false;

                    jModalClose = function () {
                        if (window.jModalClose_no_tinyMCE) window.jModalClose_no_tinyMCE.apply(this, arguments);
                        tinyMCE.activeEditor.windowManager.close();
                    };
                }

                if (typeof window.SqueezeBoxClose_no_tinyMCE === 'undefined')
                {
                    if (typeof(SqueezeBox) == 'undefined')  SqueezeBox = {};
                    window.SqueezeBoxClose_no_tinyMCE = typeof(SqueezeBox.close) == 'function'  ?  SqueezeBox.close  :  false;

                    SqueezeBox.close = function () {
                        if (window.SqueezeBoxClose_no_tinyMCE)  window.SqueezeBoxClose_no_tinyMCE.apply(this, arguments);
                        tinyMCE.activeEditor.windowManager.close();
                    };
                }
            }
        };

    </script>

One Answer

That particular script snippet comes from /libraries/cms/html/behavior.php and it's triggered by

JHtml::('behavior.modal')

That's actually a deprecated call, 'bootstrap.modal' is the preferred method these days. The SqueezeBox plugin was a lightbox for MooTools.

Look around in the code for the template you're using, and comment it out to see if you can end up removing it safely. In most cases you probably can; depends on how dependent your site is on modal dialog boxes.

Answered by Arlen on September 5, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP