diff --git a/lang/en.json b/lang/en.json index 9a5b3f836..bc8ab0be8 100755 --- a/lang/en.json +++ b/lang/en.json @@ -120,6 +120,8 @@ "show-image-to-players.hint": "In journals provide hover-over button to show image to players? (Reload required)", "show-read-alouds-button.name": "Show the show read aloud to players button?", "show-read-alouds-button.hint": "In journals provide hover-over button to show the read aloud to players? (Reload required)", + "show-read-alouds-all-content.name": "Enable read aloud for all content?", + "show-read-alouds-all-content.hint": "Show the read aloud to player button in content not imported by DDB Importer as well. (Reload required)", "dynamic-sync": { "dynamic-sync": "Enable Dynamic Sync?", "dynamic-sync-policy-currency": "Currency?", diff --git a/src/hooks.js b/src/hooks.js index df5943628..76d714998 100755 --- a/src/hooks.js +++ b/src/hooks.js @@ -98,10 +98,16 @@ export function renderItemSheet(sheet, html) { } export function renderJournalSheet(sheet, html, data) { - if (data.cssClass !== "editable" && sheet.document.flags?.ddb) { - linkTables("journal", html); - linkImages(html, data); - showReadAlouds(html, data); + if (data.cssClass !== "editable") { + if (sheet.document.flags?.ddb) { + linkTables("journal", html); + linkImages(html, data); + } + + const enableReadAloudsForAllContent = game.settings.get("ddb-importer", "show-read-alouds-all-content"); + if (sheet.document.flags?.ddb || enableReadAloudsForAllContent) { + showReadAlouds(html, data); + } } adventureFlags(sheet, html, data); } diff --git a/src/settings.js b/src/settings.js index 8fa8754dd..5ffc9396f 100644 --- a/src/settings.js +++ b/src/settings.js @@ -610,6 +610,13 @@ const SETTINGS = { type: Boolean, default: true, }, + "show-read-alouds-all-content": { + name: "ddb-importer.settings.show-read-alouds-all-content.name", + hint: "ddb-importer.settings.show-read-alouds-all-content.hint", + config: true, + type: Boolean, + default: false, + }, }, PERMISSIONS: { "restrict-to-trusted": {