gutenberg
3 years ago
account.js
1 year ago
consent-mapping.js
1 year ago
cookiebot-admin-script.js
1 year ago
dashboard.js
1 year ago
debug-page.js
1 year ago
jquery.tipTip.js
3 years ago
multiple-page.js
3 years ago
network-settings-page.js
1 year ago
prior-consent-settings.js
3 years ago
settings-page.js
1 year ago
support-page.js
3 years ago
debug-page.js
40 lines
| 1 | function copyDebugInfo() { |
| 2 | const t = document.getElementById( 'cookiebot-debug-info' ) |
| 3 | t.select() |
| 4 | t.setSelectionRange( 0, 99999 ) |
| 5 | document.execCommand( 'copy' ) |
| 6 | } |
| 7 | |
| 8 | async function clearConfigData() { |
| 9 | try { |
| 10 | let formData = new FormData(); |
| 11 | formData.append('action', 'cookiebot_clear_config_data'); |
| 12 | |
| 13 | const response = await fetch('admin-ajax.php', { |
| 14 | method: 'POST', |
| 15 | body: formData |
| 16 | }); |
| 17 | console.log(`clear config data response:`, response); |
| 18 | window.location.href = 'admin.php?page=cookiebot'; |
| 19 | |
| 20 | } catch (error) { |
| 21 | console.error(`Failed to clear config data:`, error); |
| 22 | } |
| 23 | } |
| 24 | |
| 25 | async function clearConfigDataKeepCbid() { |
| 26 | try { |
| 27 | let formData = new FormData(); |
| 28 | formData.append('action', 'cookiebot_clear_config_data_keep_cbid'); |
| 29 | |
| 30 | const response = await fetch('admin-ajax.php', { |
| 31 | method: 'POST', |
| 32 | body: formData |
| 33 | }); |
| 34 | console.log(`clear config data response:`, response); |
| 35 | window.location.href = 'admin.php?page=cookiebot'; |
| 36 | |
| 37 | } catch (error) { |
| 38 | console.error(`Failed to clear config data:`, error); |
| 39 | } |
| 40 | } |