notifications.js 3.6 KB
(function(t){function e(e){for(var o,a,s=e[0],u=e[1],c=e[2],f=0,p=[];f<s.length;f++)a=s[f],Object.prototype.hasOwnProperty.call(i,a)&&i[a]&&p.push(i[a][0]),i[a]=0;for(o in u)Object.prototype.hasOwnProperty.call(u,o)&&(t[o]=u[o]);l&&l(e);while(p.length)p.shift()();return r.push.apply(r,c||[]),n()}function n(){for(var t,e=0;e<r.length;e++){for(var n=r[e],o=!0,s=1;s<n.length;s++){var u=n[s];0!==i[u]&&(o=!1)}o&&(r.splice(e--,1),t=a(a.s=n[0]))}return t}var o={},i={notifications:0},r=[];function a(e){if(o[e])return o[e].exports;var n=o[e]={i:e,l:!1,exports:{}};return t[e].call(n.exports,n,n.exports,a),n.l=!0,n.exports}a.m=t,a.c=o,a.d=function(t,e,n){a.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},a.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},a.t=function(t,e){if(1&e&&(t=a(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)a.d(n,o,function(e){return t[e]}.bind(null,o));return n},a.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return a.d(e,"a",e),e},a.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},a.p="/";var s=window["aioseopjsonp"]=window["aioseopjsonp"]||[],u=s.push.bind(s);s.push=e,s=s.slice();for(var c=0;c<s.length;c++)e(s[c]);var l=u;r.push([20,"chunk-vendors","chunk-common"]),n()})({20:function(t,e,n){t.exports=n("6e2b")},2196:function(t,e,n){"use strict";n("ae9f2")},"6e2b":function(t,e,n){"use strict";n.r(e);n("e260"),n("e6cf"),n("cca6"),n("a79d");var o=n("a026"),i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.display?n("div",{staticClass:"aioseo-menu-new-notifications",on:{click:function(e){return e.stopPropagation(),t.hideNotificationsPopup.apply(null,arguments)},mouseover:t.hideNotificationsPopup}},[t._v(t._s(t.strings.newNotifications))]):t._e()},r=[],a={data:function(){return{interval:null,display:!1,strings:{newNotifications:this.$t.__("You have new notifications!",this.$td)}}},methods:{showNotificationsPopup:function(){if(this.interval&&window.aioseoNotifications&&parseInt(window.aioseoNotifications.newNotifications)){this.display=!0;var t=document.querySelector("#wp-admin-bar-aioseo-main");t&&t.classList.add("new-notifications")}},hideNotificationsPopup:function(){var t=this;this.interval=null,setTimeout((function(){t.display=!1;var e=document.querySelector("#wp-admin-bar-aioseo-main");e&&e.classList.remove("new-notifications")}),500)}},created:function(){var t=this;this.interval=setInterval(this.showNotificationsPopup,500),this.showNotificationsPopup(),setTimeout((function(){t.interval=null,t.display=!1}),5e3)}},s=a,u=(n("2196"),n("2877")),c=Object(u["a"])(s,i,r,!1,null,null,null),l=c.exports,f=n("cf27"),p=(n("2d26"),n("96cf"),n("4683")),d=document.querySelector("#aioseo-menu-new-notifications");d&&(o["default"].prototype.$t=p["a"],o["default"].prototype.$td="all-in-one-seo-pack",o["default"].prototype.$tdPro=Object({NODE_ENV:"production",VUE_APP_VERSION:"Lite",VUE_APP_TEXTDOMAIN:"all-in-one-seo-pack",VUE_APP_NAME:"All in One SEO",VUE_APP_SHORT_NAME:"AIOSEO",VUE_APP_ENV:"dev",VUE_APP_TEXT_DOMAIN:"all-in-one-seo-pack",VUE_APP_CRT_DOMAIN:"aioseo.local",VUE_APP_CRT_ROOT_CA:"/users/benjamin/Library/Application Support/mkcert/rootCA.pem",BASE_URL:"/"}).VUE_APP_TEXTDOMAIN_PRO,o["default"].config.productionTip=!1,new o["default"]({store:f["a"],render:function(t){return t(l)}}).$mount("#aioseo-menu-new-notifications"))},ae9f2:function(t,e,n){}});