private void CurrentFilter_OnAfterFiltering(ResponseOutputFilter filter, ref string finalHtml)
        {
            // if it is the live site, we are bailing. Quick Bail, I do not want to affect performance of the live site
            if (PortalContext.ViewMode == ViewModeEnum.LiveSite)
            {
                return;
            }


            bool injectJs = false;

            if (PortalContext.ViewMode == ViewModeEnum.EditLive)
            {
                // On Site Editing
                injectJs = SettingsUtility.GetIsEnabledOnOnSiteEditing();
            }
            else if (PortalContext.ViewMode == ViewModeEnum.Edit)
            {
                // Assume "Page" tab
                injectJs = SettingsUtility.GetIsEnabledOnPage();
            }
            else
            {
                return; // bail on all other ViewModes
            }
            if (!injectJs)
            {
                return;
            }

            // add script to bottom of body
            var jsCode = SiteimproveUtility.GetJavascriptBigBoxSmart(DocumentContext.CurrentDocument);

            finalHtml = CommonUtility.AddJavascriptToEndOfBody(finalHtml, jsCode, false);
        }