防止弹出窗口

时间:2018-09-30 15:34:17

标签: javascript popup

我目前正在与我的网站上的Gobot聊天机器人一起使用Drift实时聊天。我设置它的方式是,在通过Gobot选择“与真人聊天”选项之前,不会激活Drift。

我不希望Drift自行弹出,这就是它现在正在做的。我发现Gobot聊天机器人和Drift实时聊天一起弹出有点让人不知所措,我希望Drift实时聊天根本不会弹出,除非先由Gobot激活。无论如何,我可以阻止Drift聊天机器人弹出吗?

这是我注入到我的网站中的代码:

<!-- Start of Async Drift Code -->
<script>
"use strict";

!function() {
  var t = window.driftt = window.drift = window.driftt || [];
  if (!t.init) {
    if (t.invoked) return void (window.console && console.error && console.error("Drift snippet included twice."));
    t.invoked = !0, t.methods = [ "identify", "config", "track", "reset", "debug", "show", "ping", "page", "hide", "off", "on" ], 
    t.factory = function(e) {
      return function() {
        var n = Array.prototype.slice.call(arguments);
        return n.unshift(e), t.push(n), t;
      };
    }, t.methods.forEach(function(e) {
      t[e] = t.factory(e);
    }), t.load = function(t) {
      var e = 3e5, n = Math.ceil(new Date() / e) * e, o = document.createElement("script");
      o.type = "text/javascript", o.async = !0, o.crossorigin = "anonymous", o.src = "https://js.driftt.com/include/" + n + "/" + t + ".js";
      var i = document.getElementsByTagName("script")[0];
      i.parentNode.insertBefore(o, i);
    };
  }
}();
drift.SNIPPET_VERSION = '0.3.1';
drift.load('k5hts4324x64');
</script>
<!-- End of Async Drift Code -->

0 个答案:

没有答案