Improve patch for sponsor banner. (#541)
This commit is contained in:
parent
4f23a0449e
commit
09a9ebd409
1 changed files with 12 additions and 5 deletions
|
|
@ -967,11 +967,18 @@ export default definePlugin({
|
|||
},
|
||||
{
|
||||
// Hides the sponsored banner on the Quests page.
|
||||
find: "assetSponsorImage.url,",
|
||||
replacement: {
|
||||
match: /(?<=campaignId]\),)/,
|
||||
replace: "$self.shouldHideSponsoredQuestBanner()?null:"
|
||||
}
|
||||
find: "{isInDiscoverQuestHomeTab:",
|
||||
group: true,
|
||||
replacement: [
|
||||
{
|
||||
match: /(?<=resetSortingFiltering\(\)},\[\]\);)/,
|
||||
replace: "const shouldHideSponsoredQuestBanner=$self.shouldHideSponsoredQuestBanner();"
|
||||
},
|
||||
{
|
||||
match: /(?<=if\(null!=\i\))return(.{0,60}?}\))/,
|
||||
replace: "if(!shouldHideSponsoredQuestBanner)return $1"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
// Hides the Quest icon from members list items when
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue