From 139514bb5bb9b706120429aaadbe53d78046715f Mon Sep 17 00:00:00 2001 From: Mirco Wittrien Date: Thu, 27 Feb 2020 18:02:02 +0100 Subject: [PATCH] Update TopRoleEverywhere.plugin.js --- Plugins/TopRoleEverywhere/TopRoleEverywhere.plugin.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Plugins/TopRoleEverywhere/TopRoleEverywhere.plugin.js b/Plugins/TopRoleEverywhere/TopRoleEverywhere.plugin.js index 2cf7b3280e..2318b9fdc4 100644 --- a/Plugins/TopRoleEverywhere/TopRoleEverywhere.plugin.js +++ b/Plugins/TopRoleEverywhere/TopRoleEverywhere.plugin.js @@ -4,7 +4,7 @@ var TopRoleEverywhere = (_ => { return class TopRoleEverywhere { getName () {return "TopRoleEverywhere";} - getVersion () {return "2.9.6";} + getVersion () {return "2.9.7";} getAuthor () {return "DevilBro";} @@ -156,7 +156,8 @@ var TopRoleEverywhere = (_ => { processMessageHeader (e) { if (e.instance.props.message && BDFDB.DataUtils.get(this, "settings", "showInChat")) { - this.injectRoleTag(BDFDB.ReactUtils.getValue(e.returnvalue, "props.children.2.props.children"), e.instance.props.message.author, "chat", e.instance.props.compact ? BDFDB.disCN.messagebottagcompact : BDFDB.disCN.messagebottagcozy); + let [children, index] = BDFDB.ReactUtils.findChildren(e.returnvalue.props.children.slice(1), {name: "Popout"}); + if (index > -1) this.injectRoleTag(children, e.instance.props.message.author, "chat", e.instance.props.compact ? BDFDB.disCN.messagebottagcompact : BDFDB.disCN.messagebottagcozy); } }