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/20191010_5163bbad6a8ba39431151672ad98bf13bf769a22/wbk/trinity_inject_script-legacy.js' } }; const playerId = currentScript.dataset.playerId || '44265807626ba953cf83008d656d601a' 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', 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); })();