diff --git a/dist/smart-app-banner.js b/dist/smart-app-banner.js index c54a5e0..52897b1 100644 --- a/dist/smart-app-banner.js +++ b/dist/smart-app-banner.js @@ -1,35 +1,42 @@ -(function(u){"object"===typeof exports&&"undefined"!==typeof module?module.exports=u():"function"===typeof define&&define.amd?define([],u):("undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:this).SmartBanner=u()})(function(){return function c(f,h,e){function b(d,v){if(!h[d]){if(!f[d]){var g="function"==typeof require&&require;if(!v&&g)return g(d,!0);if(a)return a(d,!0);g=Error("Cannot find module '"+d+"'");throw g.code="MODULE_NOT_FOUND",g;}g=h[d]= -{exports:{}};f[d][0].call(g.exports,function(a){var e=f[d][1][a];return b(e?e:a)},g,g.exports,c,f,h,e)}return h[d].exports}for(var a="function"==typeof require&&require,d=0;d
'+ -this.options.title+"
"+this.options.author+"
"+e+'
'+this.options.button+"";a.body?a.body.appendChild(q):a&&a.addEventListener("DOMContentLoaded",function(){a.body.appendChild(q)});b(".smartbanner-button",q).addEventListener("click",this.install.bind(this),!1);b(".smartbanner-close",q).addEventListener("click",this.close.bind(this),!1)},hide:function(){p.classList.remove("smartbanner-show"); -if("function"===typeof this.options.close)return this.options.close()},show:function(){p.classList.add("smartbanner-show");if("function"===typeof this.options.show)return this.options.show()},close:function(){this.hide();d.set("smartbanner-closed","true",{path:"/",expires:new Date(Number(new Date)+864E5*this.options.daysHidden)});if("function"===typeof this.options.close)return this.options.close()},install:function(){this.hide();d.set("smartbanner-installed","true",{path:"/",expires:new Date(Number(new Date)+ -864E5*this.options.daysReminder)});if("function"===typeof this.options.close)return this.options.close()},parseAppId:function(){var a=b('meta[name="'+this.appMeta+'"]');if(a)return this.appId="windows"===this.type?a.getAttribute("content"):/app-id=([^\s,]+)/.exec(a.getAttribute("content"))[1]}};f.exports=c},{"component-query":2,"cookie-cutter":3,"get-doc":4,"ua-parser-js":6,"xtend/mutable":7}],2:[function(c,f,h){function e(b,a){return a.querySelector(b)}h=f.exports=function(b,a){a=a||document;return e(b, -a)};h.all=function(b,a){a=a||document;return a.querySelectorAll(b)};h.engine=function(b){if(!b.one)throw Error(".one callback required");if(!b.all)throw Error(".all callback required");e=b.one;h.all=b.all;return h}},{}],3:[function(c,f,h){h=f.exports=function(e){e||(e={});"string"===typeof e&&(e={cookie:e});void 0===e.cookie&&(e.cookie="");return{get:function(b){for(var a=e.cookie.split(/;\s*/),d=0;d
'+ +this.options.title+"
"+this.options.author+"
"+e+'
'+this.options.button+"";a.body?a.body.appendChild(p):a&&a.addEventListener("DOMContentLoaded",function(){a.body.appendChild(p)});c(".smartbanner-button",p).addEventListener("click",this.install.bind(this),!1);c(".smartbanner-close",p).addEventListener("click",this.close.bind(this),!1)},hide:function(){q.classList.remove("smartbanner-show"); +if("function"===typeof this.options.hide)return this.options.hide(this.type)},show:function(){q.classList.add("smartbanner-show");if("function"===typeof this.options.show)return this.options.show(this.type)},close:function(){this.hide();d.set("smartbanner-closed","true",{path:"/",expires:new Date(Number(new Date)+864E5*this.options.daysHidden)});if("function"===typeof this.options.close)return this.options.close(this.type)},install:function(){this.hide();d.set("smartbanner-installed","true",{path:"/", +expires:new Date(Number(new Date)+864E5*this.options.daysReminder)});if("function"===typeof this.options.install)return this.options.install(this.type)},parseAppId:function(){var a=c('meta[name="'+this.appMeta+'"]');if(a)return this.appId="windows"===this.type?a.getAttribute("content"):/app-id=([^\s,]+)/.exec(a.getAttribute("content"))[1]}};g.exports=b},{"component-query":2,"cookie-cutter":3,"get-doc":4,"ua-parser-js":6,"xtend/mutable":7}],2:[function(b,g,f){function e(c,a){return a.querySelector(c)} +f=g.exports=function(c,a){a=a||document;return e(c,a)};f.all=function(c,a){a=a||document;return a.querySelectorAll(c)};f.engine=function(c){if(!c.one)throw Error(".one callback required");if(!c.all)throw Error(".all callback required");e=c.one;f.all=c.all;return f}},{}],3:[function(b,g,f){f=g.exports=function(e){e||(e={});"string"===typeof e&&(e={cookie:e});void 0===e.cookie&&(e.cookie="");return{get:function(c){for(var a=e.cookie.split(/;\s*/),d=0;d