0

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>
  • If it is appearing on every page then it is most likely a Plugin, but could also be your template that is causing it to be created. You can either disable plugins via the admin pages until you can identify the one causing this code to be inserted or scan the folder /plugins for any identifying text from the code above and see if it shows you which file it is coming from that can then lead you to which plugin is generating the code. – Irata Jan 25 at 11:09
0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.