diff --git a/src/equicordplugins/questify/index.tsx b/src/equicordplugins/questify/index.tsx index eb36c1520..e4c43088d 100644 --- a/src/equicordplugins/questify/index.tsx +++ b/src/equicordplugins/questify/index.tsx @@ -1559,6 +1559,10 @@ export default definePlugin({ } }, { + // MARK: TODO + // - Cleanup once Discord rolls out the new quest CTA refactor completely. + // - See new entry point in 2nd patch group below. + // // Sets intervals to progress Play Game Quests in the background and patches some common click handlers. find: "IN_PROGRESS:if(", group: true, @@ -1605,6 +1609,24 @@ export default definePlugin({ replace: "!$self.processQuestForAutoComplete(arguments[0])&&$1" } }, + { + // Adds support for dev://experiment/2025-12-quest-cta-refactor-rollout + find: '"sm",preClickCallback:', + replacement: [ + { + match: /(?=let{quest:)/, + replace: "const questifyText=$self.getQuestUnacceptedButtonText(arguments[0].quest);" + }, + { + match: /(?<="primary",onClick:\(\)=>{null==\i\|\|\i\(\),)/, + replace: "!$self.processQuestForAutoComplete(arguments[0].quest)&&" + }, + { + match: /(?<=,text:)(?=\i)/, + replace: "questifyText??" + } + ] + }, { // Sets intervals to progress Play Game Quests in the background. // Triggers if a Quest has already been started but was interrupted, such as by a reload.