File Editor
Directories:
.. (Back)
Files:
admin-bar-notice.min.asset.php
admin-bar-notice.min.js
Create New File
Create
Edit File: admin-bar-notice.min.js
!function(e){var t;function n(t){var n=document.getElementById("wp-admin-bar-jetpack-scan-notice");if(n)if(t){var a=1==t?e.singular:e.multiple;n.innerHTML='<a href="'+e.scan_dashboard_url+'" class="ab-item">'+a+"</a>"}else n.parentNode.removeChild(n)}t=function(){var t;(t=new XMLHttpRequest).open("GET",e.scan_endpoint,!0),t.onload=function(){if(200==this.status){var e=JSON.parse(this.response);if(e&&e.data){var t=JSON.parse(e.data);n(t.threats&&t.threats.length?t.threats.length:0)}else n(0)}else n(0)},t.setRequestHeader("X-WP-Nonce",e.nonce),t.send()},"loading"!=document.readyState?t():document.addEventListener("DOMContentLoaded",t)}(window.Jetpack_Scan);
Save Changes
Rename File
Rename