var currentScript = document.currentScript || (function() { var scripts = document.getElementsByTagName('script'); return scripts[scripts.length - 1]; })(); (function() { window.TRINITY_PLAYER = window.TRINITY_PLAYER || { isLegacyBrowser: true, options: { isTrinityEnabled: true, campaignId: '2601060359', parser_s: 'nodefiltered', parser_params: ["inlineComponent","AdNativeInline","imageCredit","clicktozoom","EmbeddedTweet-tweetContainer"], trinityGAAccountId: '', gaAccountId: '', partnerName: '', paramsObject: {}, FAB_config: {}, multipleArticlesAlg: '', GDPR: '', GDPR_CONSENT: '', documentLoadType: 'DOMContentLoaded', documentLoadTypeSelector: '' }, config: { injectorScript: 'https://vd.trinitymedia.ai/js/sas/20191024_f1f4c4a09cd08c98f1617d37736519b168965ca7/wbk/trinity_inject_script-legacy.js' } }; const playerId = currentScript.dataset.playerId || '890d9899a25c892bad4253e67f9c9a3f' currentScript.setAttribute('data-player-id', playerId); // set dynamically generated ID window.TRINITY_PLAYER.players = window.TRINITY_PLAYER.players || {}; window.TRINITY_PLAYER.players[playerId] = { abtest: '', language: '', textSelector: 'h1.headline,h1.postTitle,#storyBody>p,.postBody', imageSelector: '', activateFAB: false, state: 'not-started' }; /* NOTE: This script doesn't transpiled. Please use ES5 code here */ window.TRINITY_PLAYER.injectScript = function(playerId) { function run() { if (document.body) { if (!document.getElementById('trinity-audio-js')) { const js = document.createElement('script'); js.type = 'text/javascript'; js.src = window.TRINITY_PLAYER.config.injectorScript; js.id = 'trinity-audio-js'; js.addEventListener('load', function() { window.TRINITY_PLAYER.api.createPlayer(playerId); }); document.body.appendChild(js); } else { if (window.TRINITY_PLAYER.isLoaded) { window.TRINITY_PLAYER.api.createPlayer(playerId); } else { document.getElementById('trinity-audio-js').addEventListener('load', function() { window.TRINITY_PLAYER.api.createPlayer(playerId); }); } } } } run(); document.addEventListener('DOMContentLoaded', run); }; window.TRINITY_PLAYER.injectScript(playerId); })();