Skip to content

Commit

Permalink
Fix item name parsing that prevents rolling attacks
Browse files Browse the repository at this point in the history
Fix by @dmportella

Fixes #1174, fixes #1176 and closes #1175
  • Loading branch information
kakaroto committed Oct 11, 2024
1 parent 63f12be commit e96776e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/dndbeyond/content-scripts/character.js
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,7 @@ async function rollItem(force_display = false, force_to_hit_only = false, force_
const properties = propertyListToDict(prop_list);
properties["Properties"] = properties["Properties"] || "";
//console.log("Properties are : " + String(properties));
const item_name = $(".ct-item-pane .ct-sidebar__heading .ct-item-name,.ct-item-pane .ct-sidebar__heading .ddbc-item-name")[0].firstChild.textContent;
const item_name = $(".ct-item-pane .ct-sidebar__heading .ct-item-name,.ct-item-pane .ct-sidebar__heading .ddbc-item-name, .ct-item-pane .ct-sidebar__heading span[class*='styles_itemName']")[0].firstChild.textContent;
const item_type = $(".ct-item-detail__intro").text();
const item_tags = $(".ct-item-detail__tags-list .ct-item-detail__tag").toArray().map(elem => elem.textContent);
const item_customizations = $(".ct-item-pane .ct-item-detail__class-customize-item .ddbc-checkbox--is-enabled .ddbc-checkbox__label").toArray().map(e => e.textContent);
Expand Down

0 comments on commit e96776e

Please sign in to comment.