1;(function() { 2 this.BXTinnyPopup = function() { 3 this.options = arguments[0]; 4 this.popup = this.options.el.querySelector(this.options.popup.selector); 5 this.watchNode = this.options.el.querySelector(this.options.watch.selector); 6 this.closeButton = this.options.el.querySelector(this.options.popup.closeButton.selector); 7 8 9 this.options.el.addEventListener("click", function(e) { 10 11 }); 12 13 if(!BX.type.isElementNode(this.watchNode)) 14 return; 15 16 if(this.watchNode === null) 17 return; 18 19 this.init(); 20 }; 21 BXTinnyPopup.prototype.init = function() { 22 let _this = this; 23 24 this.watchNode.addEventListener("click", function(event) { 25 event.preventDefault(); 26 _this.open(); 27 }); 28 this.closeButton.addEventListener("click", function(event) { 29 event.preventDefault(); 30 _this.close(); 31 }); 32 }; 33 BXTinnyPopup.prototype.open = function(event) { 34 this.popup.classList.remove(this.options.popup.class.close); 35 if(!this.popup.classList.contains(this.options.popup.class.open)) { 36 this.popup.classList.add(this.options.popup.class.open); 37 } 38 }; 39 BXTinnyPopup.prototype.close = function(event) { 40 this.popup.classList.remove(this.options.popup.class.open); 41 if(!this.popup.classList.contains(this.options.popup.class.close)) { 42 this.popup.classList.add(this.options.popup.class.close); 43 } 44 }; 45})();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.