Questify: 2025-12-quest-cta-refactor-rollout support. (#704)

* 2025-12-quest-cta-refactor-rollout support.

* Fix.
This commit is contained in:
Etorix 2026-01-29 06:12:25 -08:00 • committed by GitHub
parent a75e58da4b
commit dde777e7cd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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.