PageSourceSearch

https://www.hannonhill.com/_files/js/goodbyepopup.js?v=2024

js hannonhill.com collected 2026-10-02 12:01:16 UTC 2,721 bytes, 14 lines download raw bytes

1(function(global,factory){typeof exports==='object'&&typeof module!=='undefined'?factory(exports):typeof define==='function'&&define.amd?define(['exports'],factory):(global=typeof globalThis!=='undefined'?globalThis:global||self,factory(global.GoodbyePopup={}));}(this,(function(exports){'use strict';var ACTIVE_CLASSNAME='_active';function GoodbyePopup(config){this.config=config||{};this.isActive=false;this.wrapper=document.querySelector(this.config.selector||'[data-goodbye-popup]');this.open=this.open.bind(this);this.close=this.close.bind(this);this.onMouseLeave=this.onMouseLeave.bind(this);this.onMouseEnter=this.onMouseEnter.bind(this);this.onKeyPress=this.onKeyPress.bind(this);this.hideWrapper();document.addEventListener('mouseleave',this.onMouseLeave);document.addEventListener('mouseenter',this.onMouseEnter);}
2GoodbyePopup.prototype.onMouseLeave=function onMouseLeave(){this.leaveTimeout=setTimeout(()=>{document.removeEventListener('mouseleave',this.onMouseLeave);this.open();},300);}
3GoodbyePopup.prototype.onMouseEnter=function onMouseEnter(){clearTimeout(this.leaveTimeout);}
4GoodbyePopup.prototype.hideWrapper=function hideWrapper(){if(this.wrapper){this.wrapper.setAttribute('hidden','');this.wrapper.style.display='none';}}
5GoodbyePopup.prototype.onKeyPress=function onKeyPress(e){if(e.key==='Escape'){this.close();}}
6GoodbyePopup.prototype.open=function open(){if(this.isActive)return;this.isActive=true;if(this.wrapper){this.wrapper.removeAttribute('hidden');this.wrapper.style.display='block';setTimeout(()=>{this.wrapper.classList.add(ACTIVE_CLASSNAME);},20);}
7this.closeButtons=this.wrapper.querySelectorAll(this.config.closeSelector||'[data-goodbye-popup-close]');if(this.closeButtons.length){var self=this;Array.prototype.forEach.call(this.closeButtons,function(item){console.log(item);item.addEventListener('click',self.close);});}
8document.addEventListener('keydown',this.onKeyPress);}
9GoodbyePopup.prototype.close=function close(){if(!this.isActive)return;this.isActive=false;var self=this;function onTransitionend(){self.hideWrapper();self.wrapper.removeEventListener('transitionend',onTransitionend);}
10if(this.wrapper){this.wrapper.addEventListener('transitionend',onTransitionend);this.wrapper.classList.remove(ACTIVE_CLASSNAME);setTimeout(()=>{this.hideWrapper();},500);}
11if(this.closeButtons.length){Array.prototype.forEach.call(this.closeButtons,function(item){console.log(item);item.removeEventListener('click',self.close);});}
12document.removeEventListener('keypress',this.onKeyPress);}
13var goodbyePopup;function init(config){if(goodbyePopup)return;goodbyePopup=new GoodbyePopup(config);}
14exports.init=init;Object.defineProperty(exports,'__esModule',{value:true});})));

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.