Skip to content

Commit 9a8564c

Browse files
authored
Merge pull request #6 from keyxmakerx/claude/debug-cors-dashboard-Qi5wL
Claude/debug cors dashboard qi5w l
2 parents d4aae75 + e332ec9 commit 9a8564c

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

scripts/module.mjs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,12 +111,14 @@ Hooks.on('getSceneControlButtons', (controls) => {
111111
}],
112112
});
113113
} else {
114+
// v13 requires activeTool even for button-only controls, and does not
115+
// use the v12 `layer` property. See foundryvtt/foundryvtt#12803.
114116
controls['chronicle-sync'] = {
115117
name: 'chronicle-sync',
116118
title: 'Chronicle Sync',
117119
icon: 'fa-solid fa-rotate',
118-
layer: 'controls',
119120
visible: true,
121+
activeTool: 'dashboard',
120122
tools: {
121123
dashboard: {
122124
name: 'dashboard',

scripts/sync-dashboard.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1518,7 +1518,7 @@ export class SyncDashboard extends HandlebarsApplicationMixin(ApplicationV2) {
15181518
try {
15191519
const snapshot = this._buildDebugExport();
15201520
const text = '```json\n' + JSON.stringify(snapshot, null, 2) + '\n```';
1521-
await navigator.clipboard.writeText(text);
1521+
await game.clipboard.copyPlainText(text);
15221522

15231523
if (resultEl) {
15241524
resultEl.textContent = 'Copied to clipboard!';

0 commit comments

Comments
 (0)