This commit is contained in:
Zack Rauen 2020-02-10 22:14:39 -05:00
parent adb42b5be5
commit 5f565505b4
2 changed files with 6 additions and 2 deletions

View File

@ -476,13 +476,17 @@ Core.prototype.injectColoredText = function() {
this.cancelColoredText = Utils.monkeyPatch(BDV2.MessageComponent, "default", {before: (data) => {
const props = data.methodArguments[0];
const messageContent = props.childrenMessageContent;
const roleColor = settingsCookie["bda-gs-7"] ? messageContent.props.message.colorString || "" : "";
const originalType = messageContent.type.type;
if (originalType.__originalMethod) return; // Don't patch again
messageContent.type.type = function(props) {
const returnValue = originalType(props);
const roleColor = settingsCookie["bda-gs-7"] ? props.message.colorString || "" : "";
returnValue.props.style = {color: roleColor};
return returnValue;
};
messageContent.type.type.__originalMethod = originalType;
}});
};

2
js/main.min.js vendored

File diff suppressed because one or more lines are too long