PluginProbe
Search Atlas SEO – OTTO AI SEO Automation for WordPress / 2.6.12
Search Atlas SEO – OTTO AI SEO Automation for WordPress v2.6.12
2.7.0 2.6.26 2.6.25 2.6.24 2.6.23 2.6.22 2.6.21 2.6.20 2.6.19 2.6.18 2.6.17 2.6.16 2.6.15 2.6.14 2.6.13 2.6.12 2.6.11 2.6.10 2.6.9 2.6.8 2.6.7 2.6.6 2.6.5 2.6.4 2.6.3 All 139 releases
metasync / site-error-logs / js / metasync-error-logs.js

metasync-error-logs.js in Search Atlas SEO – OTTO AI SEO Automation for WordPress 2.6.12, at site-error-logs/js/metasync-error-logs.js

44 lines 1.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /**
2 * MetaSync error logs — copy to clipboard.
3 *
4 * Extracted from site-error-logs/class-metasync-error-logs.php (Phase 5, #887).
5 */
6 (function() {
7 var button = document.getElementById('copy-log-btn');
8 if (!button) {
9 return;
10 }
11
12 button.addEventListener('click', function() {
13 var content = document.getElementById('error-log-content').textContent;
14 var originalText = button.innerHTML;
15
16 navigator.clipboard.writeText(content).then(function() {
17 button.innerHTML = '<span class="dashicons dashicons-yes" style="font-size: 16px; width: 16px; height: 16px;"></span> Copied!';
18 button.style.background = '#00a32a';
19 button.style.color = '#ffffff';
20 button.style.borderColor = '#00a32a';
21
22 setTimeout(function() {
23 button.innerHTML = originalText;
24 button.style.background = '';
25 button.style.color = '';
26 button.style.borderColor = '';
27 }, 2000);
28 }).catch(function(err) {
29 console.error('Failed to copy log:', err);
30 button.innerHTML = '<span class="dashicons dashicons-no" style="font-size: 16px; width: 16px; height: 16px;"></span> Failed';
31 button.style.background = '#dc3232';
32 button.style.color = '#ffffff';
33 button.style.borderColor = '#dc3232';
34
35 setTimeout(function() {
36 button.innerHTML = originalText;
37 button.style.background = '';
38 button.style.color = '';
39 button.style.borderColor = '';
40 }, 2000);
41 });
42 });
43 })();
44