oops was only looking at the active tab on Tidy Sheet

release
Zoltan the DM 2023-02-09 21:52:52 -08:00
parent 9a5e6a7d27
commit b5f82115bb
1 changed files with 6 additions and 5 deletions

View File

@ -1909,10 +1909,10 @@ class CompendiumBrowser extends Application {
static async addTidySheetButton(cb, html, actor){ static async addTidySheetButton(cb, html, actor){
html.find('.spell-browser-btn').remove() await html.find('.spell-browser-btn').remove();
let tabBar = html.find("div.tab.spellbook.active .spellcasting-ability") let tabBar = html.find("div.tab.spellbook .spellcasting-ability")
console.log(tabBar) // console.log(tabBar)
const cbButton = $(`<div style="max-width:40px;min-width:32px;"><button class="compendium-browser spell-browser-btn"><i class="fa-duotone fa-book"></i></button></div>`); const cbButton = $(`<div style="max-width:40px;min-width:32px;"><button class="compendium-browser spell-browser-btn"><i class="fa-duotone fa-book"></i></button></div>`);
tabBar.append(cbButton) tabBar.append(cbButton)
@ -1920,9 +1920,10 @@ class CompendiumBrowser extends Application {
CompendiumBrowser.addSpellsButton(cbButton, actor.actor) CompendiumBrowser.addSpellsButton(cbButton, actor.actor)
} }
static addDefaultSheetButton(cb, html, actor){ static async addDefaultSheetButton(cb, html, actor){
await html.find('.spell-browser-btn').remove();
html.find('.spell-browser-btn').remove()
let tabBar = html.find("div.spellbook-filters") let tabBar = html.find("div.spellbook-filters")
// console.log(tabBar) // console.log(tabBar)
const cbButton = $(`<div style="max-width:40px;min-width:32px;"><button class="compendium-browser spell-browser-btn"><i class="fa-duotone fa-book"></i></button></div>`); const cbButton = $(`<div style="max-width:40px;min-width:32px;"><button class="compendium-browser spell-browser-btn"><i class="fa-duotone fa-book"></i></button></div>`);