use production script for odysee

This commit is contained in:
Anthony 2021-12-14 19:20:44 +01:00 committed by Thomas Zarebczan
parent aef8e2eba7
commit d675d3234c
2 changed files with 8 additions and 4 deletions

View file

@ -374,10 +374,17 @@ function App(props: Props) {
return;
}
// $FlowFixMe
const useProductionOneTrust = process.env.NODE_ENV === 'production' && location.hostname === 'odysee.com';
const script = document.createElement('script');
script.src = oneTrustScriptSrc;
script.setAttribute('charset', 'UTF-8');
script.setAttribute('data-domain-script', 'af95e703-a783-4d6d-af3d-94365fdb3cbd-test');
if (useProductionOneTrust) {
script.setAttribute('data-domain-script', '8a792d84-50a5-4b69-b080-6954ad4d4606-test');
} else {
script.setAttribute('data-domain-script', '8a792d84-50a5-4b69-b080-6954ad4d4606-test');
}
const secondScript = document.createElement('script');
// OneTrust asks to add this

View file

@ -37,9 +37,6 @@ export default function Footer() {
<li className="footer__link" id="gdprPrivacyFooter">
<Button label={__('Cookie Settings')} onClick={() => window.Optanon && window.Optanon.ToggleInfoDisplay()} />
</li>
{/* /!* OneTrust Cookies Settings button start *!/*/}
{/* <button id="ot-sdk-btn" className="ot-sdk-show-settings">Cookie Settings</button>*/}
{/* /!* OneTrust Cookies Settings button end *!/*/}
</ul>
</footer>
);