PluginProbe ʕ •ᴥ•ʔ
Post Views Counter / 1.7.15
Post Views Counter v1.7.15
1.7.15 1.7.14 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 / counter.js
post-views-counter / js Last commit date
admin-columns.js 3 weeks ago admin-dashboard.js 3 weeks ago admin-post.js 3 weeks ago admin-quick-edit.js 3 weeks ago admin-settings.js 3 weeks ago admin-theme.js 3 weeks ago admin-widgets.js 3 weeks ago block-editor.js 3 weeks ago counter.js 3 weeks ago frontend.js 3 weeks ago integration-gutenberg.js 3 weeks ago
counter.js
2 lines
1 function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}window.PostViewsCounterManual={init:function(t){var e=this,n={action:t.runtimeAction||"pvc-queue-runtime"};return this.request(t.url,n,!1).then(function(n){var o=n&&!0===n.success&&n.data&&n.data.runtime?n.data.runtime.queueNonce:"";if("string"!=typeof o||""===o)throw Error("Missing runtime queue nonce");return e.count(t,o)}).catch(function(t){console.log("Post Views Counter: Invalid manual count response"),console.log(t)})},count:function(e,n){var o=this,r={action:"pvc-view-posts",pvc_nonce:n,ids:e.ids};return this.request(e.url,r,!0).then(function(e){if("object"!==t(e)||null===e||!1===e.success)throw Error("Invalid queue response");o.triggerEvent("pvcCheckPost",e)})},request:function(t,e,n){var o=Object.keys(e).map(function(t){return"".concat(encodeURIComponent(t),"=").concat(encodeURIComponent(e[t]))}).join("&").replace(/%20/g,"+");return fetch(t,{method:"POST",mode:"same-origin",cache:"no-store",credentials:"same-origin",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=utf-8","Cache-Control":"no-store"},keepalive:n,body:o}).then(function(t){if(!t.ok)throw Error(t.statusText);return t.json()})},triggerEvent:function(t,e){var n=new CustomEvent(t,{bubbles:!0,detail:e});document.dispatchEvent(n)}};
2