| 1 |
var FPF_Update_Notice=function(){function e(){this.init()}var t=e.prototype;return t.init=function(){document.querySelector(".fpf-page-content")&&this.load()},t.load=function(){var t={action:"fpf_show_update_notice"},e=Object.keys(t).map(function(e){return encodeURIComponent(e)+"="+encodeURIComponent(t[e])}).join("&");fetch(fpf_js_object.ajax_url+"?"+e).then(function(e){return e.json()}).then(function(e){if(e.html){var t=document.createElement("div");t.innerHTML=e.html,document.querySelector(".fpf-page-content").insertBefore(t.firstChild,document.querySelector(".fpf-page-content").firstChild)}})},e}();document.addEventListener("DOMContentLoaded",function(e){new FPF_Update_Notice}); |