Mini Kabibi Habibi

Current Path : C:/Program Files/McAfee/WebAdvisor/MFW/packages/webadvisor/
Upload File :
Current File : C:/Program Files/McAfee/WebAdvisor/MFW/packages/webadvisor/wa-ss-toast-rebranding-bing.js

/* SecureSearch Toast UI */
(function (wa, $) {
  var ui = (wa.UI = wa.UI || {}),
    _instrument = wa.Utils.Instrument,
    _window = wa.Core.Window;

  ui.SecureSearchToast = function () {
    var $el = {
      contentInfoTitle: $("#info-title"),
      contentInfoText: $("#info-text"),
      checkboxQuestion: $("#checkbox-question"),
      subFooterText: $("#sub-footer-text"),
      doneButton: $("#done"),
      declineButton: $("#decline"),
    },

      fillText = function (lang) {
        $el.contentInfoTitle.html(lang("SEARCH_TOAST_HEADING"));
        $el.contentInfoText.html(lang("SEARCH_TOAST_SUB_HEADING"));
        $el.checkboxQuestion.html(lang("SEARCH_TOAST_BODY_TEXT"));
        $el.subFooterText.html(lang("SEARCH_TOAST_SUB_FOOTER"));
        $el.doneButton.html(lang("SEARCH_TOAST_YES"));
        $el.declineButton.html(lang("SEARCH_TOAST_NO"));
      },

      init = function (lang) {
        fillText(lang);

        _window.setWidth("579");
        _window.setHeight("350");

        $el.doneButton.click(function () {
          // Send telemetry for Secure Search Acceptance
          _instrument.sendSecureSearchToastEvent("Accepted", _instrument.getBrowserTypeCode(), _instrument.getSecureSearchProvider(), "green_bing_offer_toast");
          wa.Core.SecureSearch.enable();
          _window.close();
        });
        $el.declineButton.click(function () {
          // Send telemetry for Secure Search Decline
          _instrument.sendSecureSearchToastEvent("Declined", _instrument.getBrowserTypeCode(), _instrument.getSecureSearchProvider(), "green_bing_offer_toast");
          wa.Core.SecureSearch.disable();
          _window.close();
        });
      },
      
      show = function () {
        _window.ready(function () {
          var lang = wa.Utils.Lang(wa.Utils.Lang.ResType.SSTOAST).get;

          init(lang);

          _window.show();

          // Send telemetry for Impression
          _instrument.sendSecureSearchToastEvent("Impression", _instrument.getBrowserTypeCode(), _instrument.getSecureSearchProvider(), "green_bing_offer_toast");

        });
      };

    return {
      show: show,
    };
  };
})((window.WebAdvisor = window.WebAdvisor || {}), jQuery);

$(function () {
  var toast = new WebAdvisor.UI.SecureSearchToast();
  toast.show();
});

//4A92539727A9E8C469AD3D71F63B2103172B54100AD8D77174EA130478363CEE4CAA3A105CC2C0A0AB808CFDE79B2B1A5F7060918E9B97E114A831BACFE052E0++