PluginProbe ʕ •ᴥ•ʔ
Post Views Counter / 1.3.13
Post Views Counter v1.3.13
1.7.13 1.7.12 1.7.11 trunk 1.0.0 1.0.1 1.0.10 1.0.11 1.0.12 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.2.0 1.2.1 1.2.10 1.2.11 1.2.12 1.2.13 1.2.14 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3 1.3.1 1.3.10 1.3.11 1.3.12 1.3.13 1.3.2 1.3.2.1 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 1.3.8 1.3.9 1.4 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 1.4.7 1.4.8 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 1.5.6 1.5.7 1.5.8 1.5.9 1.6.0 1.6.1 1.7.0 1.7.1 1.7.10 1.7.2 1.7.3 1.7.4 1.7.5 1.7.6 1.7.7 1.7.8 1.7.9
post-views-counter / js / frontend.min.js
post-views-counter / js Last commit date
admin-dashboard.js 3 years ago admin-post.js 5 years ago admin-quick-edit.js 5 years ago admin-settings.js 4 years ago admin-widgets.js 5 years ago block-editor.min.js 3 years ago counter.js 3 years ago counter.min.js 3 years ago frontend.js 3 years ago frontend.min.js 3 years ago
frontend.min.js
1 lines
1 document.addEventListener("DOMContentLoaded",function(){(PostViewsCounter={promise:null,init:function(e){"rest_api"===e.mode?this.promise=this.request(e.requestURL,{},"POST",{"Content-Type":"application/x-www-form-urlencoded; charset=utf-8","X-WP-Nonce":e.nonce}):this.promise=this.request(e.requestURL,{action:"pvc-check-post",pvc_nonce:e.nonce,id:e.postID},"POST",{"Content-Type":"application/x-www-form-urlencoded; charset=utf-8"})},request:function(e,t,n,o){let i={method:n,mode:"cors",cache:"no-cache",credentials:"same-origin",headers:o,body:this.prepareData(t)},r=this;return fetch(e,i).then(function(e){if(!e.ok)throw Error(e.statusText);return e.json()}).then(function(e){try{"object"==typeof e&&null!==e&&r.triggerEvent("pvcCheckPost",e)}catch(t){console.log("Invalid JSON data"),console.log(t)}}).catch(function(e){console.log("Invalid response"),console.log(e)})},prepareData:function(e){return Object.keys(e).map(function(t){return encodeURIComponent(t)+"="+encodeURIComponent(e[t])}).join("&").replace(/%20/g,"+")},triggerEvent:function(e,t){let n=new CustomEvent(e,{bubbles:!0,detail:t});document.dispatchEvent(n)}}).init(pvcArgsFrontend)});