Questify: 2025-12-quest-cta-refactor-rollout support. (#704)
* 2025-12-quest-cta-refactor-rollout support. * Fix.
This commit is contained in:
parent
a75e58da4b
commit
dde777e7cd
1 changed files with 22 additions and 0 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue