From aa2a07df1e5b2f5b207949c676f720204cd26e04 Mon Sep 17 00:00:00 2001 From: Inokentii Mazhara Date: Tue, 20 Feb 2024 15:55:48 +0200 Subject: [PATCH] TW-1290 Add one more property for non-permanent ads places --- src/advertising/slise.ts | 1 + src/routers/slise-ad-rules/ad-places.ts | 4 ++++ src/utils/schemas.ts | 3 ++- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/advertising/slise.ts b/src/advertising/slise.ts index c7f9d7e..d94b614 100644 --- a/src/advertising/slise.ts +++ b/src/advertising/slise.ts @@ -88,6 +88,7 @@ export interface SliseAdPlacesRule { divWrapperStyle?: Record; }; stylesOverrides?: SliseAdStylesOverrides[]; + shouldHideOriginal?: boolean; } export interface PermanentSliseAdPlacesRule { diff --git a/src/routers/slise-ad-rules/ad-places.ts b/src/routers/slise-ad-rules/ad-places.ts index b4c1fb0..c3803b8 100644 --- a/src/routers/slise-ad-rules/ad-places.ts +++ b/src/routers/slise-ad-rules/ad-places.ts @@ -82,6 +82,10 @@ import { * type: array * items: * $ref: '#/components/schemas/SliseAdStylesOverrides' + * shouldHideOriginal: + * type: boolean + * description: Whether original ads banners should be hidden but not removed + * default: false * example: * urlRegexes: * - '^https://goerli\.etherscan\.io/?$' diff --git a/src/utils/schemas.ts b/src/utils/schemas.ts index 4157e32..d8bff7e 100644 --- a/src/utils/schemas.ts +++ b/src/utils/schemas.ts @@ -115,7 +115,8 @@ const sliseAdPlacesRulesSchema = arraySchema() divWrapperStyle: styleSchema }) .required(), - stylesOverrides: arraySchema().of(sliseAdStylesOverridesSchema.clone().required()) + stylesOverrides: arraySchema().of(sliseAdStylesOverridesSchema.clone().required()), + shouldHideOriginal: booleanSchema().default(false) }) .required() )