From 742893e023d43e7c656d1c1afc77b212e3e1e693 Mon Sep 17 00:00:00 2001 From: Demetrios Skamiotis Date: Tue, 24 Sep 2024 10:26:44 +0100 Subject: [PATCH] remove fabric third party legacy template --- legacy/src/fabric-third-party/test.json | 6 ---- legacy/src/fabric-third-party/web/ad.json | 3 -- legacy/src/fabric-third-party/web/index.html | 10 ------ legacy/src/fabric-third-party/web/index.js | 34 -------------------- legacy/src/fabric-third-party/web/index.scss | 12 ------- 5 files changed, 65 deletions(-) delete mode 100644 legacy/src/fabric-third-party/test.json delete mode 100644 legacy/src/fabric-third-party/web/ad.json delete mode 100644 legacy/src/fabric-third-party/web/index.html delete mode 100644 legacy/src/fabric-third-party/web/index.js delete mode 100644 legacy/src/fabric-third-party/web/index.scss diff --git a/legacy/src/fabric-third-party/test.json b/legacy/src/fabric-third-party/test.json deleted file mode 100644 index 83ca9d3b..00000000 --- a/legacy/src/fabric-third-party/test.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "ThirdPartyTag": "https://adops-assets.s3.amazonaws.com/dap-customs/RunofSoccerSportsScienceArts-TOPRESPONSIVE.html", - "TrackingPixel": "https://gu.com/tracking-pixel.gif", - "ResearchPixel": "https://gu.com/research-pixel.gif", - "ViewabilityTracker": "" -} diff --git a/legacy/src/fabric-third-party/web/ad.json b/legacy/src/fabric-third-party/web/ad.json deleted file mode 100644 index 51f83936..00000000 --- a/legacy/src/fabric-third-party/web/ad.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "nativeStyleId": "182591" -} diff --git a/legacy/src/fabric-third-party/web/index.html b/legacy/src/fabric-third-party/web/index.html deleted file mode 100644 index 8af84806..00000000 --- a/legacy/src/fabric-third-party/web/index.html +++ /dev/null @@ -1,10 +0,0 @@ -
- - - - - - - - -
diff --git a/legacy/src/fabric-third-party/web/index.js b/legacy/src/fabric-third-party/web/index.js deleted file mode 100644 index 7d7e1e0b..00000000 --- a/legacy/src/fabric-third-party/web/index.js +++ /dev/null @@ -1,34 +0,0 @@ -//@flow -import { getIframeId, resizeIframeHeight, getWebfonts } from '../../_shared/js/messages'; -import { write } from '../../_shared/js/dom'; - -const ifThenPromise = (parameter, action) => { - if (parameter === 'true') { - return action(); - } else { - return Promise.resolve(); - } -} - -const fetchTag = (tagUrl: string) => { - return fetch(tagUrl) - .then(response => response.text()); -} - -const generateTag = () => { - return fetchTag(`[%ThirdPartyTag%]`); -} - -const insertTag = (tag) => { - const placeholder = document.getElementById('js-fabric-custom-third-party'); - const range = document.createRange(); - range.setStart(placeholder, 0); - range.setEnd(placeholder, 0); - placeholder.appendChild(range.createContextualFragment(tag)); -}; - -getIframeId() -.then(() => getWebfonts()) -.then(() => generateTag()) -.then(tag => insertTag(tag)) -.then(() => resizeIframeHeight()); diff --git a/legacy/src/fabric-third-party/web/index.scss b/legacy/src/fabric-third-party/web/index.scss deleted file mode 100644 index c4c11411..00000000 --- a/legacy/src/fabric-third-party/web/index.scss +++ /dev/null @@ -1,12 +0,0 @@ -@import '_core'; - -.creative--third-party-video { - margin: auto; - max-width: $creative-max-width; - padding: inherit; - object-fit: cover; - - .creative__link { - height: 250px; - } - }