Boxzilla - Version 3.0.2

Version Description

Download this release

Release Info

Developer DvanKooten
Plugin Icon 128x128 Boxzilla
Version 3.0.2
Comparing to
See all releases

Code changes from version 3.0.1 to 3.0.2

assets/js/script.js CHANGED
@@ -471,7 +471,7 @@ function checkTimeCriteria() {
471
  // check triggerHeight criteria for all boxes
472
  function checkHeightCriteria() {
473
  var scrollY = window.scrollY;
474
- var scrollHeight = scrollY + ( windowHeight * 0.9 );
475
 
476
  each(boxes, function(box) {
477
  if( ! box.mayAutoShow() || box.triggerHeight <= 0 ) {
@@ -630,10 +630,10 @@ Boxzilla.toggle = function(id) {
630
  }
631
  };
632
 
 
 
633
  if ( typeof module !== 'undefined' && module.exports ) {
634
  module.exports = Boxzilla;
635
- } else {
636
- this.Boxzilla = Boxzilla;
637
  }
638
  },{"./Box.js":2,"./Timer.js":4,"wolfy87-eventemitter":5}],4:[function(require,module,exports){
639
  'use strict';
471
  // check triggerHeight criteria for all boxes
472
  function checkHeightCriteria() {
473
  var scrollY = window.scrollY;
474
+ var scrollHeight = scrollY + ( windowHeight * 0.667 );
475
 
476
  each(boxes, function(box) {
477
  if( ! box.mayAutoShow() || box.triggerHeight <= 0 ) {
630
  }
631
  };
632
 
633
+ window.Boxzilla = Boxzilla;
634
+
635
  if ( typeof module !== 'undefined' && module.exports ) {
636
  module.exports = Boxzilla;
 
 
637
  }
638
  },{"./Box.js":2,"./Timer.js":4,"wolfy87-eventemitter":5}],4:[function(require,module,exports){
639
  'use strict';
assets/js/script.min.js CHANGED
@@ -1,2 +1,2 @@
1
- !function(){var e=void 0,t=void 0;!function i(t,n,o){function r(c,l){if(!n[c]){if(!t[c]){var a="function"==typeof e&&e;if(!l&&a)return a(c,!0);if(s)return s(c,!0);var h=new Error("Cannot find module '"+c+"'");throw h.code="MODULE_NOT_FOUND",h}var u=n[c]={exports:{}};t[c][0].call(u.exports,function(e){var i=t[c][1][e];return r(i?i:e)},u,u.exports,i,t,n,o)}return n[c].exports}for(var s="function"==typeof e&&e,c=0;c<o.length;c++)r(o[c]);return r}({1:[function(e,t,i){"use strict";function n(e,t){t.background_color&&(e.style.background=t.background_color),t.color&&(e.style.color=t.color),t.border_color&&(e.style.borderColor=t.border_color),t.border_width&&(e.style.borderWidth=parseInt(t.border_width)+"px"),t.border_style&&(e.style.borderStyle=t.border_style),t.width&&(e.style.maxWidth=parseInt(t.width)+"px")}var o=e("boxzilla"),r=window.boxzilla_options,s=document.body.className.indexOf("logged-in")>-1;s&&r.testMode&&console.log("Boxzilla: Test mode is enabled. Please disable test mode if you're done testing."),o.init();for(var c=0;c<r.boxes.length;c++){var l=r.boxes[c];l.testMode=s&&r.testMode;var a=o.create(l.id,l);n(a.element,l.css)}window.Boxzilla=o},{boxzilla:3}],2:[function(e,t,i){"use strict";function n(e,t){var i={};for(var n in e)i[n]=e[n];for(var n in t)i[n]=t[n];return i}var o,r=window.jQuery,s={animation:"fade",rehide:!1,content:"",cookieTime:0,icon:"&times",minimumScreenWidth:0,position:"center",testMode:!1,trigger:!1,closable:!0},c=function(e,t){this.id=e,this.config=n(s,t),this.overlay=document.getElementById("boxzilla-overlay"),this.visible=!1,this.closed=!1,this.triggered=!1,this.triggerHeight=0,this.cookieSet=!1,this.config.trigger&&("percentage"!==this.config.trigger.method&&"element"!==this.config.trigger.method||(this.triggerHeight=this.calculateTriggerHeight()),this.cookieSet=this.isCookieSet()),this.element=this.dom(),this.$element=r(this.element),this.events()};c.prototype.events=function(){var e=this;this.$element.find(".boxzilla-close-icon").click(e.dismiss.bind(this)),this.$element.on("click","a",function(t){o.trigger("box.interactions.link",[e,t.target])}),this.$element.on("submit","form",function(t){e.setCookie(),o.trigger("box.interactions.form",[e,t.target])}),r(document.body).on("click",'a[href="#boxzilla-'+e.id+'"]',function(){return e.toggle(),!1}),this.fits()&&this.locationHashRefersBox()&&r(window).load(this.show.bind(this))},c.prototype.dom=function(){var e=document.createElement("div");e.className="boxzilla-container boxzilla-"+this.config.position+"-container";var t=document.createElement("div");t.className="boxzilla boxzilla-"+this.id+" boxzilla-"+this.config.position,t.style.display="none",e.appendChild(t);var i=document.createElement("div");i.className="boxzilla-content",i.innerHTML=this.config.content,t.appendChild(i);var n=i.querySelectorAll("script");if(n.length){for(var o=document.createElement("script"),r=0;r<n.length;r++)o.appendChild(document.createTextNode(n[r].text)),n[r].parentNode.removeChild(n[r]);document.head.appendChild(o)}if(this.config.closable&&this.config.icon){var s=document.createElement("span");s.className="boxzilla-close-icon",s.innerHTML=this.config.icon,t.appendChild(s)}return document.body.appendChild(e),t},c.prototype.setCustomBoxStyling=function(){this.element.style.overflowY="auto",this.element.style.maxHeight="none";var e=window.innerHeight,t=this.$element.outerHeight();if(t>e&&(this.element.style.maxHeight=e+"px",this.element.style.overflowY="scroll"),"center"===this.config.position){var i=(e-t)/2;i=i>=0?i:0,this.element.style.marginTop=i+"px"}},c.prototype.toggle=function(e){return"undefined"==typeof e&&(e=!this.visible),this.$element.is(":animated")?!1:e===this.visible?!1:e||this.config.closable?(this.visible=e,this.setCustomBoxStyling(),"center"===this.config.position&&r(this.overlay).fadeToggle("slow"),o.trigger("box."+(e?"show":"hide"),[this]),"fade"===this.config.animation?this.$element.fadeToggle("slow"):this.$element.slideToggle("slow"),!0):!1},c.prototype.show=function(){return this.toggle(!0)},c.prototype.hide=function(){return this.toggle(!1)},c.prototype.calculateTriggerHeight=function(){var e=0;if("element"===this.config.trigger.method){var t=r(this.config.trigger.value).first();e=t.length>0?t.offset().top:0}else"percentage"===this.config.trigger.method&&(e=this.config.trigger.value/100*r(document).height());return e},c.prototype.setCookie=function(){if(this.config.cookieTime){var e=new Date;e.setDate(e.getDate()+this.config.cookieTime),document.cookie="boxzilla_box_"+this.id+"=true; expires="+e.toUTCString()+"; path=/"}},c.prototype.locationHashRefersBox=function(){if(!window.location.hash||0===window.location.hash.length)return!1;var e=window.location.hash.substring(1);return e===this.element.id?!0:!!this.element.querySelector("#"+e)},c.prototype.fits=function(){return this.config.minimumScreenWidth<=0?!0:window.innerWidth>this.config.minimumScreenWidth},c.prototype.mayAutoShow=function(){return this.closed?!1:this.fits()&&this.config.trigger?!this.cookieSet:!1},c.prototype.mayRehide=function(){return this.config.rehide&&this.triggered},c.prototype.isCookieSet=function(){if(this.config.testMode)return!1;if(!this.config.cookieTime)return!1;var e="true"===document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*boxzilla_box_"+this.id+"\\s*\\=\\s*([^;]*).*$)|^.*$"),"$1");return e},c.prototype.trigger=function(){var e=this.show();e&&(this.triggered=!0)},c.prototype.dismiss=function(){this.hide(),this.setCookie(),this.closed=!0,o.trigger("box.dismiss",[this])},t.exports=function(e){return o=e,c}},{}],3:[function(e,t,i){"use strict";function n(e,t){for(var i in e)e.hasOwnProperty(i)&&t(e[i])}function o(e,t,i){t||(t=250);var n,o;return function(){var r=i||this,s=+new Date,c=arguments;n&&n+t>s?(clearTimeout(o),o=setTimeout(function(){n=s,e.apply(r,c)},t)):(n=s,e.apply(r,c))}}function r(e){27==e.keyCode&&y.dismiss()}function s(){n(x,function(e){e.mayAutoShow()&&"pageviews"===e.config.trigger.method&&z>=e.config.trigger.value&&e.trigger()})}function c(){n(x,function(e){e.mayAutoShow()&&("time_on_site"===e.config.trigger.method&&L.time>=e.config.trigger.value&&e.trigger(),"time_on_page"===e.config.trigger.method&&k.time>=e.config.trigger.value&&e.trigger())})}function l(){var e=window.scrollY,t=e+.9*_;n(x,function(e){!e.mayAutoShow()||e.triggerHeight<=0||(t>e.triggerHeight?e.trigger():e.mayRehide()&&e.hide())})}function a(){_=window.innerHeight,n(x,function(e){e.setCustomBoxStyling()})}function h(e){var t=e.offsetX,i=e.offsetY;n(x,function(e){var n=e.element.getBoundingClientRect(),o=100+.05*window.innerWidth;(t<n.left-o||t>n.right+o||i<n.top-o||i>n.bottom+o)&&e.dismiss()})}function u(){m||(n(x,function(e){e.mayAutoShow()&&"exit_intent"===e.config.trigger.method&&e.trigger()}),m=!0)}function f(e){var t=400;e.clientY<=0&&(g=window.setTimeout(u,t))}function d(){g&&(window.clearInterval(g),g=null)}var g,m,p=window.jQuery,v=e("wolfy87-eventemitter"),y=Object.create(v.prototype),w=e("./Box.js")(y),b=e("./Timer.js"),x={},_=window.innerHeight,E=document.createElement("div"),L=new b(sessionStorage.getItem("boxzilla_timer")||0),k=new b(0),z=sessionStorage.getItem("boxzilla_pageviews")||0,S={start:function(){var e=sessionStorage.getItem("boxzilla_timer");e&&(L.time=e),L.start(),k.start()},stop:function(){sessionStorage.setItem("boxzilla_timer",L.time),L.stop(),k.stop()}};y.init=function(){var e=document.documentElement;E.id="boxzilla-overlay",document.body.appendChild(E),p(window).on("scroll",o(l)),p(window).on("resize",o(a)),p(window).on("load",a),p(e).on("mouseleave",f),p(e).on("mouseenter",d),p(e).on("keyup",r),p(E).click(h),window.setInterval(c,1e3),window.setTimeout(s,1e3),S.start(),p(window).on("focus",S.start),p(window).on("beforeunload",function(){S.stop(),sessionStorage.setItem("boxzilla_pageviews",++z)}),p(window).on("blur",S.stop),y.trigger("ready")},y.create=function(e,t){return x[e]=new w(e,t),x[e]},y.dismiss=function(e){"undefined"==typeof e?n(x,function(e){e.dismiss()}):"object"==typeof x[e]&&x[e].dismiss()},y.hide=function(e){"undefined"==typeof e?n(x,function(e){e.hide()}):"object"==typeof x[e]&&x[e].hide()},y.show=function(e){"undefined"==typeof e?n(x,function(e){e.show()}):"object"==typeof x[e]&&x[e].show()},y.toggle=function(e){"undefined"==typeof e?n(x,function(e){e.toggle()}):"object"==typeof x[e]&&x[e].toggle()},"undefined"!=typeof t&&t.exports?t.exports=y:this.Boxzilla=y},{"./Box.js":2,"./Timer.js":4,"wolfy87-eventemitter":5}],4:[function(e,t,i){"use strict";var n=function(e){this.time=e,this.interval=0};n.prototype.tick=function(){this.time++},n.prototype.start=function(){this.interval||(this.interval=window.setInterval(this.tick.bind(this),1e3))},n.prototype.stop=function(){window.clearInterval(this.interval),this.interval=0},t.exports=n},{}],5:[function(e,i,n){(function(){"use strict";function e(){}function n(e,t){for(var i=e.length;i--;)if(e[i].listener===t)return i;return-1}function o(e){return function(){return this[e].apply(this,arguments)}}var r=e.prototype,s=this,c=s.EventEmitter;r.getListeners=function(e){var t,i,n=this._getEvents();if(e instanceof RegExp){t={};for(i in n)n.hasOwnProperty(i)&&e.test(i)&&(t[i]=n[i])}else t=n[e]||(n[e]=[]);return t},r.flattenListeners=function(e){var t,i=[];for(t=0;t<e.length;t+=1)i.push(e[t].listener);return i},r.getListenersAsObject=function(e){var t,i=this.getListeners(e);return i instanceof Array&&(t={},t[e]=i),t||i},r.addListener=function(e,t){var i,o=this.getListenersAsObject(e),r="object"==typeof t;for(i in o)o.hasOwnProperty(i)&&-1===n(o[i],t)&&o[i].push(r?t:{listener:t,once:!1});return this},r.on=o("addListener"),r.addOnceListener=function(e,t){return this.addListener(e,{listener:t,once:!0})},r.once=o("addOnceListener"),r.defineEvent=function(e){return this.getListeners(e),this},r.defineEvents=function(e){for(var t=0;t<e.length;t+=1)this.defineEvent(e[t]);return this},r.removeListener=function(e,t){var i,o,r=this.getListenersAsObject(e);for(o in r)r.hasOwnProperty(o)&&(i=n(r[o],t),-1!==i&&r[o].splice(i,1));return this},r.off=o("removeListener"),r.addListeners=function(e,t){return this.manipulateListeners(!1,e,t)},r.removeListeners=function(e,t){return this.manipulateListeners(!0,e,t)},r.manipulateListeners=function(e,t,i){var n,o,r=e?this.removeListener:this.addListener,s=e?this.removeListeners:this.addListeners;if("object"!=typeof t||t instanceof RegExp)for(n=i.length;n--;)r.call(this,t,i[n]);else for(n in t)t.hasOwnProperty(n)&&(o=t[n])&&("function"==typeof o?r.call(this,n,o):s.call(this,n,o));return this},r.removeEvent=function(e){var t,i=typeof e,n=this._getEvents();if("string"===i)delete n[e];else if(e instanceof RegExp)for(t in n)n.hasOwnProperty(t)&&e.test(t)&&delete n[t];else delete this._events;return this},r.removeAllListeners=o("removeEvent"),r.emitEvent=function(e,t){var i,n,o,r,s,c=this.getListenersAsObject(e);for(r in c)if(c.hasOwnProperty(r))for(i=c[r].slice(0),o=i.length;o--;)n=i[o],n.once===!0&&this.removeListener(e,n.listener),s=n.listener.apply(this,t||[]),s===this._getOnceReturnValue()&&this.removeListener(e,n.listener);return this},r.trigger=o("emitEvent"),r.emit=function(e){var t=Array.prototype.slice.call(arguments,1);return this.emitEvent(e,t)},r.setOnceReturnValue=function(e){return this._onceReturnValue=e,this},r._getOnceReturnValue=function(){return this.hasOwnProperty("_onceReturnValue")?this._onceReturnValue:!0},r._getEvents=function(){return this._events||(this._events={})},e.noConflict=function(){return s.EventEmitter=c,e},"function"==typeof t&&t.amd?t(function(){return e}):"object"==typeof i&&i.exports?i.exports=e:s.EventEmitter=e}).call(this)},{}]},{},[1])}();
2
  //# sourceMappingURL=script.min.js.map
1
+ !function(){var e=void 0,t=void 0;!function i(t,n,o){function r(c,l){if(!n[c]){if(!t[c]){var a="function"==typeof e&&e;if(!l&&a)return a(c,!0);if(s)return s(c,!0);var h=new Error("Cannot find module '"+c+"'");throw h.code="MODULE_NOT_FOUND",h}var u=n[c]={exports:{}};t[c][0].call(u.exports,function(e){var i=t[c][1][e];return r(i?i:e)},u,u.exports,i,t,n,o)}return n[c].exports}for(var s="function"==typeof e&&e,c=0;c<o.length;c++)r(o[c]);return r}({1:[function(e,t,i){"use strict";function n(e,t){t.background_color&&(e.style.background=t.background_color),t.color&&(e.style.color=t.color),t.border_color&&(e.style.borderColor=t.border_color),t.border_width&&(e.style.borderWidth=parseInt(t.border_width)+"px"),t.border_style&&(e.style.borderStyle=t.border_style),t.width&&(e.style.maxWidth=parseInt(t.width)+"px")}var o=e("boxzilla"),r=window.boxzilla_options,s=document.body.className.indexOf("logged-in")>-1;s&&r.testMode&&console.log("Boxzilla: Test mode is enabled. Please disable test mode if you're done testing."),o.init();for(var c=0;c<r.boxes.length;c++){var l=r.boxes[c];l.testMode=s&&r.testMode;var a=o.create(l.id,l);n(a.element,l.css)}window.Boxzilla=o},{boxzilla:3}],2:[function(e,t,i){"use strict";function n(e,t){var i={};for(var n in e)i[n]=e[n];for(var n in t)i[n]=t[n];return i}var o,r=window.jQuery,s={animation:"fade",rehide:!1,content:"",cookieTime:0,icon:"&times",minimumScreenWidth:0,position:"center",testMode:!1,trigger:!1,closable:!0},c=function(e,t){this.id=e,this.config=n(s,t),this.overlay=document.getElementById("boxzilla-overlay"),this.visible=!1,this.closed=!1,this.triggered=!1,this.triggerHeight=0,this.cookieSet=!1,this.config.trigger&&("percentage"!==this.config.trigger.method&&"element"!==this.config.trigger.method||(this.triggerHeight=this.calculateTriggerHeight()),this.cookieSet=this.isCookieSet()),this.element=this.dom(),this.$element=r(this.element),this.events()};c.prototype.events=function(){var e=this;this.$element.find(".boxzilla-close-icon").click(e.dismiss.bind(this)),this.$element.on("click","a",function(t){o.trigger("box.interactions.link",[e,t.target])}),this.$element.on("submit","form",function(t){e.setCookie(),o.trigger("box.interactions.form",[e,t.target])}),r(document.body).on("click",'a[href="#boxzilla-'+e.id+'"]',function(){return e.toggle(),!1}),this.fits()&&this.locationHashRefersBox()&&r(window).load(this.show.bind(this))},c.prototype.dom=function(){var e=document.createElement("div");e.className="boxzilla-container boxzilla-"+this.config.position+"-container";var t=document.createElement("div");t.className="boxzilla boxzilla-"+this.id+" boxzilla-"+this.config.position,t.style.display="none",e.appendChild(t);var i=document.createElement("div");i.className="boxzilla-content",i.innerHTML=this.config.content,t.appendChild(i);var n=i.querySelectorAll("script");if(n.length){for(var o=document.createElement("script"),r=0;r<n.length;r++)o.appendChild(document.createTextNode(n[r].text)),n[r].parentNode.removeChild(n[r]);document.head.appendChild(o)}if(this.config.closable&&this.config.icon){var s=document.createElement("span");s.className="boxzilla-close-icon",s.innerHTML=this.config.icon,t.appendChild(s)}return document.body.appendChild(e),t},c.prototype.setCustomBoxStyling=function(){this.element.style.overflowY="auto",this.element.style.maxHeight="none";var e=window.innerHeight,t=this.$element.outerHeight();if(t>e&&(this.element.style.maxHeight=e+"px",this.element.style.overflowY="scroll"),"center"===this.config.position){var i=(e-t)/2;i=i>=0?i:0,this.element.style.marginTop=i+"px"}},c.prototype.toggle=function(e){return"undefined"==typeof e&&(e=!this.visible),this.$element.is(":animated")?!1:e===this.visible?!1:e||this.config.closable?(this.visible=e,this.setCustomBoxStyling(),"center"===this.config.position&&r(this.overlay).fadeToggle("slow"),o.trigger("box."+(e?"show":"hide"),[this]),"fade"===this.config.animation?this.$element.fadeToggle("slow"):this.$element.slideToggle("slow"),!0):!1},c.prototype.show=function(){return this.toggle(!0)},c.prototype.hide=function(){return this.toggle(!1)},c.prototype.calculateTriggerHeight=function(){var e=0;if("element"===this.config.trigger.method){var t=r(this.config.trigger.value).first();e=t.length>0?t.offset().top:0}else"percentage"===this.config.trigger.method&&(e=this.config.trigger.value/100*r(document).height());return e},c.prototype.setCookie=function(){if(this.config.cookieTime){var e=new Date;e.setDate(e.getDate()+this.config.cookieTime),document.cookie="boxzilla_box_"+this.id+"=true; expires="+e.toUTCString()+"; path=/"}},c.prototype.locationHashRefersBox=function(){if(!window.location.hash||0===window.location.hash.length)return!1;var e=window.location.hash.substring(1);return e===this.element.id?!0:!!this.element.querySelector("#"+e)},c.prototype.fits=function(){return this.config.minimumScreenWidth<=0?!0:window.innerWidth>this.config.minimumScreenWidth},c.prototype.mayAutoShow=function(){return this.closed?!1:this.fits()&&this.config.trigger?!this.cookieSet:!1},c.prototype.mayRehide=function(){return this.config.rehide&&this.triggered},c.prototype.isCookieSet=function(){if(this.config.testMode)return!1;if(!this.config.cookieTime)return!1;var e="true"===document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*boxzilla_box_"+this.id+"\\s*\\=\\s*([^;]*).*$)|^.*$"),"$1");return e},c.prototype.trigger=function(){var e=this.show();e&&(this.triggered=!0)},c.prototype.dismiss=function(){this.hide(),this.setCookie(),this.closed=!0,o.trigger("box.dismiss",[this])},t.exports=function(e){return o=e,c}},{}],3:[function(e,t,i){"use strict";function n(e,t){for(var i in e)e.hasOwnProperty(i)&&t(e[i])}function o(e,t,i){t||(t=250);var n,o;return function(){var r=i||this,s=+new Date,c=arguments;n&&n+t>s?(clearTimeout(o),o=setTimeout(function(){n=s,e.apply(r,c)},t)):(n=s,e.apply(r,c))}}function r(e){27==e.keyCode&&y.dismiss()}function s(){n(x,function(e){e.mayAutoShow()&&"pageviews"===e.config.trigger.method&&z>=e.config.trigger.value&&e.trigger()})}function c(){n(x,function(e){e.mayAutoShow()&&("time_on_site"===e.config.trigger.method&&L.time>=e.config.trigger.value&&e.trigger(),"time_on_page"===e.config.trigger.method&&k.time>=e.config.trigger.value&&e.trigger())})}function l(){var e=window.scrollY,t=e+.667*_;n(x,function(e){!e.mayAutoShow()||e.triggerHeight<=0||(t>e.triggerHeight?e.trigger():e.mayRehide()&&e.hide())})}function a(){_=window.innerHeight,n(x,function(e){e.setCustomBoxStyling()})}function h(e){var t=e.offsetX,i=e.offsetY;n(x,function(e){var n=e.element.getBoundingClientRect(),o=100+.05*window.innerWidth;(t<n.left-o||t>n.right+o||i<n.top-o||i>n.bottom+o)&&e.dismiss()})}function u(){m||(n(x,function(e){e.mayAutoShow()&&"exit_intent"===e.config.trigger.method&&e.trigger()}),m=!0)}function f(e){var t=400;e.clientY<=0&&(g=window.setTimeout(u,t))}function d(){g&&(window.clearInterval(g),g=null)}var g,m,p=window.jQuery,v=e("wolfy87-eventemitter"),y=Object.create(v.prototype),w=e("./Box.js")(y),b=e("./Timer.js"),x={},_=window.innerHeight,E=document.createElement("div"),L=new b(sessionStorage.getItem("boxzilla_timer")||0),k=new b(0),z=sessionStorage.getItem("boxzilla_pageviews")||0,S={start:function(){var e=sessionStorage.getItem("boxzilla_timer");e&&(L.time=e),L.start(),k.start()},stop:function(){sessionStorage.setItem("boxzilla_timer",L.time),L.stop(),k.stop()}};y.init=function(){var e=document.documentElement;E.id="boxzilla-overlay",document.body.appendChild(E),p(window).on("scroll",o(l)),p(window).on("resize",o(a)),p(window).on("load",a),p(e).on("mouseleave",f),p(e).on("mouseenter",d),p(e).on("keyup",r),p(E).click(h),window.setInterval(c,1e3),window.setTimeout(s,1e3),S.start(),p(window).on("focus",S.start),p(window).on("beforeunload",function(){S.stop(),sessionStorage.setItem("boxzilla_pageviews",++z)}),p(window).on("blur",S.stop),y.trigger("ready")},y.create=function(e,t){return x[e]=new w(e,t),x[e]},y.dismiss=function(e){"undefined"==typeof e?n(x,function(e){e.dismiss()}):"object"==typeof x[e]&&x[e].dismiss()},y.hide=function(e){"undefined"==typeof e?n(x,function(e){e.hide()}):"object"==typeof x[e]&&x[e].hide()},y.show=function(e){"undefined"==typeof e?n(x,function(e){e.show()}):"object"==typeof x[e]&&x[e].show()},y.toggle=function(e){"undefined"==typeof e?n(x,function(e){e.toggle()}):"object"==typeof x[e]&&x[e].toggle()},window.Boxzilla=y,"undefined"!=typeof t&&t.exports&&(t.exports=y)},{"./Box.js":2,"./Timer.js":4,"wolfy87-eventemitter":5}],4:[function(e,t,i){"use strict";var n=function(e){this.time=e,this.interval=0};n.prototype.tick=function(){this.time++},n.prototype.start=function(){this.interval||(this.interval=window.setInterval(this.tick.bind(this),1e3))},n.prototype.stop=function(){window.clearInterval(this.interval),this.interval=0},t.exports=n},{}],5:[function(e,i,n){(function(){"use strict";function e(){}function n(e,t){for(var i=e.length;i--;)if(e[i].listener===t)return i;return-1}function o(e){return function(){return this[e].apply(this,arguments)}}var r=e.prototype,s=this,c=s.EventEmitter;r.getListeners=function(e){var t,i,n=this._getEvents();if(e instanceof RegExp){t={};for(i in n)n.hasOwnProperty(i)&&e.test(i)&&(t[i]=n[i])}else t=n[e]||(n[e]=[]);return t},r.flattenListeners=function(e){var t,i=[];for(t=0;t<e.length;t+=1)i.push(e[t].listener);return i},r.getListenersAsObject=function(e){var t,i=this.getListeners(e);return i instanceof Array&&(t={},t[e]=i),t||i},r.addListener=function(e,t){var i,o=this.getListenersAsObject(e),r="object"==typeof t;for(i in o)o.hasOwnProperty(i)&&-1===n(o[i],t)&&o[i].push(r?t:{listener:t,once:!1});return this},r.on=o("addListener"),r.addOnceListener=function(e,t){return this.addListener(e,{listener:t,once:!0})},r.once=o("addOnceListener"),r.defineEvent=function(e){return this.getListeners(e),this},r.defineEvents=function(e){for(var t=0;t<e.length;t+=1)this.defineEvent(e[t]);return this},r.removeListener=function(e,t){var i,o,r=this.getListenersAsObject(e);for(o in r)r.hasOwnProperty(o)&&(i=n(r[o],t),-1!==i&&r[o].splice(i,1));return this},r.off=o("removeListener"),r.addListeners=function(e,t){return this.manipulateListeners(!1,e,t)},r.removeListeners=function(e,t){return this.manipulateListeners(!0,e,t)},r.manipulateListeners=function(e,t,i){var n,o,r=e?this.removeListener:this.addListener,s=e?this.removeListeners:this.addListeners;if("object"!=typeof t||t instanceof RegExp)for(n=i.length;n--;)r.call(this,t,i[n]);else for(n in t)t.hasOwnProperty(n)&&(o=t[n])&&("function"==typeof o?r.call(this,n,o):s.call(this,n,o));return this},r.removeEvent=function(e){var t,i=typeof e,n=this._getEvents();if("string"===i)delete n[e];else if(e instanceof RegExp)for(t in n)n.hasOwnProperty(t)&&e.test(t)&&delete n[t];else delete this._events;return this},r.removeAllListeners=o("removeEvent"),r.emitEvent=function(e,t){var i,n,o,r,s,c=this.getListenersAsObject(e);for(r in c)if(c.hasOwnProperty(r))for(i=c[r].slice(0),o=i.length;o--;)n=i[o],n.once===!0&&this.removeListener(e,n.listener),s=n.listener.apply(this,t||[]),s===this._getOnceReturnValue()&&this.removeListener(e,n.listener);return this},r.trigger=o("emitEvent"),r.emit=function(e){var t=Array.prototype.slice.call(arguments,1);return this.emitEvent(e,t)},r.setOnceReturnValue=function(e){return this._onceReturnValue=e,this},r._getOnceReturnValue=function(){return this.hasOwnProperty("_onceReturnValue")?this._onceReturnValue:!0},r._getEvents=function(){return this._events||(this._events={})},e.noConflict=function(){return s.EventEmitter=c,e},"function"==typeof t&&t.amd?t(function(){return e}):"object"==typeof i&&i.exports?i.exports=e:s.EventEmitter=e}).call(this)},{}]},{},[1])}();
2
  //# sourceMappingURL=script.min.js.map
assets/js/script.min.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["script.js"],"names":["require","undefined","define","e","t","n","r","s","o","u","a","i","f","Error","code","l","exports","call","length","1","module","css","element","styles","background_color","style","background","color","border_color","borderColor","border_width","borderWidth","parseInt","border_style","borderStyle","width","maxWidth","Boxzilla","options","window","boxzilla_options","isLoggedIn","document","body","className","indexOf","testMode","console","log","init","boxes","boxOpts","box","create","id","boxzilla","2","merge","obj1","obj2","obj3","attrname","$","jQuery","defaults","animation","rehide","content","cookieTime","icon","minimumScreenWidth","position","trigger","closable","Box","config","this","overlay","getElementById","visible","closed","triggered","triggerHeight","cookieSet","method","calculateTriggerHeight","isCookieSet","dom","$element","events","prototype","find","click","dismiss","bind","on","target","setCookie","toggle","fits","locationHashRefersBox","load","show","wrapper","createElement","display","appendChild","innerHTML","scripts","querySelectorAll","script","createTextNode","text","parentNode","removeChild","head","setCustomBoxStyling","overflowY","maxHeight","windowHeight","innerHeight","boxHeight","outerHeight","newTopMargin","marginTop","is","fadeToggle","slideToggle","hide","$triggerElement","value","first","offset","top","height","expiryDate","Date","setDate","getDate","cookie","toUTCString","location","hash","elementId","substring","querySelector","innerWidth","mayAutoShow","mayRehide","replace","RegExp","shown","_Boxzilla","3","each","obj","callback","key","hasOwnProperty","throttle","fn","threshhold","scope","last","deferTimer","context","now","args","arguments","clearTimeout","setTimeout","apply","onKeyUp","keyCode","checkPageViewsCriteria","pageViews","checkTimeCriteria","siteTimer","time","pageTimer","checkHeightCriteria","scrollY","scrollHeight","recalculateHeights","onOverlayClick","x","offsetX","y","offsetY","rect","getBoundingClientRect","margin","left","right","bottom","triggerExitIntent","exitIntentTriggered","onMouseLeave","delay","clientY","exitIntentDelayTimer","onMouseEnter","clearInterval","EventEmitter","Object","Timer","sessionStorage","getItem","timers","start","sessionTime","stop","setItem","html","documentElement","setInterval","opts","./Box.js","./Timer.js","wolfy87-eventemitter","4","interval","tick","5","indexOfListener","listeners","listener","alias","name","proto","originalGlobalValue","getListeners","evt","response","_getEvents","test","flattenListeners","flatListeners","push","getListenersAsObject","Array","addListener","listenerIsWrapped","once","addOnceListener","defineEvent","defineEvents","evts","removeListener","index","splice","off","addListeners","manipulateListeners","removeListeners","remove","single","multiple","removeEvent","type","_events","removeAllListeners","emitEvent","listenersMap","slice","_getOnceReturnValue","emit","setOnceReturnValue","_onceReturnValue","noConflict","amd"],"mappings":"CAAA,WAAe,GAAIA,GAAUC,OAAeC,EAASD,QAAW,QAAUE,GAAEC,EAAEC,EAAEC,GAAG,QAASC,GAAEC,EAAEC,GAAG,IAAIJ,EAAEG,GAAG,CAAC,IAAIJ,EAAEI,GAAG,CAAC,GAAIE,GAAkB,kBAATV,IAAqBA,CAAQ,KAAIS,GAAGC,EAAE,MAAOA,GAAEF,GAAE,EAAI,IAAGG,EAAE,MAAOA,GAAEH,GAAE,EAAI,IAAII,GAAE,GAAIC,OAAM,uBAAuBL,EAAE,IAAK,MAAMI,GAAEE,KAAK,mBAAmBF,EAAE,GAAIG,GAAEV,EAAEG,IAAIQ,WAAYZ,GAAEI,GAAG,GAAGS,KAAKF,EAAEC,QAAQ,SAASb,GAAG,GAAIE,GAAED,EAAEI,GAAG,GAAGL,EAAG,OAAOI,GAAEF,EAAEA,EAAEF,IAAIY,EAAEA,EAAEC,QAAQb,EAAEC,EAAEC,EAAEC,GAAG,MAAOD,GAAEG,GAAGQ,QAAkD,IAAI,GAA1CL,GAAkB,kBAATX,IAAqBA,EAAgBQ,EAAE,EAAEA,EAAEF,EAAEY,OAAOV,IAAID,EAAED,EAAEE,GAAI,OAAOD,KAAKY,GAAG,SAASnB,EAAQoB,EAAOJ,GACvhB,YA2BA,SAASK,GAAIC,EAASC,GACdA,EAAOC,mBACPF,EAAQG,MAAMC,WAAaH,EAAOC,kBAGlCD,EAAOI,QACPL,EAAQG,MAAME,MAAQJ,EAAOI,OAG7BJ,EAAOK,eACPN,EAAQG,MAAMI,YAAcN,EAAOK,cAGnCL,EAAOO,eACPR,EAAQG,MAAMM,YAAcC,SAAST,EAAOO,cAAg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AAO4Q,IACvC5Q,EAAO,WACH,MAAOyM,KAGY,gBAAXvL,IAAuBA,EAAOJ,QAC1CI,EAAOJ,QAAU2L,EAGjB3L,EAAQ2L,aAAeA,IAE7B1L,KAAK2D,gBAEI","file":"script.min.js","sourcesContent":["(function () { var require = undefined; var define = undefined; (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){\n'use strict';\n\nvar Boxzilla = require('boxzilla');\nvar options = window.boxzilla_options;\nvar isLoggedIn = document.body.className.indexOf('logged-in') > -1;\n\n// print message when test mode is enabled\nif( isLoggedIn && options.testMode ) {\n console.log( 'Boxzilla: Test mode is enabled. Please disable test mode if you\\'re done testing.' );\n}\n\n// init boxzilla\nBoxzilla.init();\n\n// create boxes from options\nfor( var i=0; i < options.boxes.length; i++ ) {\n // get opts\n var boxOpts = options.boxes[i];\n boxOpts.testMode = isLoggedIn && options.testMode;\n\n // create box\n var box = Boxzilla.create( boxOpts.id, boxOpts);\n \n // add custom css to box\n css(box.element, boxOpts.css);\n}\n\nfunction css(element, styles) {\n if( styles.background_color ) {\n element.style.background = styles.background_color;\n }\n\n if( styles.color ) {\n element.style.color = styles.color;\n }\n\n if( styles.border_color ) {\n element.style.borderColor = styles.border_color;\n }\n\n if( styles.border_width ) {\n element.style.borderWidth = parseInt(styles.border_width) + \"px\";\n }\n\n if( styles.border_style ) {\n element.style.borderStyle = styles.border_style;\n }\n\n if( styles.width ) {\n element.style.maxWidth = parseInt(styles.width) + \"px\";\n }\n}\n\nwindow.Boxzilla = Boxzilla;\n},{\"boxzilla\":3}],2:[function(require,module,exports){\n'use strict';\n\nvar $ = window.jQuery,\n defaults = {\n 'animation': 'fade',\n 'rehide': false,\n 'content': '',\n 'cookieTime': 0,\n 'icon': '&times',\n 'minimumScreenWidth': 0,\n 'position': 'center',\n 'testMode': false,\n 'trigger': false,\n 'closable': true\n }, Boxzilla;\n\n/**\n * Merge 2 objects, values of the latter overwriting the former.\n *\n * @param obj1\n * @param obj2\n * @returns {*}\n */\nfunction merge( obj1, obj2 ) {\n var obj3 = {};\n for (var attrname in obj1) { obj3[attrname] = obj1[attrname]; }\n for (var attrname in obj2) { obj3[attrname] = obj2[attrname]; }\n return obj3;\n}\n\n// Box Object\nvar Box = function( id, config ) {\n this.id \t\t= id;\n\n // store config values\n this.config = merge(defaults, config);\n\n // store ref to overlay\n this.overlay = document.getElementById('boxzilla-overlay');\n\n // state\n this.visible \t= false;\n this.closed \t= false;\n this.triggered \t= false;\n this.triggerHeight = 0;\n this.cookieSet = false;\n\n // if a trigger was given, calculate values once and store\n if( this.config.trigger ) {\n if( this.config.trigger.method === 'percentage' || this.config.trigger.method === 'element' ) {\n this.triggerHeight = this.calculateTriggerHeight();\n }\n\n this.cookieSet = this.isCookieSet();\n }\n\n // create dom element for this box\n this.element = this.dom();\n this.$element = $(this.element);\n\n // further initialise the box\n this.events();\n};\n\n// initialise the box\nBox.prototype.events = function() {\n var box = this;\n\n // attach event to \"close\" icon inside box\n this.$element.find('.boxzilla-close-icon').click(box.dismiss.bind(this));\n\n this.$element.on('click', 'a', function(e) {\n Boxzilla.trigger('box.interactions.link', [ box, e.target ] );\n });\n\n this.$element.on('submit', 'form', function(e) {\n box.setCookie();\n Boxzilla.trigger('box.interactions.form', [ box, e.target ]);\n });\n\n // attach event to all links referring #boxzilla-{box_id}\n $(document.body).on('click', 'a[href=\"#boxzilla-' + box.id + '\"]', function() {\n box.toggle();\n return false;\n });\n\n // maybe show box right away\n if( this.fits() && this.locationHashRefersBox() ) {\n $(window).load(this.show.bind(this));\n }\n\n};\n\n// generate dom elements for this box\nBox.prototype.dom = function() {\n var wrapper = document.createElement('div');\n wrapper.className = 'boxzilla-container boxzilla-' + this.config.position + '-container';\n\n var box = document.createElement('div');\n box.className = 'boxzilla boxzilla-' + this.id + ' boxzilla-' + this.config.position;\n box.style.display = 'none';\n wrapper.appendChild(box);\n\n var content = document.createElement('div');\n content.className = 'boxzilla-content';\n content.innerHTML = this.config.content;\n box.appendChild(content);\n\n // remove <script> from box content and append them to head\n var scripts = content.querySelectorAll('script');\n if(scripts.length) {\n var script = document.createElement('script');\n for( var i=0; i<scripts.length; i++ ) {\n script.appendChild(document.createTextNode(scripts[i].text));\n scripts[i].parentNode.removeChild(scripts[i]);\n }\n document.head.appendChild(script);\n }\n\n if( this.config.closable && this.config.icon ) {\n var icon = document.createElement('span');\n icon.className = \"boxzilla-close-icon\";\n icon.innerHTML = this.config.icon;\n box.appendChild(icon);\n }\n\n document.body.appendChild(wrapper);\n\n return box;\n};\n\n// set (calculate) custom box styling depending on box options\nBox.prototype.setCustomBoxStyling = function() {\n\n // reset element to its initial state\n this.element.style.overflowY = 'auto';\n this.element.style.maxHeight = 'none';\n\n // get new dimensions\n var windowHeight = window.innerHeight;\n var boxHeight = this.$element.outerHeight();\n\n // add scrollbar to box and limit height\n if( boxHeight > windowHeight ) {\n this.element.style.maxHeight = windowHeight + \"px\";\n this.element.style.overflowY = 'scroll';\n }\n\n // set new top margin for boxes which are centered\n if( this.config.position === 'center' ) {\n var newTopMargin = ( ( windowHeight - boxHeight ) / 2 );\n newTopMargin = newTopMargin >= 0 ? newTopMargin : 0;\n this.element.style.marginTop = newTopMargin + \"px\";\n }\n\n};\n\n// toggle visibility of the box\nBox.prototype.toggle = function(show) {\n\n // revert visibility if no explicit argument is given\n if( typeof( show ) === \"undefined\" ) {\n show = ! this.visible;\n }\n\n // do nothing if element is being animated\n if( this.$element.is(':animated') ) {\n return false;\n }\n\n // is box already at desired visibility?\n if( show === this.visible ) {\n return false;\n }\n\n // if box should be hidden but is not closable, bail.\n if( ! show && ! this.config.closable ) {\n return false;\n }\n\n // set new visibility status\n this.visible = show;\n\n // calculate custom styling for which CSS is \"too stupid\"\n this.setCustomBoxStyling();\n\n // fadein / fadeout the overlay if position is \"center\"\n if( this.config.position === 'center' ) {\n $(this.overlay).fadeToggle('slow');\n }\n\n // trigger event\n Boxzilla.trigger('box.' + ( show ? 'show' : 'hide' ), [ this ] );\n\n // show or hide box using selected animation\n if( this.config.animation === 'fade' ) {\n this.$element.fadeToggle( 'slow' );\n } else {\n this.$element.slideToggle( 'slow' );\n }\n\n // // focus on first input field in box\n // this.$element.find('input').first().focus();\n\n return true;\n};\n\n// show the box\nBox.prototype.show = function() {\n return this.toggle(true);\n};\n\n// hide the box\nBox.prototype.hide = function() {\n return this.toggle(false);\n};\n\n// calculate trigger height\nBox.prototype.calculateTriggerHeight = function() {\n var triggerHeight = 0;\n\n if( this.config.trigger.method === 'element' ) {\n var $triggerElement = $(this.config.trigger.value).first();\n triggerHeight = ( $triggerElement.length > 0 ) ? $triggerElement.offset().top : 0;\n } else if( this.config.trigger.method === 'percentage' ) {\n triggerHeight = ( this.config.trigger.value / 100 * $(document).height() );\n }\n\n return triggerHeight;\n};\n\n// set cookie that disables automatically showing the box\nBox.prototype.setCookie = function() {\n // do nothing if cookieTime evaluates to false\n if(! this.config.cookieTime) {\n return;\n }\n\n var expiryDate = new Date();\n expiryDate.setDate( expiryDate.getDate() + this.config.cookieTime );\n document.cookie = 'boxzilla_box_'+ this.id + '=true; expires='+ expiryDate.toUTCString() +'; path=/';\n};\n\n// checks whether window.location.hash equals the box element ID or that of any element inside the box\nBox.prototype.locationHashRefersBox = function() {\n\n if( ! window.location.hash || 0 === window.location.hash.length ) {\n return false;\n }\n\n var elementId = window.location.hash.substring(1);\n if( elementId === this.element.id ) {\n return true;\n } else if( this.element.querySelector('#' + elementId) ) {\n return true;\n }\n\n return false;\n};\n\nBox.prototype.fits = function() {\n if( this.config.minimumScreenWidth <= 0 ) {\n return true;\n }\n\n return window.innerWidth > this.config.minimumScreenWidth\n};\n\n// is this box enabled?\nBox.prototype.mayAutoShow = function() {\n\n // don't show if box was closed (dismissed) before\n if( this.closed ) {\n return false;\n }\n\n // check if box fits on given minimum screen width\n if( ! this.fits() ) {\n return false;\n }\n\n // if trigger empty or error in calculating triggerHeight, return false\n if( ! this.config.trigger ) {\n return false;\n }\n\n // rely on cookie value (show if not set, don't show if set)\n return ! this.cookieSet;\n};\n\nBox.prototype.mayRehide = function() {\n return this.config.rehide && this.triggered;\n};\n\nBox.prototype.isCookieSet = function() {\n // always show on test mode\n if( this.config.testMode ) {\n return false;\n }\n\n // check for cookie\n if( ! this.config.cookieTime ) {\n return false;\n }\n\n var cookieSet = document.cookie.replace(new RegExp(\"(?:(?:^|.*;)\\\\s*\" + 'boxzilla_box_' + this.id + \"\\\\s*\\\\=\\\\s*([^;]*).*$)|^.*$\"), \"$1\") === \"true\";\n return cookieSet;\n\n};\n\nBox.prototype.trigger = function() {\n var shown = this.show();\n if( shown ) {\n this.triggered = true;\n }\n};\n\nBox.prototype.dismiss = function() {\n this.hide();\n this.setCookie();\n this.closed = true;\n Boxzilla.trigger('box.dismiss', [ this ]);\n};\n\nmodule.exports = function(_Boxzilla) {\n Boxzilla = _Boxzilla;\n return Box;\n};\n},{}],3:[function(require,module,exports){\n'use strict';\n\nvar $ = window.jQuery,\n EventEmitter = require('wolfy87-eventemitter'),\n Boxzilla = Object.create(EventEmitter.prototype),\n Box = require('./Box.js')(Boxzilla),\n Timer = require('./Timer.js'),\n boxes = {},\n windowHeight = window.innerHeight,\n overlay = document.createElement('div'),\n exitIntentDelayTimer,\n exitIntentTriggered,\n siteTimer = new Timer(sessionStorage.getItem('boxzilla_timer') || 0),\n pageTimer = new Timer(0),\n pageViews = sessionStorage.getItem('boxzilla_pageviews') || 0;\n\nfunction each( obj, callback ) {\n for( var key in obj ) {\n if(! obj.hasOwnProperty(key)) continue;\n callback(obj[key]);\n }\n}\n\nfunction throttle(fn, threshhold, scope) {\n threshhold || (threshhold = 250);\n var last,\n deferTimer;\n return function () {\n var context = scope || this;\n\n var now = +new Date,\n args = arguments;\n if (last && now < last + threshhold) {\n // hold on to it\n clearTimeout(deferTimer);\n deferTimer = setTimeout(function () {\n last = now;\n fn.apply(context, args);\n }, threshhold);\n } else {\n last = now;\n fn.apply(context, args);\n }\n };\n}\n\n// \"keyup\" listener\nfunction onKeyUp(e) {\n if (e.keyCode == 27) {\n Boxzilla.dismiss();\n }\n}\n\n// check \"pageviews\" criteria for each box\nfunction checkPageViewsCriteria() {\n each(boxes, function(box) {\n if( ! box.mayAutoShow() ) {\n return;\n }\n\n if( box.config.trigger.method === 'pageviews' && pageViews >= box.config.trigger.value ) {\n box.trigger();\n }\n });\n}\n\n// check time trigger criteria for each box\nfunction checkTimeCriteria() {\n each(boxes, function(box) {\n if( ! box.mayAutoShow() ) {\n return;\n }\n\n // check \"time on site\" trigger\n if (box.config.trigger.method === 'time_on_site' && siteTimer.time >= box.config.trigger.value) {\n box.trigger();\n }\n\n // check \"time on page\" trigger\n if (box.config.trigger.method === 'time_on_page' && pageTimer.time >= box.config.trigger.value) {\n box.trigger();\n }\n });\n}\n\n// check triggerHeight criteria for all boxes\nfunction checkHeightCriteria() {\n var scrollY = window.scrollY;\n var scrollHeight = scrollY + ( windowHeight * 0.9 );\n\n each(boxes, function(box) {\n if( ! box.mayAutoShow() || box.triggerHeight <= 0 ) {\n return;\n }\n\n if( scrollHeight > box.triggerHeight ) {\n box.trigger();\n } else if( box.mayRehide() ) {\n box.hide();\n }\n });\n}\n\n// recalculate heights and variables based on height\nfunction recalculateHeights() {\n windowHeight = window.innerHeight;\n\n each(boxes, function(box) {\n box.setCustomBoxStyling();\n });\n}\n\nfunction onOverlayClick(e) {\n var x = e.offsetX;\n var y = e.offsetY;\n\n // calculate if click was near a box to avoid closing it (click error margin)\n each(boxes, function(box) {\n var rect = box.element.getBoundingClientRect();\n var margin = 100 + ( window.innerWidth * 0.05 );\n\n // if click was not anywhere near box, dismiss it.\n if( x < ( rect.left - margin ) || x > ( rect.right + margin ) || y < ( rect.top - margin ) || y > ( rect.bottom + margin ) ) {\n box.dismiss();\n }\n });\n}\n\nfunction triggerExitIntent() {\n if(exitIntentTriggered) return;\n\n each(boxes, function(box) {\n if(box.mayAutoShow() && box.config.trigger.method === 'exit_intent' ) {\n box.trigger();\n }\n });\n\n exitIntentTriggered = true;\n}\n\nfunction onMouseLeave(e) {\n var delay = 400;\n\n // did mouse leave at top of window?\n if( e.clientY <= 0 ) {\n exitIntentDelayTimer = window.setTimeout(triggerExitIntent, delay);\n }\n}\n\nfunction onMouseEnter() {\n if( exitIntentDelayTimer ) {\n window.clearInterval(exitIntentDelayTimer);\n exitIntentDelayTimer = null;\n }\n}\n\nvar timers = {\n start: function() {\n var sessionTime = sessionStorage.getItem('boxzilla_timer');\n if( sessionTime ) siteTimer.time = sessionTime;\n siteTimer.start();\n pageTimer.start();\n },\n stop: function() {\n sessionStorage.setItem('boxzilla_timer', siteTimer.time);\n siteTimer.stop();\n pageTimer.stop();\n }\n};\n\n// initialise & add event listeners\nBoxzilla.init = function() {\n var html = document.documentElement;\n\n // add overlay element to dom\n overlay.id = 'boxzilla-overlay';\n document.body.appendChild(overlay);\n\n // event binds\n $(window).on('scroll', throttle(checkHeightCriteria));\n $(window).on('resize', throttle(recalculateHeights));\n $(window).on('load', recalculateHeights );\n $(html).on('mouseleave', onMouseLeave);\n $(html).on('mouseenter', onMouseEnter);\n $(html).on('keyup', onKeyUp);\n $(overlay).click(onOverlayClick);\n window.setInterval(checkTimeCriteria, 1000);\n window.setTimeout(checkPageViewsCriteria, 1000 );\n\n timers.start();\n $(window).on('focus', timers.start);\n $(window).on('beforeunload', function() {\n timers.stop();\n sessionStorage.setItem('boxzilla_pageviews', ++pageViews);\n });\n $(window).on('blur', timers.stop);\n\n Boxzilla.trigger('ready');\n};\n\n/**\n * Create a new Box\n *\n * @param string id\n * @param object opts\n *\n * @returns Box\n */\nBoxzilla.create = function(id, opts) {\n boxes[id] = new Box(id, opts);\n return boxes[id];\n};\n\n// dismiss a single box (or all by omitting id param)\nBoxzilla.dismiss = function(id) {\n // if no id given, dismiss all current open boxes\n if( typeof(id) === \"undefined\" ) {\n each(boxes, function(box) { box.dismiss(); });\n } else if( typeof( boxes[id] ) === \"object\" ) {\n boxes[id].dismiss();\n }\n};\n\nBoxzilla.hide = function(id) {\n if( typeof(id) === \"undefined\" ) {\n each(boxes, function(box) { box.hide(); });\n } else if( typeof( boxes[id] ) === \"object\" ) {\n boxes[id].hide();\n }\n};\n\nBoxzilla.show = function(id) {\n if( typeof(id) === \"undefined\" ) {\n each(boxes, function(box) { box.show(); });\n } else if( typeof( boxes[id] ) === \"object\" ) {\n boxes[id].show();\n }\n};\n\nBoxzilla.toggle = function(id) {\n if( typeof(id) === \"undefined\" ) {\n each(boxes, function(box) { box.toggle(); });\n } else if( typeof( boxes[id] ) === \"object\" ) {\n boxes[id].toggle();\n }\n};\n\nif ( typeof module !== 'undefined' && module.exports ) {\n module.exports = Boxzilla;\n} else {\n this.Boxzilla = Boxzilla;\n}\n},{\"./Box.js\":2,\"./Timer.js\":4,\"wolfy87-eventemitter\":5}],4:[function(require,module,exports){\n'use strict';\n\nvar Timer = function(start) {\n this.time = start;\n this.interval = 0;\n};\n\nTimer.prototype.tick = function() {\n this.time++;\n};\n\nTimer.prototype.start = function() {\n if( ! this.interval ) {\n this.interval = window.setInterval(this.tick.bind(this), 1000);\n }\n};\n\nTimer.prototype.stop = function() {\n window.clearInterval(this.interval);\n this.interval = 0;\n};\n\nmodule.exports = Timer;\n},{}],5:[function(require,module,exports){\n/*!\n * EventEmitter v4.2.11 - git.io/ee\n * Unlicense - http://unlicense.org/\n * Oliver Caldwell - http://oli.me.uk/\n * @preserve\n */\n\n;(function () {\n 'use strict';\n\n /**\n * Class for managing events.\n * Can be extended to provide event functionality in other classes.\n *\n * @class EventEmitter Manages event registering and emitting.\n */\n function EventEmitter() {}\n\n // Shortcuts to improve speed and size\n var proto = EventEmitter.prototype;\n var exports = this;\n var originalGlobalValue = exports.EventEmitter;\n\n /**\n * Finds the index of the listener for the event in its storage array.\n *\n * @param {Function[]} listeners Array of listeners to search through.\n * @param {Function} listener Method to look for.\n * @return {Number} Index of the specified listener, -1 if not found\n * @api private\n */\n function indexOfListener(listeners, listener) {\n var i = listeners.length;\n while (i--) {\n if (listeners[i].listener === listener) {\n return i;\n }\n }\n\n return -1;\n }\n\n /**\n * Alias a method while keeping the context correct, to allow for overwriting of target method.\n *\n * @param {String} name The name of the target method.\n * @return {Function} The aliased method\n * @api private\n */\n function alias(name) {\n return function aliasClosure() {\n return this[name].apply(this, arguments);\n };\n }\n\n /**\n * Returns the listener array for the specified event.\n * Will initialise the event object and listener arrays if required.\n * Will return an object if you use a regex search. The object contains keys for each matched event. So /ba[rz]/ might return an object containing bar and baz. But only if you have either defined them with defineEvent or added some listeners to them.\n * Each property in the object response is an array of listener functions.\n *\n * @param {String|RegExp} evt Name of the event to return the listeners from.\n * @return {Function[]|Object} All listener functions for the event.\n */\n proto.getListeners = function getListeners(evt) {\n var events = this._getEvents();\n var response;\n var key;\n\n // Return a concatenated array of all matching events if\n // the selector is a regular expression.\n if (evt instanceof RegExp) {\n response = {};\n for (key in events) {\n if (events.hasOwnProperty(key) && evt.test(key)) {\n response[key] = events[key];\n }\n }\n }\n else {\n response = events[evt] || (events[evt] = []);\n }\n\n return response;\n };\n\n /**\n * Takes a list of listener objects and flattens it into a list of listener functions.\n *\n * @param {Object[]} listeners Raw listener objects.\n * @return {Function[]} Just the listener functions.\n */\n proto.flattenListeners = function flattenListeners(listeners) {\n var flatListeners = [];\n var i;\n\n for (i = 0; i < listeners.length; i += 1) {\n flatListeners.push(listeners[i].listener);\n }\n\n return flatListeners;\n };\n\n /**\n * Fetches the requested listeners via getListeners but will always return the results inside an object. This is mainly for internal use but others may find it useful.\n *\n * @param {String|RegExp} evt Name of the event to return the listeners from.\n * @return {Object} All listener functions for an event in an object.\n */\n proto.getListenersAsObject = function getListenersAsObject(evt) {\n var listeners = this.getListeners(evt);\n var response;\n\n if (listeners instanceof Array) {\n response = {};\n response[evt] = listeners;\n }\n\n return response || listeners;\n };\n\n /**\n * Adds a listener function to the specified event.\n * The listener will not be added if it is a duplicate.\n * If the listener returns true then it will be removed after it is called.\n * If you pass a regular expression as the event name then the listener will be added to all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to attach the listener to.\n * @param {Function} listener Method to be called when the event is emitted. If the function returns true then it will be removed after calling.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.addListener = function addListener(evt, listener) {\n var listeners = this.getListenersAsObject(evt);\n var listenerIsWrapped = typeof listener === 'object';\n var key;\n\n for (key in listeners) {\n if (listeners.hasOwnProperty(key) && indexOfListener(listeners[key], listener) === -1) {\n listeners[key].push(listenerIsWrapped ? listener : {\n listener: listener,\n once: false\n });\n }\n }\n\n return this;\n };\n\n /**\n * Alias of addListener\n */\n proto.on = alias('addListener');\n\n /**\n * Semi-alias of addListener. It will add a listener that will be\n * automatically removed after its first execution.\n *\n * @param {String|RegExp} evt Name of the event to attach the listener to.\n * @param {Function} listener Method to be called when the event is emitted. If the function returns true then it will be removed after calling.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.addOnceListener = function addOnceListener(evt, listener) {\n return this.addListener(evt, {\n listener: listener,\n once: true\n });\n };\n\n /**\n * Alias of addOnceListener.\n */\n proto.once = alias('addOnceListener');\n\n /**\n * Defines an event name. This is required if you want to use a regex to add a listener to multiple events at once. If you don't do this then how do you expect it to know what event to add to? Should it just add to every possible match for a regex? No. That is scary and bad.\n * You need to tell it what event names should be matched by a regex.\n *\n * @param {String} evt Name of the event to create.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.defineEvent = function defineEvent(evt) {\n this.getListeners(evt);\n return this;\n };\n\n /**\n * Uses defineEvent to define multiple events.\n *\n * @param {String[]} evts An array of event names to define.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.defineEvents = function defineEvents(evts) {\n for (var i = 0; i < evts.length; i += 1) {\n this.defineEvent(evts[i]);\n }\n return this;\n };\n\n /**\n * Removes a listener function from the specified event.\n * When passed a regular expression as the event name, it will remove the listener from all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to remove the listener from.\n * @param {Function} listener Method to remove from the event.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.removeListener = function removeListener(evt, listener) {\n var listeners = this.getListenersAsObject(evt);\n var index;\n var key;\n\n for (key in listeners) {\n if (listeners.hasOwnProperty(key)) {\n index = indexOfListener(listeners[key], listener);\n\n if (index !== -1) {\n listeners[key].splice(index, 1);\n }\n }\n }\n\n return this;\n };\n\n /**\n * Alias of removeListener\n */\n proto.off = alias('removeListener');\n\n /**\n * Adds listeners in bulk using the manipulateListeners method.\n * If you pass an object as the second argument you can add to multiple events at once. The object should contain key value pairs of events and listeners or listener arrays. You can also pass it an event name and an array of listeners to be added.\n * You can also pass it a regular expression to add the array of listeners to all events that match it.\n * Yeah, this function does quite a bit. That's probably a bad thing.\n *\n * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to add to multiple events at once.\n * @param {Function[]} [listeners] An optional array of listener functions to add.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.addListeners = function addListeners(evt, listeners) {\n // Pass through to manipulateListeners\n return this.manipulateListeners(false, evt, listeners);\n };\n\n /**\n * Removes listeners in bulk using the manipulateListeners method.\n * If you pass an object as the second argument you can remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays.\n * You can also pass it an event name and an array of listeners to be removed.\n * You can also pass it a regular expression to remove the listeners from all events that match it.\n *\n * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to remove from multiple events at once.\n * @param {Function[]} [listeners] An optional array of listener functions to remove.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.removeListeners = function removeListeners(evt, listeners) {\n // Pass through to manipulateListeners\n return this.manipulateListeners(true, evt, listeners);\n };\n\n /**\n * Edits listeners in bulk. The addListeners and removeListeners methods both use this to do their job. You should really use those instead, this is a little lower level.\n * The first argument will determine if the listeners are removed (true) or added (false).\n * If you pass an object as the second argument you can add/remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays.\n * You can also pass it an event name and an array of listeners to be added/removed.\n * You can also pass it a regular expression to manipulate the listeners of all events that match it.\n *\n * @param {Boolean} remove True if you want to remove listeners, false if you want to add.\n * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to add/remove from multiple events at once.\n * @param {Function[]} [listeners] An optional array of listener functions to add/remove.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.manipulateListeners = function manipulateListeners(remove, evt, listeners) {\n var i;\n var value;\n var single = remove ? this.removeListener : this.addListener;\n var multiple = remove ? this.removeListeners : this.addListeners;\n\n // If evt is an object then pass each of its properties to this method\n if (typeof evt === 'object' && !(evt instanceof RegExp)) {\n for (i in evt) {\n if (evt.hasOwnProperty(i) && (value = evt[i])) {\n // Pass the single listener straight through to the singular method\n if (typeof value === 'function') {\n single.call(this, i, value);\n }\n else {\n // Otherwise pass back to the multiple function\n multiple.call(this, i, value);\n }\n }\n }\n }\n else {\n // So evt must be a string\n // And listeners must be an array of listeners\n // Loop over it and pass each one to the multiple method\n i = listeners.length;\n while (i--) {\n single.call(this, evt, listeners[i]);\n }\n }\n\n return this;\n };\n\n /**\n * Removes all listeners from a specified event.\n * If you do not specify an event then all listeners will be removed.\n * That means every event will be emptied.\n * You can also pass a regex to remove all events that match it.\n *\n * @param {String|RegExp} [evt] Optional name of the event to remove all listeners for. Will remove from every event if not passed.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.removeEvent = function removeEvent(evt) {\n var type = typeof evt;\n var events = this._getEvents();\n var key;\n\n // Remove different things depending on the state of evt\n if (type === 'string') {\n // Remove all listeners for the specified event\n delete events[evt];\n }\n else if (evt instanceof RegExp) {\n // Remove all events matching the regex.\n for (key in events) {\n if (events.hasOwnProperty(key) && evt.test(key)) {\n delete events[key];\n }\n }\n }\n else {\n // Remove all listeners in all events\n delete this._events;\n }\n\n return this;\n };\n\n /**\n * Alias of removeEvent.\n *\n * Added to mirror the node API.\n */\n proto.removeAllListeners = alias('removeEvent');\n\n /**\n * Emits an event of your choice.\n * When emitted, every listener attached to that event will be executed.\n * If you pass the optional argument array then those arguments will be passed to every listener upon execution.\n * Because it uses `apply`, your array of arguments will be passed as if you wrote them out separately.\n * So they will not arrive within the array on the other side, they will be separate.\n * You can also pass a regular expression to emit to all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to emit and execute listeners for.\n * @param {Array} [args] Optional array of arguments to be passed to each listener.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.emitEvent = function emitEvent(evt, args) {\n var listenersMap = this.getListenersAsObject(evt);\n var listeners;\n var listener;\n var i;\n var key;\n var response;\n\n for (key in listenersMap) {\n if (listenersMap.hasOwnProperty(key)) {\n listeners = listenersMap[key].slice(0);\n i = listeners.length;\n\n while (i--) {\n // If the listener returns true then it shall be removed from the event\n // The function is executed either with a basic call or an apply if there is an args array\n listener = listeners[i];\n\n if (listener.once === true) {\n this.removeListener(evt, listener.listener);\n }\n\n response = listener.listener.apply(this, args || []);\n\n if (response === this._getOnceReturnValue()) {\n this.removeListener(evt, listener.listener);\n }\n }\n }\n }\n\n return this;\n };\n\n /**\n * Alias of emitEvent\n */\n proto.trigger = alias('emitEvent');\n\n /**\n * Subtly different from emitEvent in that it will pass its arguments on to the listeners, as opposed to taking a single array of arguments to pass on.\n * As with emitEvent, you can pass a regex in place of the event name to emit to all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to emit and execute listeners for.\n * @param {...*} Optional additional arguments to be passed to each listener.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.emit = function emit(evt) {\n var args = Array.prototype.slice.call(arguments, 1);\n return this.emitEvent(evt, args);\n };\n\n /**\n * Sets the current value to check against when executing listeners. If a\n * listeners return value matches the one set here then it will be removed\n * after execution. This value defaults to true.\n *\n * @param {*} value The new value to check for when executing listeners.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.setOnceReturnValue = function setOnceReturnValue(value) {\n this._onceReturnValue = value;\n return this;\n };\n\n /**\n * Fetches the current value to check against when executing listeners. If\n * the listeners return value matches this one then it should be removed\n * automatically. It will return true by default.\n *\n * @return {*|Boolean} The current value to check for or the default, true.\n * @api private\n */\n proto._getOnceReturnValue = function _getOnceReturnValue() {\n if (this.hasOwnProperty('_onceReturnValue')) {\n return this._onceReturnValue;\n }\n else {\n return true;\n }\n };\n\n /**\n * Fetches the events object and creates one if required.\n *\n * @return {Object} The events storage object.\n * @api private\n */\n proto._getEvents = function _getEvents() {\n return this._events || (this._events = {});\n };\n\n /**\n * Reverts the global {@link EventEmitter} to its previous value and returns a reference to this version.\n *\n * @return {Function} Non conflicting EventEmitter class.\n */\n EventEmitter.noConflict = function noConflict() {\n exports.EventEmitter = originalGlobalValue;\n return EventEmitter;\n };\n\n // Expose the class either via AMD, CommonJS or the global object\n if (typeof define === 'function' && define.amd) {\n define(function () {\n return EventEmitter;\n });\n }\n else if (typeof module === 'object' && module.exports){\n module.exports = EventEmitter;\n }\n else {\n exports.EventEmitter = EventEmitter;\n }\n}.call(this));\n\n},{}]},{},[1]);\n })();"],"sourceRoot":"/source/"}
1
+ {"version":3,"sources":["script.js"],"names":["require","undefined","define","e","t","n","r","s","o","u","a","i","f","Error","code","l","exports","call","length","1","module","css","element","styles","background_color","style","background","color","border_color","borderColor","border_width","borderWidth","parseInt","border_style","borderStyle","width","maxWidth","Boxzilla","options","window","boxzilla_options","isLoggedIn","document","body","className","indexOf","testMode","console","log","init","boxes","boxOpts","box","create","id","boxzilla","2","merge","obj1","obj2","obj3","attrname","$","jQuery","defaults","animation","rehide","content","cookieTime","icon","minimumScreenWidth","position","trigger","closable","Box","config","this","overlay","getElementById","visible","closed","triggered","triggerHeight","cookieSet","method","calculateTriggerHeight","isCookieSet","dom","$element","events","prototype","find","click","dismiss","bind","on","target","setCookie","toggle","fits","locationHashRefersBox","load","show","wrapper","createElement","display","appendChild","innerHTML","scripts","querySelectorAll","script","createTextNode","text","parentNode","removeChild","head","setCustomBoxStyling","overflowY","maxHeight","windowHeight","innerHeight","boxHeight","outerHeight","newTopMargin","marginTop","is","fadeToggle","slideToggle","hide","$triggerElement","value","first","offset","top","height","expiryDate","Date","setDate","getDate","cookie","toUTCString","location","hash","elementId","substring","querySelector","innerWidth","mayAutoShow","mayRehide","replace","RegExp","shown","_Boxzilla","3","each","obj","callback","key","hasOwnProperty","throttle","fn","threshhold","scope","last","deferTimer","context","now","args","arguments","clearTimeout","setTimeout","apply","onKeyUp","keyCode","checkPageViewsCriteria","pageViews","checkTimeCriteria","siteTimer","time","pageTimer","checkHeightCriteria","scrollY","scrollHeight","recalculateHeights","onOverlayClick","x","offsetX","y","offsetY","rect","getBoundingClientRect","margin","left","right","bottom","triggerExitIntent","exitIntentTriggered","onMouseLeave","delay","clientY","exitIntentDelayTimer","onMouseEnter","clearInterval","EventEmitter","Object","Timer","sessionStorage","getItem","timers","start","sessionTime","stop","setItem","html","documentElement","setInterval","opts","./Box.js","./Timer.js","wolfy87-eventemitter","4","interval","tick","5","indexOfListener","listeners","listener","alias","name","proto","originalGlobalValue","getListeners","evt","response","_getEvents","test","flattenListeners","flatListeners","push","getListenersAsObject","Array","addListener","listenerIsWrapped","once","addOnceListener","defineEvent","defineEvents","evts","removeListener","index","splice","off","addListeners","manipulateListeners","removeListeners","remove","single","multiple","removeEvent","type","_events","removeAllListeners","emitEvent","listenersMap","slice","_getOnceReturnValue","emit","setOnceReturnValue","_onceReturnValue","noConflict","amd"],"mappings":"CAAA,WAAe,GAAIA,GAAUC,OAAeC,EAASD,QAAW,QAAUE,GAAEC,EAAEC,EAAEC,GAAG,QAASC,GAAEC,EAAEC,GAAG,IAAIJ,EAAEG,GAAG,CAAC,IAAIJ,EAAEI,GAAG,CAAC,GAAIE,GAAkB,kBAATV,IAAqBA,CAAQ,KAAI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7C,KAAK3E,IAAO0G,GACR,GAAIA,EAAazG,eAAeD,GAI5B,IAHAoE,EAAYsC,EAAa1G,GAAK2G,MAAM,GACpC7P,EAAIsN,EAAU/M,OAEPP,KAGHuN,EAAWD,EAAUtN,GAEjBuN,EAASiB,QAAS,GAClBvK,KAAK4K,eAAehB,EAAKN,EAASA,UAGtCO,EAAWP,EAASA,SAASvD,MAAM/F,KAAM2F,OAErCkE,IAAa7J,KAAK6L,uBAClB7L,KAAK4K,eAAehB,EAAKN,EAASA,SAMlD,OAAOtJ,OAMXyJ,EAAM7J,QAAU2J,EAAM,aAUtBE,EAAMqC,KAAO,SAAclC,GACvB,GAAIjE,GAAOyE,MAAMtJ,UAAU8K,MAAMvP,KAAKuJ,UAAW,EACjD,OAAO5F,MAAK0L,UAAU9B,EAAKjE,IAW/B8D,EAAMsC,mBAAqB,SAA4BzI,GAEnD,MADAtD,MAAKgM,iBAAmB1I,EACjBtD,MAWXyJ,EAAMoC,oBAAsB,WACxB,MAAI7L,MAAKkF,eAAe,oBACblF,KAAKgM,kBAGL,GAUfvC,EAAMK,WAAa,WACf,MAAO9J,MAAKwL,UAAYxL,KAAKwL,aAQjCzD,EAAakE,WAAa,WAEtB,MADA7P,GAAQ2L,aAAe2B,EAChB3B,GAIW,kBAAXzM,IAAyBA,EAAO4Q,IACvC5Q,EAAO,WACH,MAAOyM,KAGY,gBAAXvL,IAAuBA,EAAOJ,QAC1CI,EAAOJ,QAAU2L,EAGjB3L,EAAQ2L,aAAeA,IAE7B1L,KAAK2D,gBAEI","file":"script.min.js","sourcesContent":["(function () { var require = undefined; var define = undefined; (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){\n'use strict';\n\nvar Boxzilla = require('boxzilla');\nvar options = window.boxzilla_options;\nvar isLoggedIn = document.body.className.indexOf('logged-in') > -1;\n\n// print message when test mode is enabled\nif( isLoggedIn && options.testMode ) {\n console.log( 'Boxzilla: Test mode is enabled. Please disable test mode if you\\'re done testing.' );\n}\n\n// init boxzilla\nBoxzilla.init();\n\n// create boxes from options\nfor( var i=0; i < options.boxes.length; i++ ) {\n // get opts\n var boxOpts = options.boxes[i];\n boxOpts.testMode = isLoggedIn && options.testMode;\n\n // create box\n var box = Boxzilla.create( boxOpts.id, boxOpts);\n \n // add custom css to box\n css(box.element, boxOpts.css);\n}\n\nfunction css(element, styles) {\n if( styles.background_color ) {\n element.style.background = styles.background_color;\n }\n\n if( styles.color ) {\n element.style.color = styles.color;\n }\n\n if( styles.border_color ) {\n element.style.borderColor = styles.border_color;\n }\n\n if( styles.border_width ) {\n element.style.borderWidth = parseInt(styles.border_width) + \"px\";\n }\n\n if( styles.border_style ) {\n element.style.borderStyle = styles.border_style;\n }\n\n if( styles.width ) {\n element.style.maxWidth = parseInt(styles.width) + \"px\";\n }\n}\n\nwindow.Boxzilla = Boxzilla;\n},{\"boxzilla\":3}],2:[function(require,module,exports){\n'use strict';\n\nvar $ = window.jQuery,\n defaults = {\n 'animation': 'fade',\n 'rehide': false,\n 'content': '',\n 'cookieTime': 0,\n 'icon': '&times',\n 'minimumScreenWidth': 0,\n 'position': 'center',\n 'testMode': false,\n 'trigger': false,\n 'closable': true\n }, Boxzilla;\n\n/**\n * Merge 2 objects, values of the latter overwriting the former.\n *\n * @param obj1\n * @param obj2\n * @returns {*}\n */\nfunction merge( obj1, obj2 ) {\n var obj3 = {};\n for (var attrname in obj1) { obj3[attrname] = obj1[attrname]; }\n for (var attrname in obj2) { obj3[attrname] = obj2[attrname]; }\n return obj3;\n}\n\n// Box Object\nvar Box = function( id, config ) {\n this.id \t\t= id;\n\n // store config values\n this.config = merge(defaults, config);\n\n // store ref to overlay\n this.overlay = document.getElementById('boxzilla-overlay');\n\n // state\n this.visible \t= false;\n this.closed \t= false;\n this.triggered \t= false;\n this.triggerHeight = 0;\n this.cookieSet = false;\n\n // if a trigger was given, calculate values once and store\n if( this.config.trigger ) {\n if( this.config.trigger.method === 'percentage' || this.config.trigger.method === 'element' ) {\n this.triggerHeight = this.calculateTriggerHeight();\n }\n\n this.cookieSet = this.isCookieSet();\n }\n\n // create dom element for this box\n this.element = this.dom();\n this.$element = $(this.element);\n\n // further initialise the box\n this.events();\n};\n\n// initialise the box\nBox.prototype.events = function() {\n var box = this;\n\n // attach event to \"close\" icon inside box\n this.$element.find('.boxzilla-close-icon').click(box.dismiss.bind(this));\n\n this.$element.on('click', 'a', function(e) {\n Boxzilla.trigger('box.interactions.link', [ box, e.target ] );\n });\n\n this.$element.on('submit', 'form', function(e) {\n box.setCookie();\n Boxzilla.trigger('box.interactions.form', [ box, e.target ]);\n });\n\n // attach event to all links referring #boxzilla-{box_id}\n $(document.body).on('click', 'a[href=\"#boxzilla-' + box.id + '\"]', function() {\n box.toggle();\n return false;\n });\n\n // maybe show box right away\n if( this.fits() && this.locationHashRefersBox() ) {\n $(window).load(this.show.bind(this));\n }\n\n};\n\n// generate dom elements for this box\nBox.prototype.dom = function() {\n var wrapper = document.createElement('div');\n wrapper.className = 'boxzilla-container boxzilla-' + this.config.position + '-container';\n\n var box = document.createElement('div');\n box.className = 'boxzilla boxzilla-' + this.id + ' boxzilla-' + this.config.position;\n box.style.display = 'none';\n wrapper.appendChild(box);\n\n var content = document.createElement('div');\n content.className = 'boxzilla-content';\n content.innerHTML = this.config.content;\n box.appendChild(content);\n\n // remove <script> from box content and append them to head\n var scripts = content.querySelectorAll('script');\n if(scripts.length) {\n var script = document.createElement('script');\n for( var i=0; i<scripts.length; i++ ) {\n script.appendChild(document.createTextNode(scripts[i].text));\n scripts[i].parentNode.removeChild(scripts[i]);\n }\n document.head.appendChild(script);\n }\n\n if( this.config.closable && this.config.icon ) {\n var icon = document.createElement('span');\n icon.className = \"boxzilla-close-icon\";\n icon.innerHTML = this.config.icon;\n box.appendChild(icon);\n }\n\n document.body.appendChild(wrapper);\n\n return box;\n};\n\n// set (calculate) custom box styling depending on box options\nBox.prototype.setCustomBoxStyling = function() {\n\n // reset element to its initial state\n this.element.style.overflowY = 'auto';\n this.element.style.maxHeight = 'none';\n\n // get new dimensions\n var windowHeight = window.innerHeight;\n var boxHeight = this.$element.outerHeight();\n\n // add scrollbar to box and limit height\n if( boxHeight > windowHeight ) {\n this.element.style.maxHeight = windowHeight + \"px\";\n this.element.style.overflowY = 'scroll';\n }\n\n // set new top margin for boxes which are centered\n if( this.config.position === 'center' ) {\n var newTopMargin = ( ( windowHeight - boxHeight ) / 2 );\n newTopMargin = newTopMargin >= 0 ? newTopMargin : 0;\n this.element.style.marginTop = newTopMargin + \"px\";\n }\n\n};\n\n// toggle visibility of the box\nBox.prototype.toggle = function(show) {\n\n // revert visibility if no explicit argument is given\n if( typeof( show ) === \"undefined\" ) {\n show = ! this.visible;\n }\n\n // do nothing if element is being animated\n if( this.$element.is(':animated') ) {\n return false;\n }\n\n // is box already at desired visibility?\n if( show === this.visible ) {\n return false;\n }\n\n // if box should be hidden but is not closable, bail.\n if( ! show && ! this.config.closable ) {\n return false;\n }\n\n // set new visibility status\n this.visible = show;\n\n // calculate custom styling for which CSS is \"too stupid\"\n this.setCustomBoxStyling();\n\n // fadein / fadeout the overlay if position is \"center\"\n if( this.config.position === 'center' ) {\n $(this.overlay).fadeToggle('slow');\n }\n\n // trigger event\n Boxzilla.trigger('box.' + ( show ? 'show' : 'hide' ), [ this ] );\n\n // show or hide box using selected animation\n if( this.config.animation === 'fade' ) {\n this.$element.fadeToggle( 'slow' );\n } else {\n this.$element.slideToggle( 'slow' );\n }\n\n // // focus on first input field in box\n // this.$element.find('input').first().focus();\n\n return true;\n};\n\n// show the box\nBox.prototype.show = function() {\n return this.toggle(true);\n};\n\n// hide the box\nBox.prototype.hide = function() {\n return this.toggle(false);\n};\n\n// calculate trigger height\nBox.prototype.calculateTriggerHeight = function() {\n var triggerHeight = 0;\n\n if( this.config.trigger.method === 'element' ) {\n var $triggerElement = $(this.config.trigger.value).first();\n triggerHeight = ( $triggerElement.length > 0 ) ? $triggerElement.offset().top : 0;\n } else if( this.config.trigger.method === 'percentage' ) {\n triggerHeight = ( this.config.trigger.value / 100 * $(document).height() );\n }\n\n return triggerHeight;\n};\n\n// set cookie that disables automatically showing the box\nBox.prototype.setCookie = function() {\n // do nothing if cookieTime evaluates to false\n if(! this.config.cookieTime) {\n return;\n }\n\n var expiryDate = new Date();\n expiryDate.setDate( expiryDate.getDate() + this.config.cookieTime );\n document.cookie = 'boxzilla_box_'+ this.id + '=true; expires='+ expiryDate.toUTCString() +'; path=/';\n};\n\n// checks whether window.location.hash equals the box element ID or that of any element inside the box\nBox.prototype.locationHashRefersBox = function() {\n\n if( ! window.location.hash || 0 === window.location.hash.length ) {\n return false;\n }\n\n var elementId = window.location.hash.substring(1);\n if( elementId === this.element.id ) {\n return true;\n } else if( this.element.querySelector('#' + elementId) ) {\n return true;\n }\n\n return false;\n};\n\nBox.prototype.fits = function() {\n if( this.config.minimumScreenWidth <= 0 ) {\n return true;\n }\n\n return window.innerWidth > this.config.minimumScreenWidth\n};\n\n// is this box enabled?\nBox.prototype.mayAutoShow = function() {\n\n // don't show if box was closed (dismissed) before\n if( this.closed ) {\n return false;\n }\n\n // check if box fits on given minimum screen width\n if( ! this.fits() ) {\n return false;\n }\n\n // if trigger empty or error in calculating triggerHeight, return false\n if( ! this.config.trigger ) {\n return false;\n }\n\n // rely on cookie value (show if not set, don't show if set)\n return ! this.cookieSet;\n};\n\nBox.prototype.mayRehide = function() {\n return this.config.rehide && this.triggered;\n};\n\nBox.prototype.isCookieSet = function() {\n // always show on test mode\n if( this.config.testMode ) {\n return false;\n }\n\n // check for cookie\n if( ! this.config.cookieTime ) {\n return false;\n }\n\n var cookieSet = document.cookie.replace(new RegExp(\"(?:(?:^|.*;)\\\\s*\" + 'boxzilla_box_' + this.id + \"\\\\s*\\\\=\\\\s*([^;]*).*$)|^.*$\"), \"$1\") === \"true\";\n return cookieSet;\n\n};\n\nBox.prototype.trigger = function() {\n var shown = this.show();\n if( shown ) {\n this.triggered = true;\n }\n};\n\nBox.prototype.dismiss = function() {\n this.hide();\n this.setCookie();\n this.closed = true;\n Boxzilla.trigger('box.dismiss', [ this ]);\n};\n\nmodule.exports = function(_Boxzilla) {\n Boxzilla = _Boxzilla;\n return Box;\n};\n},{}],3:[function(require,module,exports){\n'use strict';\n\nvar $ = window.jQuery,\n EventEmitter = require('wolfy87-eventemitter'),\n Boxzilla = Object.create(EventEmitter.prototype),\n Box = require('./Box.js')(Boxzilla),\n Timer = require('./Timer.js'),\n boxes = {},\n windowHeight = window.innerHeight,\n overlay = document.createElement('div'),\n exitIntentDelayTimer,\n exitIntentTriggered,\n siteTimer = new Timer(sessionStorage.getItem('boxzilla_timer') || 0),\n pageTimer = new Timer(0),\n pageViews = sessionStorage.getItem('boxzilla_pageviews') || 0;\n\nfunction each( obj, callback ) {\n for( var key in obj ) {\n if(! obj.hasOwnProperty(key)) continue;\n callback(obj[key]);\n }\n}\n\nfunction throttle(fn, threshhold, scope) {\n threshhold || (threshhold = 250);\n var last,\n deferTimer;\n return function () {\n var context = scope || this;\n\n var now = +new Date,\n args = arguments;\n if (last && now < last + threshhold) {\n // hold on to it\n clearTimeout(deferTimer);\n deferTimer = setTimeout(function () {\n last = now;\n fn.apply(context, args);\n }, threshhold);\n } else {\n last = now;\n fn.apply(context, args);\n }\n };\n}\n\n// \"keyup\" listener\nfunction onKeyUp(e) {\n if (e.keyCode == 27) {\n Boxzilla.dismiss();\n }\n}\n\n// check \"pageviews\" criteria for each box\nfunction checkPageViewsCriteria() {\n each(boxes, function(box) {\n if( ! box.mayAutoShow() ) {\n return;\n }\n\n if( box.config.trigger.method === 'pageviews' && pageViews >= box.config.trigger.value ) {\n box.trigger();\n }\n });\n}\n\n// check time trigger criteria for each box\nfunction checkTimeCriteria() {\n each(boxes, function(box) {\n if( ! box.mayAutoShow() ) {\n return;\n }\n\n // check \"time on site\" trigger\n if (box.config.trigger.method === 'time_on_site' && siteTimer.time >= box.config.trigger.value) {\n box.trigger();\n }\n\n // check \"time on page\" trigger\n if (box.config.trigger.method === 'time_on_page' && pageTimer.time >= box.config.trigger.value) {\n box.trigger();\n }\n });\n}\n\n// check triggerHeight criteria for all boxes\nfunction checkHeightCriteria() {\n var scrollY = window.scrollY;\n var scrollHeight = scrollY + ( windowHeight * 0.667 );\n\n each(boxes, function(box) {\n if( ! box.mayAutoShow() || box.triggerHeight <= 0 ) {\n return;\n }\n\n if( scrollHeight > box.triggerHeight ) {\n box.trigger();\n } else if( box.mayRehide() ) {\n box.hide();\n }\n });\n}\n\n// recalculate heights and variables based on height\nfunction recalculateHeights() {\n windowHeight = window.innerHeight;\n\n each(boxes, function(box) {\n box.setCustomBoxStyling();\n });\n}\n\nfunction onOverlayClick(e) {\n var x = e.offsetX;\n var y = e.offsetY;\n\n // calculate if click was near a box to avoid closing it (click error margin)\n each(boxes, function(box) {\n var rect = box.element.getBoundingClientRect();\n var margin = 100 + ( window.innerWidth * 0.05 );\n\n // if click was not anywhere near box, dismiss it.\n if( x < ( rect.left - margin ) || x > ( rect.right + margin ) || y < ( rect.top - margin ) || y > ( rect.bottom + margin ) ) {\n box.dismiss();\n }\n });\n}\n\nfunction triggerExitIntent() {\n if(exitIntentTriggered) return;\n\n each(boxes, function(box) {\n if(box.mayAutoShow() && box.config.trigger.method === 'exit_intent' ) {\n box.trigger();\n }\n });\n\n exitIntentTriggered = true;\n}\n\nfunction onMouseLeave(e) {\n var delay = 400;\n\n // did mouse leave at top of window?\n if( e.clientY <= 0 ) {\n exitIntentDelayTimer = window.setTimeout(triggerExitIntent, delay);\n }\n}\n\nfunction onMouseEnter() {\n if( exitIntentDelayTimer ) {\n window.clearInterval(exitIntentDelayTimer);\n exitIntentDelayTimer = null;\n }\n}\n\nvar timers = {\n start: function() {\n var sessionTime = sessionStorage.getItem('boxzilla_timer');\n if( sessionTime ) siteTimer.time = sessionTime;\n siteTimer.start();\n pageTimer.start();\n },\n stop: function() {\n sessionStorage.setItem('boxzilla_timer', siteTimer.time);\n siteTimer.stop();\n pageTimer.stop();\n }\n};\n\n// initialise & add event listeners\nBoxzilla.init = function() {\n var html = document.documentElement;\n\n // add overlay element to dom\n overlay.id = 'boxzilla-overlay';\n document.body.appendChild(overlay);\n\n // event binds\n $(window).on('scroll', throttle(checkHeightCriteria));\n $(window).on('resize', throttle(recalculateHeights));\n $(window).on('load', recalculateHeights );\n $(html).on('mouseleave', onMouseLeave);\n $(html).on('mouseenter', onMouseEnter);\n $(html).on('keyup', onKeyUp);\n $(overlay).click(onOverlayClick);\n window.setInterval(checkTimeCriteria, 1000);\n window.setTimeout(checkPageViewsCriteria, 1000 );\n\n timers.start();\n $(window).on('focus', timers.start);\n $(window).on('beforeunload', function() {\n timers.stop();\n sessionStorage.setItem('boxzilla_pageviews', ++pageViews);\n });\n $(window).on('blur', timers.stop);\n\n Boxzilla.trigger('ready');\n};\n\n/**\n * Create a new Box\n *\n * @param string id\n * @param object opts\n *\n * @returns Box\n */\nBoxzilla.create = function(id, opts) {\n boxes[id] = new Box(id, opts);\n return boxes[id];\n};\n\n// dismiss a single box (or all by omitting id param)\nBoxzilla.dismiss = function(id) {\n // if no id given, dismiss all current open boxes\n if( typeof(id) === \"undefined\" ) {\n each(boxes, function(box) { box.dismiss(); });\n } else if( typeof( boxes[id] ) === \"object\" ) {\n boxes[id].dismiss();\n }\n};\n\nBoxzilla.hide = function(id) {\n if( typeof(id) === \"undefined\" ) {\n each(boxes, function(box) { box.hide(); });\n } else if( typeof( boxes[id] ) === \"object\" ) {\n boxes[id].hide();\n }\n};\n\nBoxzilla.show = function(id) {\n if( typeof(id) === \"undefined\" ) {\n each(boxes, function(box) { box.show(); });\n } else if( typeof( boxes[id] ) === \"object\" ) {\n boxes[id].show();\n }\n};\n\nBoxzilla.toggle = function(id) {\n if( typeof(id) === \"undefined\" ) {\n each(boxes, function(box) { box.toggle(); });\n } else if( typeof( boxes[id] ) === \"object\" ) {\n boxes[id].toggle();\n }\n};\n\nwindow.Boxzilla = Boxzilla;\n\nif ( typeof module !== 'undefined' && module.exports ) {\n module.exports = Boxzilla;\n}\n},{\"./Box.js\":2,\"./Timer.js\":4,\"wolfy87-eventemitter\":5}],4:[function(require,module,exports){\n'use strict';\n\nvar Timer = function(start) {\n this.time = start;\n this.interval = 0;\n};\n\nTimer.prototype.tick = function() {\n this.time++;\n};\n\nTimer.prototype.start = function() {\n if( ! this.interval ) {\n this.interval = window.setInterval(this.tick.bind(this), 1000);\n }\n};\n\nTimer.prototype.stop = function() {\n window.clearInterval(this.interval);\n this.interval = 0;\n};\n\nmodule.exports = Timer;\n},{}],5:[function(require,module,exports){\n/*!\n * EventEmitter v4.2.11 - git.io/ee\n * Unlicense - http://unlicense.org/\n * Oliver Caldwell - http://oli.me.uk/\n * @preserve\n */\n\n;(function () {\n 'use strict';\n\n /**\n * Class for managing events.\n * Can be extended to provide event functionality in other classes.\n *\n * @class EventEmitter Manages event registering and emitting.\n */\n function EventEmitter() {}\n\n // Shortcuts to improve speed and size\n var proto = EventEmitter.prototype;\n var exports = this;\n var originalGlobalValue = exports.EventEmitter;\n\n /**\n * Finds the index of the listener for the event in its storage array.\n *\n * @param {Function[]} listeners Array of listeners to search through.\n * @param {Function} listener Method to look for.\n * @return {Number} Index of the specified listener, -1 if not found\n * @api private\n */\n function indexOfListener(listeners, listener) {\n var i = listeners.length;\n while (i--) {\n if (listeners[i].listener === listener) {\n return i;\n }\n }\n\n return -1;\n }\n\n /**\n * Alias a method while keeping the context correct, to allow for overwriting of target method.\n *\n * @param {String} name The name of the target method.\n * @return {Function} The aliased method\n * @api private\n */\n function alias(name) {\n return function aliasClosure() {\n return this[name].apply(this, arguments);\n };\n }\n\n /**\n * Returns the listener array for the specified event.\n * Will initialise the event object and listener arrays if required.\n * Will return an object if you use a regex search. The object contains keys for each matched event. So /ba[rz]/ might return an object containing bar and baz. But only if you have either defined them with defineEvent or added some listeners to them.\n * Each property in the object response is an array of listener functions.\n *\n * @param {String|RegExp} evt Name of the event to return the listeners from.\n * @return {Function[]|Object} All listener functions for the event.\n */\n proto.getListeners = function getListeners(evt) {\n var events = this._getEvents();\n var response;\n var key;\n\n // Return a concatenated array of all matching events if\n // the selector is a regular expression.\n if (evt instanceof RegExp) {\n response = {};\n for (key in events) {\n if (events.hasOwnProperty(key) && evt.test(key)) {\n response[key] = events[key];\n }\n }\n }\n else {\n response = events[evt] || (events[evt] = []);\n }\n\n return response;\n };\n\n /**\n * Takes a list of listener objects and flattens it into a list of listener functions.\n *\n * @param {Object[]} listeners Raw listener objects.\n * @return {Function[]} Just the listener functions.\n */\n proto.flattenListeners = function flattenListeners(listeners) {\n var flatListeners = [];\n var i;\n\n for (i = 0; i < listeners.length; i += 1) {\n flatListeners.push(listeners[i].listener);\n }\n\n return flatListeners;\n };\n\n /**\n * Fetches the requested listeners via getListeners but will always return the results inside an object. This is mainly for internal use but others may find it useful.\n *\n * @param {String|RegExp} evt Name of the event to return the listeners from.\n * @return {Object} All listener functions for an event in an object.\n */\n proto.getListenersAsObject = function getListenersAsObject(evt) {\n var listeners = this.getListeners(evt);\n var response;\n\n if (listeners instanceof Array) {\n response = {};\n response[evt] = listeners;\n }\n\n return response || listeners;\n };\n\n /**\n * Adds a listener function to the specified event.\n * The listener will not be added if it is a duplicate.\n * If the listener returns true then it will be removed after it is called.\n * If you pass a regular expression as the event name then the listener will be added to all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to attach the listener to.\n * @param {Function} listener Method to be called when the event is emitted. If the function returns true then it will be removed after calling.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.addListener = function addListener(evt, listener) {\n var listeners = this.getListenersAsObject(evt);\n var listenerIsWrapped = typeof listener === 'object';\n var key;\n\n for (key in listeners) {\n if (listeners.hasOwnProperty(key) && indexOfListener(listeners[key], listener) === -1) {\n listeners[key].push(listenerIsWrapped ? listener : {\n listener: listener,\n once: false\n });\n }\n }\n\n return this;\n };\n\n /**\n * Alias of addListener\n */\n proto.on = alias('addListener');\n\n /**\n * Semi-alias of addListener. It will add a listener that will be\n * automatically removed after its first execution.\n *\n * @param {String|RegExp} evt Name of the event to attach the listener to.\n * @param {Function} listener Method to be called when the event is emitted. If the function returns true then it will be removed after calling.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.addOnceListener = function addOnceListener(evt, listener) {\n return this.addListener(evt, {\n listener: listener,\n once: true\n });\n };\n\n /**\n * Alias of addOnceListener.\n */\n proto.once = alias('addOnceListener');\n\n /**\n * Defines an event name. This is required if you want to use a regex to add a listener to multiple events at once. If you don't do this then how do you expect it to know what event to add to? Should it just add to every possible match for a regex? No. That is scary and bad.\n * You need to tell it what event names should be matched by a regex.\n *\n * @param {String} evt Name of the event to create.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.defineEvent = function defineEvent(evt) {\n this.getListeners(evt);\n return this;\n };\n\n /**\n * Uses defineEvent to define multiple events.\n *\n * @param {String[]} evts An array of event names to define.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.defineEvents = function defineEvents(evts) {\n for (var i = 0; i < evts.length; i += 1) {\n this.defineEvent(evts[i]);\n }\n return this;\n };\n\n /**\n * Removes a listener function from the specified event.\n * When passed a regular expression as the event name, it will remove the listener from all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to remove the listener from.\n * @param {Function} listener Method to remove from the event.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.removeListener = function removeListener(evt, listener) {\n var listeners = this.getListenersAsObject(evt);\n var index;\n var key;\n\n for (key in listeners) {\n if (listeners.hasOwnProperty(key)) {\n index = indexOfListener(listeners[key], listener);\n\n if (index !== -1) {\n listeners[key].splice(index, 1);\n }\n }\n }\n\n return this;\n };\n\n /**\n * Alias of removeListener\n */\n proto.off = alias('removeListener');\n\n /**\n * Adds listeners in bulk using the manipulateListeners method.\n * If you pass an object as the second argument you can add to multiple events at once. The object should contain key value pairs of events and listeners or listener arrays. You can also pass it an event name and an array of listeners to be added.\n * You can also pass it a regular expression to add the array of listeners to all events that match it.\n * Yeah, this function does quite a bit. That's probably a bad thing.\n *\n * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to add to multiple events at once.\n * @param {Function[]} [listeners] An optional array of listener functions to add.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.addListeners = function addListeners(evt, listeners) {\n // Pass through to manipulateListeners\n return this.manipulateListeners(false, evt, listeners);\n };\n\n /**\n * Removes listeners in bulk using the manipulateListeners method.\n * If you pass an object as the second argument you can remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays.\n * You can also pass it an event name and an array of listeners to be removed.\n * You can also pass it a regular expression to remove the listeners from all events that match it.\n *\n * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to remove from multiple events at once.\n * @param {Function[]} [listeners] An optional array of listener functions to remove.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.removeListeners = function removeListeners(evt, listeners) {\n // Pass through to manipulateListeners\n return this.manipulateListeners(true, evt, listeners);\n };\n\n /**\n * Edits listeners in bulk. The addListeners and removeListeners methods both use this to do their job. You should really use those instead, this is a little lower level.\n * The first argument will determine if the listeners are removed (true) or added (false).\n * If you pass an object as the second argument you can add/remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays.\n * You can also pass it an event name and an array of listeners to be added/removed.\n * You can also pass it a regular expression to manipulate the listeners of all events that match it.\n *\n * @param {Boolean} remove True if you want to remove listeners, false if you want to add.\n * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to add/remove from multiple events at once.\n * @param {Function[]} [listeners] An optional array of listener functions to add/remove.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.manipulateListeners = function manipulateListeners(remove, evt, listeners) {\n var i;\n var value;\n var single = remove ? this.removeListener : this.addListener;\n var multiple = remove ? this.removeListeners : this.addListeners;\n\n // If evt is an object then pass each of its properties to this method\n if (typeof evt === 'object' && !(evt instanceof RegExp)) {\n for (i in evt) {\n if (evt.hasOwnProperty(i) && (value = evt[i])) {\n // Pass the single listener straight through to the singular method\n if (typeof value === 'function') {\n single.call(this, i, value);\n }\n else {\n // Otherwise pass back to the multiple function\n multiple.call(this, i, value);\n }\n }\n }\n }\n else {\n // So evt must be a string\n // And listeners must be an array of listeners\n // Loop over it and pass each one to the multiple method\n i = listeners.length;\n while (i--) {\n single.call(this, evt, listeners[i]);\n }\n }\n\n return this;\n };\n\n /**\n * Removes all listeners from a specified event.\n * If you do not specify an event then all listeners will be removed.\n * That means every event will be emptied.\n * You can also pass a regex to remove all events that match it.\n *\n * @param {String|RegExp} [evt] Optional name of the event to remove all listeners for. Will remove from every event if not passed.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.removeEvent = function removeEvent(evt) {\n var type = typeof evt;\n var events = this._getEvents();\n var key;\n\n // Remove different things depending on the state of evt\n if (type === 'string') {\n // Remove all listeners for the specified event\n delete events[evt];\n }\n else if (evt instanceof RegExp) {\n // Remove all events matching the regex.\n for (key in events) {\n if (events.hasOwnProperty(key) && evt.test(key)) {\n delete events[key];\n }\n }\n }\n else {\n // Remove all listeners in all events\n delete this._events;\n }\n\n return this;\n };\n\n /**\n * Alias of removeEvent.\n *\n * Added to mirror the node API.\n */\n proto.removeAllListeners = alias('removeEvent');\n\n /**\n * Emits an event of your choice.\n * When emitted, every listener attached to that event will be executed.\n * If you pass the optional argument array then those arguments will be passed to every listener upon execution.\n * Because it uses `apply`, your array of arguments will be passed as if you wrote them out separately.\n * So they will not arrive within the array on the other side, they will be separate.\n * You can also pass a regular expression to emit to all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to emit and execute listeners for.\n * @param {Array} [args] Optional array of arguments to be passed to each listener.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.emitEvent = function emitEvent(evt, args) {\n var listenersMap = this.getListenersAsObject(evt);\n var listeners;\n var listener;\n var i;\n var key;\n var response;\n\n for (key in listenersMap) {\n if (listenersMap.hasOwnProperty(key)) {\n listeners = listenersMap[key].slice(0);\n i = listeners.length;\n\n while (i--) {\n // If the listener returns true then it shall be removed from the event\n // The function is executed either with a basic call or an apply if there is an args array\n listener = listeners[i];\n\n if (listener.once === true) {\n this.removeListener(evt, listener.listener);\n }\n\n response = listener.listener.apply(this, args || []);\n\n if (response === this._getOnceReturnValue()) {\n this.removeListener(evt, listener.listener);\n }\n }\n }\n }\n\n return this;\n };\n\n /**\n * Alias of emitEvent\n */\n proto.trigger = alias('emitEvent');\n\n /**\n * Subtly different from emitEvent in that it will pass its arguments on to the listeners, as opposed to taking a single array of arguments to pass on.\n * As with emitEvent, you can pass a regex in place of the event name to emit to all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to emit and execute listeners for.\n * @param {...*} Optional additional arguments to be passed to each listener.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.emit = function emit(evt) {\n var args = Array.prototype.slice.call(arguments, 1);\n return this.emitEvent(evt, args);\n };\n\n /**\n * Sets the current value to check against when executing listeners. If a\n * listeners return value matches the one set here then it will be removed\n * after execution. This value defaults to true.\n *\n * @param {*} value The new value to check for when executing listeners.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.setOnceReturnValue = function setOnceReturnValue(value) {\n this._onceReturnValue = value;\n return this;\n };\n\n /**\n * Fetches the current value to check against when executing listeners. If\n * the listeners return value matches this one then it should be removed\n * automatically. It will return true by default.\n *\n * @return {*|Boolean} The current value to check for or the default, true.\n * @api private\n */\n proto._getOnceReturnValue = function _getOnceReturnValue() {\n if (this.hasOwnProperty('_onceReturnValue')) {\n return this._onceReturnValue;\n }\n else {\n return true;\n }\n };\n\n /**\n * Fetches the events object and creates one if required.\n *\n * @return {Object} The events storage object.\n * @api private\n */\n proto._getEvents = function _getEvents() {\n return this._events || (this._events = {});\n };\n\n /**\n * Reverts the global {@link EventEmitter} to its previous value and returns a reference to this version.\n *\n * @return {Function} Non conflicting EventEmitter class.\n */\n EventEmitter.noConflict = function noConflict() {\n exports.EventEmitter = originalGlobalValue;\n return EventEmitter;\n };\n\n // Expose the class either via AMD, CommonJS or the global object\n if (typeof define === 'function' && define.amd) {\n define(function () {\n return EventEmitter;\n });\n }\n else if (typeof module === 'object' && module.exports){\n module.exports = EventEmitter;\n }\n else {\n exports.EventEmitter = EventEmitter;\n }\n}.call(this));\n\n},{}]},{},[1]);\n })();"],"sourceRoot":"/source/"}
boxzilla.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /*
3
  Plugin Name: Boxzilla
4
- Version: 3.0.1
5
  Plugin URI: https://boxzillaplugin.com/#utm_source=wp-plugin&utm_medium=boxzilla&utm_campaign=plugins-page
6
  Description: Call-To-Action Boxes that display after visitors scroll down far enough. Unobtrusive, but highly conversing!
7
  Author: ibericode
@@ -48,7 +48,7 @@ function __load_boxzilla() {
48
  }
49
 
50
  define( 'BOXZILLA_FILE', __FILE__ );
51
- define( 'BOXZILLA_VERSION', '3.0.1' );
52
 
53
  require __DIR__ . '/bootstrap.php';
54
  }
1
  <?php
2
  /*
3
  Plugin Name: Boxzilla
4
+ Version: 3.0.2
5
  Plugin URI: https://boxzillaplugin.com/#utm_source=wp-plugin&utm_medium=boxzilla&utm_campaign=plugins-page
6
  Description: Call-To-Action Boxes that display after visitors scroll down far enough. Unobtrusive, but highly conversing!
7
  Author: ibericode
48
  }
49
 
50
  define( 'BOXZILLA_FILE', __FILE__ );
51
+ define( 'BOXZILLA_VERSION', '3.0.2' );
52
 
53
  require __DIR__ . '/bootstrap.php';
54
  }
languages/{scroll-triggered-boxes-es_ES.mo → boxzilla-es_ES.mo} RENAMED
File without changes
languages/{scroll-triggered-boxes-es_ES.po → boxzilla-es_ES.po} RENAMED
File without changes
languages/boxzilla-fr_FR.mo ADDED
Binary file
languages/{scroll-triggered-boxes.po → boxzilla-fr_FR.po} RENAMED
@@ -2,14 +2,13 @@ msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Scroll Triggered Boxes\n"
4
  "POT-Creation-Date: 2014-04-18 12:14+0100\n"
5
- "PO-Revision-Date: 2014-04-18 12:14+0100\n"
6
- "Last-Translator: Danny <hi@dannyvankooten.com>\n"
7
- "Language-Team: Danny van Kooten <hi@dannyvankooten.com>\n"
8
- "Language: en_US\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "X-Generator: Poedit 1.6.4\n"
13
  "X-Poedit-Basepath: .\n"
14
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
15
  "X-Poedit-KeywordsList: __;_e\n"
@@ -17,71 +16,72 @@ msgstr ""
17
 
18
  #: ../includes/class-admin.php:58
19
  msgid "Box Options"
20
- msgstr ""
21
 
22
  #: ../includes/class-admin.php:67
23
  msgid "Need support?"
24
- msgstr ""
25
 
26
  #: ../includes/class-admin.php:75
27
  msgid "Donate $10, $20 or $50"
28
- msgstr ""
29
 
30
  #: ../includes/class-admin.php:83
31
  msgid "About the developer"
32
- msgstr ""
33
 
34
  #: ../includes/views/metabox-options.php:7
35
  msgid "Scroll Triggered Box Options"
36
- msgstr ""
37
 
38
  #: ../includes/views/metabox-options.php:9
39
  msgid "Display Options"
40
- msgstr ""
41
 
42
  #: ../includes/views/metabox-options.php:15
43
  msgid "Show this box"
44
- msgstr ""
45
 
46
  #: ../includes/views/metabox-options.php:18
47
  msgid "Basic"
48
- msgstr ""
49
 
50
  #: ../includes/views/metabox-options.php:19
51
  msgid "Everywhere"
52
- msgstr ""
53
 
54
  #: ../includes/views/metabox-options.php:20
55
  msgid "if Post Type is"
56
- msgstr ""
57
 
58
  #: ../includes/views/metabox-options.php:21
59
  msgid "if Page is"
60
- msgstr ""
61
 
62
  #: ../includes/views/metabox-options.php:22
63
  msgid "if Page is not"
64
- msgstr ""
65
 
66
  #: ../includes/views/metabox-options.php:23
67
  msgid "if Post is"
68
- msgstr ""
69
 
70
  #: ../includes/views/metabox-options.php:25
71
  msgid "Advanced"
72
- msgstr ""
73
 
74
  #: ../includes/views/metabox-options.php:26
75
  msgid "Manual conditon"
76
- msgstr ""
77
 
78
  #: ../includes/views/metabox-options.php:31
79
  msgid "Leave empty for any or enter (comma-separated) names or ID's"
80
  msgstr ""
 
81
 
82
  #: ../includes/views/metabox-options.php:39
83
  msgid "Add rule"
84
- msgstr ""
85
 
86
  #: ../includes/views/metabox-options.php:42
87
  #, php-format
@@ -89,115 +89,123 @@ msgid ""
89
  "For using advanced (manual) rules, have a look at %sthe WordPress "
90
  "Conditional Tags Codex page%s."
91
  msgstr ""
 
 
92
 
93
  #: ../includes/views/metabox-options.php:45
94
  msgid "Box Position"
95
- msgstr ""
96
 
97
  #: ../includes/views/metabox-options.php:48
98
  msgid "Top Left"
99
- msgstr ""
100
 
101
  #: ../includes/views/metabox-options.php:49
102
  msgid "Top Right"
103
- msgstr ""
104
 
105
  #: ../includes/views/metabox-options.php:50
106
  msgid "Bottom Left"
107
- msgstr ""
108
 
109
  #: ../includes/views/metabox-options.php:51
110
  msgid "Bottom Right"
111
- msgstr ""
112
 
113
  #: ../includes/views/metabox-options.php:57
114
  msgid "Trigger Point"
115
- msgstr ""
116
 
117
  #: ../includes/views/metabox-options.php:61
118
  msgid "of page height"
119
- msgstr ""
120
 
121
  #: ../includes/views/metabox-options.php:64
122
  msgid "Element Selector"
123
- msgstr ""
124
 
125
  #: ../includes/views/metabox-options.php:70
126
  msgid "Example: #comments (element must exist or box won't be shown)"
127
  msgstr ""
 
128
 
129
  #: ../includes/views/metabox-options.php:74
130
  msgid "Animation"
131
- msgstr ""
132
 
133
  #: ../includes/views/metabox-options.php:76
134
  msgid "Fade In"
135
- msgstr ""
136
 
137
  #: ../includes/views/metabox-options.php:77
138
  msgid "Slide In"
139
- msgstr ""
140
 
141
  #: ../includes/views/metabox-options.php:78
142
  msgid "Which animation type should be used to show the box when triggered?"
143
- msgstr ""
144
 
145
  #: ../includes/views/metabox-options.php:82
146
  msgid "Cookie expiration days"
147
- msgstr ""
148
 
149
  #: ../includes/views/metabox-options.php:85
150
  msgid "After closing the box, how many days should it stay hidden?"
151
  msgstr ""
 
 
152
 
153
  #: ../includes/views/metabox-options.php:90
154
  msgid "Auto-hide?"
155
- msgstr ""
156
 
157
  #: ../includes/views/metabox-options.php:92
158
  #: ../includes/views/metabox-options.php:101
159
  msgid "Yes"
160
- msgstr ""
161
 
162
  #: ../includes/views/metabox-options.php:93
163
  #: ../includes/views/metabox-options.php:102
164
  msgid "No"
165
- msgstr ""
166
 
167
  #: ../includes/views/metabox-options.php:94
168
  msgid "Hide box again when visitors scroll back up?"
169
  msgstr ""
 
170
 
171
  #: ../includes/views/metabox-options.php:99
172
  msgid "Enable test mode?"
173
- msgstr ""
174
 
175
  #: ../includes/views/metabox-options.php:103
176
  msgid ""
177
  "If test mode is enabled, the box will show up regardless of whether a cookie "
178
  "has been set."
179
  msgstr ""
 
 
180
 
181
  #: ../includes/views/metabox-options.php:108
182
  msgid "Appearance"
183
- msgstr ""
184
 
185
  #: ../includes/views/metabox-options.php:112
186
  msgid "Background color"
187
- msgstr ""
188
 
189
  #: ../includes/views/metabox-options.php:116
190
  msgid "Text color"
191
- msgstr ""
192
 
193
  #: ../includes/views/metabox-options.php:120
194
  msgid "Box width"
195
- msgstr ""
196
 
197
  #: ../includes/views/metabox-options.php:126
198
  msgid "Border color"
199
- msgstr ""
200
 
201
  #: ../includes/views/metabox-options.php:130
202
  msgid "Border width"
203
- msgstr ""
2
  msgstr ""
3
  "Project-Id-Version: Scroll Triggered Boxes\n"
4
  "POT-Creation-Date: 2014-04-18 12:14+0100\n"
5
+ "PO-Revision-Date: 2016-06-09 11:58+0100\n"
6
+ "Last-Translator: \n"
7
+ "Language-Team: \n"
 
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
11
+ "X-Generator: Poedit 1.5.5\n"
12
  "X-Poedit-Basepath: .\n"
13
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
14
  "X-Poedit-KeywordsList: __;_e\n"
16
 
17
  #: ../includes/class-admin.php:58
18
  msgid "Box Options"
19
+ msgstr "Options de boîte"
20
 
21
  #: ../includes/class-admin.php:67
22
  msgid "Need support?"
23
+ msgstr "Besoin de support ?"
24
 
25
  #: ../includes/class-admin.php:75
26
  msgid "Donate $10, $20 or $50"
27
+ msgstr "Donner 10 $, 20 $ ou 50 $"
28
 
29
  #: ../includes/class-admin.php:83
30
  msgid "About the developer"
31
+ msgstr "A propos du développeur"
32
 
33
  #: ../includes/views/metabox-options.php:7
34
  msgid "Scroll Triggered Box Options"
35
+ msgstr "Options de Scroll Triggered Box"
36
 
37
  #: ../includes/views/metabox-options.php:9
38
  msgid "Display Options"
39
+ msgstr "Options d'affichage"
40
 
41
  #: ../includes/views/metabox-options.php:15
42
  msgid "Show this box"
43
+ msgstr "Afficher cette boîte"
44
 
45
  #: ../includes/views/metabox-options.php:18
46
  msgid "Basic"
47
+ msgstr "Basique"
48
 
49
  #: ../includes/views/metabox-options.php:19
50
  msgid "Everywhere"
51
+ msgstr "Partout sur le site"
52
 
53
  #: ../includes/views/metabox-options.php:20
54
  msgid "if Post Type is"
55
+ msgstr "Si le Post Type est"
56
 
57
  #: ../includes/views/metabox-options.php:21
58
  msgid "if Page is"
59
+ msgstr "Si la page est"
60
 
61
  #: ../includes/views/metabox-options.php:22
62
  msgid "if Page is not"
63
+ msgstr "Si la page n'est pas"
64
 
65
  #: ../includes/views/metabox-options.php:23
66
  msgid "if Post is"
67
+ msgstr "Si l'article est"
68
 
69
  #: ../includes/views/metabox-options.php:25
70
  msgid "Advanced"
71
+ msgstr "Avancé"
72
 
73
  #: ../includes/views/metabox-options.php:26
74
  msgid "Manual conditon"
75
+ msgstr "Condition manuelle"
76
 
77
  #: ../includes/views/metabox-options.php:31
78
  msgid "Leave empty for any or enter (comma-separated) names or ID's"
79
  msgstr ""
80
+ "Laisser vide pour tous ou une liste de noms ou d'ID séparés par des virgules"
81
 
82
  #: ../includes/views/metabox-options.php:39
83
  msgid "Add rule"
84
+ msgstr "Ajouter une règle"
85
 
86
  #: ../includes/views/metabox-options.php:42
87
  #, php-format
89
  "For using advanced (manual) rules, have a look at %sthe WordPress "
90
  "Conditional Tags Codex page%s."
91
  msgstr ""
92
+ "Pour des régles manuelles avancées, voir %sthe WordPress Conditional Tags "
93
+ "Codex page%s."
94
 
95
  #: ../includes/views/metabox-options.php:45
96
  msgid "Box Position"
97
+ msgstr "Position de la boîte"
98
 
99
  #: ../includes/views/metabox-options.php:48
100
  msgid "Top Left"
101
+ msgstr "En haut à gauche"
102
 
103
  #: ../includes/views/metabox-options.php:49
104
  msgid "Top Right"
105
+ msgstr "En haut à droite"
106
 
107
  #: ../includes/views/metabox-options.php:50
108
  msgid "Bottom Left"
109
+ msgstr "En bas à gauche"
110
 
111
  #: ../includes/views/metabox-options.php:51
112
  msgid "Bottom Right"
113
+ msgstr "En bas à droite"
114
 
115
  #: ../includes/views/metabox-options.php:57
116
  msgid "Trigger Point"
117
+ msgstr "Seuil de déclenchement"
118
 
119
  #: ../includes/views/metabox-options.php:61
120
  msgid "of page height"
121
+ msgstr "de la hauteur de la page"
122
 
123
  #: ../includes/views/metabox-options.php:64
124
  msgid "Element Selector"
125
+ msgstr "Un élément précis dans la page"
126
 
127
  #: ../includes/views/metabox-options.php:70
128
  msgid "Example: #comments (element must exist or box won't be shown)"
129
  msgstr ""
130
+ "Exemple: #comments (l'élément doit exister sinon la boîte n'apparaîtra pas)"
131
 
132
  #: ../includes/views/metabox-options.php:74
133
  msgid "Animation"
134
+ msgstr "Animation"
135
 
136
  #: ../includes/views/metabox-options.php:76
137
  msgid "Fade In"
138
+ msgstr "Fondu enchaîné"
139
 
140
  #: ../includes/views/metabox-options.php:77
141
  msgid "Slide In"
142
+ msgstr "Glissement"
143
 
144
  #: ../includes/views/metabox-options.php:78
145
  msgid "Which animation type should be used to show the box when triggered?"
146
+ msgstr "Quelle type d'animation lors de l'apparition de le boîte ?"
147
 
148
  #: ../includes/views/metabox-options.php:82
149
  msgid "Cookie expiration days"
150
+ msgstr "Nombre de jours avant expiration du cookie"
151
 
152
  #: ../includes/views/metabox-options.php:85
153
  msgid "After closing the box, how many days should it stay hidden?"
154
  msgstr ""
155
+ "Après la fermeture de la boîte, combien de jours avant qu'elle ne s'affiche "
156
+ "à nouveau ?"
157
 
158
  #: ../includes/views/metabox-options.php:90
159
  msgid "Auto-hide?"
160
+ msgstr "Masquage automatique ?"
161
 
162
  #: ../includes/views/metabox-options.php:92
163
  #: ../includes/views/metabox-options.php:101
164
  msgid "Yes"
165
+ msgstr "Oui"
166
 
167
  #: ../includes/views/metabox-options.php:93
168
  #: ../includes/views/metabox-options.php:102
169
  msgid "No"
170
+ msgstr "Non"
171
 
172
  #: ../includes/views/metabox-options.php:94
173
  msgid "Hide box again when visitors scroll back up?"
174
  msgstr ""
175
+ "Masque la boîte à nouveau lorsque le visiteur revient en haut de page ?"
176
 
177
  #: ../includes/views/metabox-options.php:99
178
  msgid "Enable test mode?"
179
+ msgstr "Activer le mode test ?"
180
 
181
  #: ../includes/views/metabox-options.php:103
182
  msgid ""
183
  "If test mode is enabled, the box will show up regardless of whether a cookie "
184
  "has been set."
185
  msgstr ""
186
+ "Si le mode test est activé, la boîte va s'afficher indépendamment des "
187
+ "cookies."
188
 
189
  #: ../includes/views/metabox-options.php:108
190
  msgid "Appearance"
191
+ msgstr "Apparence"
192
 
193
  #: ../includes/views/metabox-options.php:112
194
  msgid "Background color"
195
+ msgstr "Couleur de fond"
196
 
197
  #: ../includes/views/metabox-options.php:116
198
  msgid "Text color"
199
+ msgstr "Couleur du texte"
200
 
201
  #: ../includes/views/metabox-options.php:120
202
  msgid "Box width"
203
+ msgstr "Largeur de bordure"
204
 
205
  #: ../includes/views/metabox-options.php:126
206
  msgid "Border color"
207
+ msgstr "Couleur de bordure"
208
 
209
  #: ../includes/views/metabox-options.php:130
210
  msgid "Border width"
211
+ msgstr "Largeur de bordure"
languages/{scroll-triggered-boxes-nl_NL.mo → boxzilla-nl_NL.mo} RENAMED
File without changes
languages/{scroll-triggered-boxes-nl_NL.po → boxzilla-nl_NL.po} RENAMED
File without changes
languages/boxzilla.pot ADDED
@@ -0,0 +1,387 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2016 boxzilla
2
+ # This file is distributed under the same license as the boxzilla package.
3
+ msgid ""
4
+ msgstr ""
5
+ "Project-Id-Version: boxzilla\n"
6
+ "MIME-Version: 1.0\n"
7
+ "Content-Type: text/plain; charset=UTF-8\n"
8
+ "Content-Transfer-Encoding: 8bit\n"
9
+ "PO-Revision-Date: 2016-MO-DA HO:MI+ZONE\n"
10
+ "X-Poedit-Basepath: ..\n"
11
+ "X-Poedit-SourceCharset: UTF-8\n"
12
+ "X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
13
+ "X-Poedit-SearchPath-0: .\n"
14
+ "X-Poedit-SearchPathExcluded-0: *.js\n"
15
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n\n"
16
+
17
+ #: src/admin/class-admin.php:143
18
+ msgid "Awesome, you are using Boxzilla! You can now safely <a href=\"%s\">deactivate the Scroll Triggered Boxes plugin</a>."
19
+ msgstr ""
20
+
21
+ #: src/admin/class-admin.php:285
22
+ msgid "Box ID"
23
+ msgstr ""
24
+
25
+ #: src/admin/class-admin.php:291
26
+ msgid "Box Title"
27
+ msgstr ""
28
+
29
+ #: src/admin/class-admin.php:359, src/admin/class-admin.php:361, src/admin/views/settings.php:7
30
+ msgid "Settings"
31
+ msgstr ""
32
+
33
+ #: src/admin/class-admin.php:371, src/admin/class-admin.php:373
34
+ msgid "Extensions"
35
+ msgstr ""
36
+
37
+ #: src/admin/class-admin.php:559
38
+ msgid "Enter a comma-separated list of values."
39
+ msgstr ""
40
+
41
+ #: src/admin/class-admin.php:561
42
+ msgid "Enter a comma-separated list of post slugs or post ID's.."
43
+ msgstr ""
44
+
45
+ #: src/admin/class-admin.php:563
46
+ msgid "Enter a comma-separated list of page slugs or page ID's.."
47
+ msgstr ""
48
+
49
+ #: src/admin/class-admin.php:565
50
+ msgid "Enter a comma-separated list of post types.."
51
+ msgstr ""
52
+
53
+ #: src/admin/class-admin.php:567
54
+ msgid "Enter a comma-separated list of relative URL's, eg /contact/"
55
+ msgstr ""
56
+
57
+ #: src/admin/class-admin.php:633
58
+ msgid "Box Appearance"
59
+ msgstr ""
60
+
61
+ #: src/admin/class-admin.php:651
62
+ msgid "Box Options"
63
+ msgstr ""
64
+
65
+ #: src/admin/class-admin.php:669
66
+ msgid "Looking for help?"
67
+ msgstr ""
68
+
69
+ #: src/admin/class-admin.php:685
70
+ msgid "Subscribe to our newsletter"
71
+ msgstr ""
72
+
73
+ #: src/admin/views/extensions.php:4
74
+ msgid "Available Add-On Plugins"
75
+ msgstr ""
76
+
77
+ #: src/admin/views/extensions.php:6
78
+ msgid "There are various add-ons available for Boxzilla which further enhance the functionality of the core plugin."
79
+ msgstr ""
80
+
81
+ #: src/admin/views/extensions.php:9
82
+ msgid "To gain instant access the premium add-on plugins listed here, <a href=\"%s\">have a look at our pricing</a>."
83
+ msgstr ""
84
+
85
+ #: src/admin/views/extensions.php:18
86
+ msgid "You will be redirected to the Boxzilla site in a few seconds.."
87
+ msgstr ""
88
+
89
+ #: src/admin/views/extensions.php:19
90
+ msgid "If not, please click here: %s."
91
+ msgstr ""
92
+
93
+ #: src/admin/views/metaboxes/box-appearance-controls.php:2
94
+ msgid "For the best experience when styling your box, please use the default WordPress visual editor."
95
+ msgstr ""
96
+
97
+ #: src/admin/views/metaboxes/box-appearance-controls.php:8
98
+ msgid "Background color"
99
+ msgstr ""
100
+
101
+ #: src/admin/views/metaboxes/box-appearance-controls.php:12
102
+ msgid "Text color"
103
+ msgstr ""
104
+
105
+ #: src/admin/views/metaboxes/box-appearance-controls.php:16
106
+ msgid "Box width"
107
+ msgstr ""
108
+
109
+ #: src/admin/views/metaboxes/box-appearance-controls.php:18, src/admin/views/metaboxes/box-appearance-controls.php:29
110
+ msgid "Width in px"
111
+ msgstr ""
112
+
113
+ #: src/admin/views/metaboxes/box-appearance-controls.php:23
114
+ msgid "Border color"
115
+ msgstr ""
116
+
117
+ #: src/admin/views/metaboxes/box-appearance-controls.php:27
118
+ msgid "Border width"
119
+ msgstr ""
120
+
121
+ #: src/admin/views/metaboxes/box-appearance-controls.php:32, src/admin/views/metaboxes/box-appearance-controls.php:40
122
+ msgid "Border style"
123
+ msgstr ""
124
+
125
+ #: src/admin/views/metaboxes/box-appearance-controls.php:46
126
+ msgid "<a href=\"%s\">Click here to reset all styling settings</a>."
127
+ msgstr ""
128
+
129
+ #: src/admin/views/metaboxes/box-option-controls.php:21
130
+ msgid "Select a condition"
131
+ msgstr ""
132
+
133
+ #: src/admin/views/metaboxes/box-option-controls.php:23
134
+ msgid "everywhere"
135
+ msgstr ""
136
+
137
+ #: src/admin/views/metaboxes/box-option-controls.php:25
138
+ msgid "if page"
139
+ msgstr ""
140
+
141
+ #: src/admin/views/metaboxes/box-option-controls.php:27
142
+ msgid "if post"
143
+ msgstr ""
144
+
145
+ #: src/admin/views/metaboxes/box-option-controls.php:29
146
+ msgid "if post tag"
147
+ msgstr ""
148
+
149
+ #: src/admin/views/metaboxes/box-option-controls.php:31
150
+ msgid "if post category"
151
+ msgstr ""
152
+
153
+ #: src/admin/views/metaboxes/box-option-controls.php:33
154
+ msgid "if post type"
155
+ msgstr ""
156
+
157
+ #: src/admin/views/metaboxes/box-option-controls.php:35
158
+ msgid "if URL"
159
+ msgstr ""
160
+
161
+ #: src/admin/views/metaboxes/box-option-controls.php:37
162
+ msgid "if referer"
163
+ msgstr ""
164
+
165
+ #: src/admin/views/metaboxes/box-option-controls.php:55
166
+ msgid "Bottom Left"
167
+ msgstr ""
168
+
169
+ #: src/admin/views/metaboxes/box-option-controls.php:57
170
+ msgid "Bottom Right"
171
+ msgstr ""
172
+
173
+ #: src/admin/views/metaboxes/box-option-controls.php:59
174
+ msgid "Center"
175
+ msgstr ""
176
+
177
+ #: src/admin/views/metaboxes/box-option-controls.php:61
178
+ msgid "Top Left"
179
+ msgstr ""
180
+
181
+ #: src/admin/views/metaboxes/box-option-controls.php:63
182
+ msgid "Top Right"
183
+ msgstr ""
184
+
185
+ #: src/admin/views/metaboxes/box-option-controls.php:91
186
+ msgid "Load this box if"
187
+ msgstr ""
188
+
189
+ #: src/admin/views/metaboxes/box-option-controls.php:97
190
+ msgid "Request matches"
191
+ msgstr ""
192
+
193
+ #: src/admin/views/metaboxes/box-option-controls.php:101
194
+ msgid "any"
195
+ msgstr ""
196
+
197
+ #: src/admin/views/metaboxes/box-option-controls.php:103
198
+ msgid "all"
199
+ msgstr ""
200
+
201
+ #: src/admin/views/metaboxes/box-option-controls.php:107
202
+ msgid "of the following conditions."
203
+ msgstr ""
204
+
205
+ #: src/admin/views/metaboxes/box-option-controls.php:149, src/admin/views/metaboxes/box-option-controls.php:341
206
+ msgid "is"
207
+ msgstr ""
208
+
209
+ #: src/admin/views/metaboxes/box-option-controls.php:151, src/admin/views/metaboxes/box-option-controls.php:343
210
+ msgid "is not"
211
+ msgstr ""
212
+
213
+ #: src/admin/views/metaboxes/box-option-controls.php:157, src/admin/views/metaboxes/box-option-controls.php:349
214
+ msgid "Leave empty for any or enter (comma-separated) names or ID's"
215
+ msgstr ""
216
+
217
+ #: src/admin/views/metaboxes/box-option-controls.php:173
218
+ msgid "Add rule"
219
+ msgstr ""
220
+
221
+ #: src/admin/views/metaboxes/box-option-controls.php:179
222
+ msgid "Box Position"
223
+ msgstr ""
224
+
225
+ #: src/admin/views/metaboxes/box-option-controls.php:199
226
+ msgid "Animation"
227
+ msgstr ""
228
+
229
+ #: src/admin/views/metaboxes/box-option-controls.php:203
230
+ msgid "Fade In"
231
+ msgstr ""
232
+
233
+ #: src/admin/views/metaboxes/box-option-controls.php:205
234
+ msgid "Slide In"
235
+ msgstr ""
236
+
237
+ #: src/admin/views/metaboxes/box-option-controls.php:207
238
+ msgid "Which animation type should be used to show the box when triggered?"
239
+ msgstr ""
240
+
241
+ #: src/admin/views/metaboxes/box-option-controls.php:215
242
+ msgid "Auto-show box?"
243
+ msgstr ""
244
+
245
+ #: src/admin/views/metaboxes/box-option-controls.php:219
246
+ msgid "Never"
247
+ msgstr ""
248
+
249
+ #: src/admin/views/metaboxes/box-option-controls.php:221
250
+ msgid "Yes, after %s seconds on the page."
251
+ msgstr ""
252
+
253
+ #: src/admin/views/metaboxes/box-option-controls.php:223
254
+ msgid "Yes, when at %s of page height"
255
+ msgstr ""
256
+
257
+ #: src/admin/views/metaboxes/box-option-controls.php:225
258
+ msgid "Yes, when at element %s"
259
+ msgstr ""
260
+
261
+ #: src/admin/views/metaboxes/box-option-controls.php:225
262
+ msgid "Example: #comments"
263
+ msgstr ""
264
+
265
+ #: src/admin/views/metaboxes/box-option-controls.php:237
266
+ msgid "Cookie expiration days"
267
+ msgstr ""
268
+
269
+ #: src/admin/views/metaboxes/box-option-controls.php:243
270
+ msgid "After closing the box, how many days should it stay hidden?"
271
+ msgstr ""
272
+
273
+ #: src/admin/views/metaboxes/box-option-controls.php:251
274
+ msgid "Do not auto-show box on small screens?"
275
+ msgstr ""
276
+
277
+ #: src/admin/views/metaboxes/box-option-controls.php:255
278
+ msgid "Do not auto-show on screens smaller than %s."
279
+ msgstr ""
280
+
281
+ #: src/admin/views/metaboxes/box-option-controls.php:257
282
+ msgid "Leave empty if you <strong>do</strong> want to auto-show the box on small screens."
283
+ msgstr ""
284
+
285
+ #: src/admin/views/metaboxes/box-option-controls.php:267
286
+ msgid "Auto-hide?"
287
+ msgstr ""
288
+
289
+ #: src/admin/views/metaboxes/box-option-controls.php:275
290
+ msgid "Hide box again when visitors scroll back up?"
291
+ msgstr ""
292
+
293
+ #: src/admin/views/metaboxes/box-option-controls.php:283, src/admin/views/settings.php:20
294
+ msgid "Enable test mode?"
295
+ msgstr ""
296
+
297
+ #: src/admin/views/metaboxes/box-option-controls.php:291, src/admin/views/settings.php:24
298
+ msgid "If test mode is enabled, all boxes will show up regardless of whether a cookie has been set."
299
+ msgstr ""
300
+
301
+ #: src/default-actions.php:12, src/default-actions.php:24
302
+ msgid "Boxzilla"
303
+ msgstr ""
304
+
305
+ #: src/default-actions.php:13
306
+ msgid "Box"
307
+ msgstr ""
308
+
309
+ #: src/default-actions.php:14
310
+ msgid "Add New"
311
+ msgstr ""
312
+
313
+ #: src/default-actions.php:15
314
+ msgid "Add New Box"
315
+ msgstr ""
316
+
317
+ #: src/default-actions.php:16
318
+ msgid "Edit Box"
319
+ msgstr ""
320
+
321
+ #: src/default-actions.php:17
322
+ msgid "New Box"
323
+ msgstr ""
324
+
325
+ #: src/default-actions.php:18
326
+ msgid "All Boxes"
327
+ msgstr ""
328
+
329
+ #: src/default-actions.php:19
330
+ msgid "View Box"
331
+ msgstr ""
332
+
333
+ #: src/default-actions.php:20
334
+ msgid "Search Boxes"
335
+ msgstr ""
336
+
337
+ #: src/default-actions.php:21
338
+ msgid "No Boxes found"
339
+ msgstr ""
340
+
341
+ #: src/default-actions.php:22
342
+ msgid "No Boxes found in Trash"
343
+ msgstr ""
344
+
345
+ #: src/licensing/class-api.php:162
346
+ msgid "The Boxzilla server returned an invalid response."
347
+ msgstr ""
348
+
349
+ #: src/licensing/views/license-form.php:8
350
+ msgid "License & Plugin Updates"
351
+ msgstr ""
352
+
353
+ #: src/licensing/views/license-form.php:13
354
+ msgid "Warning! You are <u>not</u> receiving plugin updates for the following plugin(s):"
355
+ msgstr ""
356
+
357
+ #: src/licensing/views/license-form.php:27
358
+ msgid "License Key"
359
+ msgstr ""
360
+
361
+ #: src/licensing/views/license-form.php:29
362
+ msgid "Enter your license key.."
363
+ msgstr ""
364
+
365
+ #: src/licensing/views/license-form.php:32
366
+ msgid "The license key received when purchasing your premium Boxzilla plan. <a href=\"%s\">You can find it here</a>."
367
+ msgstr ""
368
+
369
+ #: src/licensing/views/license-form.php:37
370
+ msgid "License Status"
371
+ msgstr ""
372
+
373
+ #: src/licensing/views/license-form.php:41
374
+ msgid "ACTIVE"
375
+ msgstr ""
376
+
377
+ #: src/licensing/views/license-form.php:41
378
+ msgid "you are receiving plugin updates"
379
+ msgstr ""
380
+
381
+ #: src/licensing/views/license-form.php:43
382
+ msgid "INACTIVE"
383
+ msgstr ""
384
+
385
+ #: src/licensing/views/license-form.php:43
386
+ msgid "you are <strong>not</strong> receiving plugin updates"
387
+ msgstr ""
languages/scroll-triggered-boxes.mo DELETED
Binary file
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === Boxzilla ===
2
  Contributors: Ibericode, DvanKooten, hchouhan, lapzor
3
  Donate link: https://boxzillaplugin.com/#utm_source=wp-plugin-repo&utm_medium=boxzilla&utm_campaign=donate-link
4
- Tags: scroll triggered box, cta, social, pop-up, newsletter, call to action, mailchimp, contact form 7, social media,mc4wp
5
  Requires at least: 3.8
6
  Tested up to: 4.5.2
7
- Stable tag: 3.0.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -149,6 +149,21 @@ Have a look at the [frequently asked questions](https://wordpress.org/plugins/bo
149
  == Changelog ==
150
 
151
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
152
  #### 3.0.1 - May 23, 2016
153
 
154
  **Improvements**
1
  === Boxzilla ===
2
  Contributors: Ibericode, DvanKooten, hchouhan, lapzor
3
  Donate link: https://boxzillaplugin.com/#utm_source=wp-plugin-repo&utm_medium=boxzilla&utm_campaign=donate-link
4
+ Tags: scroll triggered box, cta, social, pop-up, newsletter, call to action, mailchimp, contact form 7, social media, mc4wp, ibericode
5
  Requires at least: 3.8
6
  Tested up to: 4.5.2
7
+ Stable tag: 3.0.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
149
  == Changelog ==
150
 
151
 
152
+ #### 3.0.2 - June 21, 2016
153
+
154
+ **Fixes**
155
+
156
+ - Box condition "is post" was not working with an empty value.
157
+
158
+ **Improvements**
159
+
160
+ - Prevent PHP notice when saving box without changing box rules.
161
+
162
+ **Additions**
163
+
164
+ - Added French translation files, thanks to Benoit Mercusot.
165
+
166
+
167
  #### 3.0.1 - May 23, 2016
168
 
169
  **Improvements**
src/admin/class-admin.php CHANGED
@@ -33,8 +33,9 @@ class Admin {
33
  * Initialise the all admin related stuff
34
  */
35
  public function init() {
 
36
  // Load the plugin textdomain
37
- load_plugin_textdomain( 'boxzilla', null, $this->plugin->dir() . '/languages' );
38
 
39
  // action hooks
40
  $this->add_hooks();
@@ -489,6 +490,7 @@ class Admin {
489
  * @return array The sanitized rule array
490
  */
491
  public function sanitize_box_rule( $rule) {
 
492
  $rule['value'] = trim( $rule['value'] );
493
 
494
  // convert to array
33
  * Initialise the all admin related stuff
34
  */
35
  public function init() {
36
+
37
  // Load the plugin textdomain
38
+ load_plugin_textdomain( 'boxzilla', null, basename( $this->plugin->dir() ) . '/languages' );
39
 
40
  // action hooks
41
  $this->add_hooks();
490
  * @return array The sanitized rule array
491
  */
492
  public function sanitize_box_rule( $rule) {
493
+
494
  $rule['value'] = trim( $rule['value'] );
495
 
496
  // convert to array
src/admin/views/metaboxes/box-option-controls.php CHANGED
@@ -66,7 +66,8 @@ $box_positions = array(
66
  <td>
67
  <select class="boxzilla-rule-condition" name="boxzilla_box[rules][<?php echo $key; ?>][condition]">
68
  <?php foreach( $rule_options as $value => $label ) {
69
- printf( '<option value="%s" %s %s>%s</option>', $value, disabled( $value, '', false ), selected( $rule['condition'], $value ), $label );
 
70
  } ?>
71
  </select>
72
 
66
  <td>
67
  <select class="boxzilla-rule-condition" name="boxzilla_box[rules][<?php echo $key; ?>][condition]">
68
  <?php foreach( $rule_options as $value => $label ) {
69
+ $readonly = $value == '' ? 'readonly': '';
70
+ printf( '<option value="%s" %s %s>%s</option>', $value, $readonly, selected( $rule['condition'], $value ), $label );
71
  } ?>
72
  </select>
73
 
src/class-loader.php CHANGED
@@ -127,6 +127,8 @@ class BoxLoader {
127
 
128
  case 'is_single':
129
  case 'is_post':
 
 
130
  $matched = is_single( $value );
131
  break;
132
 
@@ -176,7 +178,7 @@ class BoxLoader {
176
 
177
  $matched = false;
178
  $comparision = isset( $box_rules['comparision'] ) ? $box_rules['comparision'] : 'any';
179
-
180
  // loop through all rules for all boxes
181
  foreach ( $box_rules as $rule ) {
182
 
127
 
128
  case 'is_single':
129
  case 'is_post':
130
+ // convert to empty string if array with just empty string in it
131
+ $value = ( $value === array( '' ) ) ? '' : $value;
132
  $matched = is_single( $value );
133
  break;
134
 
178
 
179
  $matched = false;
180
  $comparision = isset( $box_rules['comparision'] ) ? $box_rules['comparision'] : 'any';
181
+
182
  // loop through all rules for all boxes
183
  foreach ( $box_rules as $rule ) {
184