. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
| Server IP : 87.98.249.37 / Your IP : 216.73.216.208 [ Web Server : Microsoft-IIS/10.0 System : Windows NT NS3076740 10.0 build 17763 (Windows Server 2019) AMD64 User : IWPD_292(growel19p) ( 0) PHP Version : 8.3.12 Disable Function : NONE Domains : 0 Domains MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/Inetpub/vhosts/growel.com/httpdocs/blog/wp-content/plugins/firebox/media/admin/js/ |
Upload File : |
var FireBox_Notices=function(){function e(){this.notices=document.querySelector(".firebox-notices"),this.ajax_url=this.notices.dataset.ajaxurl,this.nonce=this.notices.dataset.nonce,this.exclude=JSON.parse(this.notices.dataset.exclude),this.init()}var t=e.prototype;return t.init=function(){this.showNotices(),this.initEvents()},t.showNotices=function(){var t=this,e={exclude:this.exclude,action:"firebox_get_notices"},o=["usagetracking","downloadkey","upgradetopro","license","outdated","update","geolocation","error"];this.call(e,function(e){for(index in o)e.notices[o[index]]&&(t.onBeforeShowNotice(o[index],e.notices[o[index]]),t.notices.innerHTML+=e.notices[o[index]]);!e.notices.license&&e.notices.rate&&(t.notices.innerHTML+=e.notices.rate),""===t.notices.innerHTML&&t.notices.remove()})},t.onBeforeShowNotice=function(e){"update"===e&&document.querySelector(".fpf-plugin-version-updated")&&(document.querySelector(".fpf-plugin-version-updated").classList.add("hidden"),document.querySelector(".fpf-plugin-version-outdated").classList.remove("hidden"))},t.initEvents=function(){var t=this;document.addEventListener("click",function(e){t.onNoticeClose(e,"usageTracking",90),t.onNoticeClose(e,"outdated",7),t.onNoticeClose(e,"rate",30),t.onAlreadyRatedClose(e),t.onNoticeClose(e,"update",1),t.onNoticeClose(e,"expired",7),t.onNoticeClose(e,"expiring",1),t.onNoticeClose(e,"geolocation",30),t.onNoticeClose(e,"upgradeToPro",30),t.updateDownloadKey(e),t.enableUsageTracking(e)}),document.addEventListener("mouseover",function(e){t.onTooltipEnter(e)}),document.addEventListener("mouseout",function(e){t.onTooltipExit(e)}),window.addEventListener("resize",function(e){t.updateTooltipPosition()},!0)},t.onTooltipEnter=function(e){var t,o=e.target.closest(".notice-tooltip-icon");o&&((t=o.closest(".notice-tooltip-wrapper").querySelector(".notice-tooltip")).classList.contains("is-visible")||(this.hideOtherTooltips(),t.classList.add("is-visible"),this.elementInViewport(t)?t.classList.remove("leftPosition"):t.classList.add("leftPosition")))},t.onTooltipExit=function(e){e.relatedTarget&&!e.relatedTarget.closest(".notice-tooltip-wrapper")&&this.hideOtherTooltips()},t.hideOtherTooltips=function(){var e=document.querySelectorAll(".notice-tooltip.is-visible");e.length&&e.forEach(function(e){e.classList.remove("is-visible"),e.classList.remove("leftPosition")})},t.elementInViewport=function(e){var t=e.getBoundingClientRect();return 0<=t.top&&0<=t.left&&20<t.left&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)},t.updateTooltipPosition=function(){var t=this;document.querySelectorAll(".notice-tooltip").forEach(function(e){t.elementInViewport(e)?1300<window.innerWidth&&e.classList.remove("leftPosition"):e.classList.add("leftPosition")})},t.onAlreadyRatedClose=function(e){var t=e.target.closest(".firebox-notice-rate-already-rated");t&&(e.preventDefault(),t.closest(".firebox-notice").remove(),this.setCookie("fboxNoticeHideRateNotice",9999))},t.onNoticeClose=function(e,t,o){void 0===o&&(o="");var i=e.target.closest(".btn-close");i&&i.closest(".firebox-notice."+t)&&(e.preventDefault(),i.closest(".firebox-notice").remove(),o&&this.setCookie("fboxNoticeHide"+this.capitalizeFirstLetter(t)+"Notice",o))},t.onOutdatedNotice=function(){this.setCookie("fboxNoticeHideOutdatedNotice",3)},t.onRateNotice=function(){this.setCookie("fboxNoticeHideRateNotice",9999)},t.onUpdateNotificationNotice=function(){this.setCookie("fboxNoticeHideUpdateNotice",1)},t.onExpiredNotice=function(){this.setCookie("fboxNoticeHideExpiredNotice",7)},t.onExpiringNotice=function(){this.setCookie("fboxNoticeHideExpiringNotice",1)},t.updateDownloadKey=function(e){var t=e.target.closest(".firebox-notice-download-key-btn");if(t){e.preventDefault();var o=t.closest(".actions"),i=t.previousElementSibling.value;if(""===i.trim())return o.querySelector(".actions-message").innerHTML=firebox_notices_object.DOWNLOAD_KEY_ENTERED_INVALID,void o.querySelector(".actions-message").classList.add("is-visible");var n=t.closest(".firebox-notice");t.classList.add("loading");var s={download_key:i,action:"firebox_download_key_notice_activate"};this.call(s,function(e){e.error?(n.querySelector(".actions-message").innerHTML=e.response,n.querySelector(".actions-message").classList.add("is-visible")):(o.innerHTML=e.response,o.classList.add("green-text"),o.classList.add("license-key-updated"),setTimeout(function(){n.remove()},1500)),t.classList.remove("loading")})}},t.enableUsageTracking=function(e){var t,o,i=e.target.closest(".firebox-notice-enable-usage-tracking-btn");i&&(e.preventDefault(),t=i.closest(".firebox-notice"),o=i.closest(".actions"),i.classList.add("loading"),this.call({action:"firebox_enable_usage_tracking"},function(e){i.classList.remove("loading"),o.innerHTML=e.message,o.classList.add("green-text"),setTimeout(function(){t.remove()},1500)}))},t.capitalizeFirstLetter=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},t.setCookie=function(e,t){void 0===t&&(t=1);var o=new Date,i=o.getTime(),n=24*t*60*60;o.setTime(i+1e3*n);var s="; expires="+o.toGMTString();document.cookie=e+"=true"+s+"; path=/; secure"},t.call=function(t,o){var e=this.ajax_url+"?nonce="+this.nonce,i=Object.keys(t).map(function(e){return encodeURIComponent(e)+"="+encodeURIComponent(t[e])}).join("&");fetch(e+"&"+i).then(function(e){return e.json()}).then(function(e){o(e)}).catch(function(e){console.error("FireBox Notices: "+e)})},e}();document.addEventListener("DOMContentLoaded",function(){new FireBox_Notices});