let getPermalinkFromURL = (url) => { return url.substring(url.indexOf('/programs/') + 10).split('?')[0] } let renderQuizLink = (tabsContainer) => { let programUrl = getPermalinkFromURL(location.href); axios.get(`/api/contents/${programUrl}`).then(function (response) { let program = response.data let videoLink = null; if (program.tags.length) { program.tags.forEach(tag => { if (tag.split('|')[0].trim().toLowerCase() === 'zoom') { videoLink = tag.split('|')[1].trim() } }) } if (videoLink) { let zoomIcon = '' let markup = `${zoomIcon} Join Zoom` tabsContainer.insertAdjacentHTML('beforeend', markup) } }) } let detectProgramPage = () => { let commentsBuutton = document.querySelector('button[data-test="tab-nav-comments"]:not(.touched)') if (commentsBuutton) { commentsBuutton.click() commentsBuutton.classList.add('touched') } let nothingText = document.querySelector('.search .container.items-grid') if (nothingText) { if (nothingText.innerText.trim() === 'Nothing was found.') { nothingText.innerText = "New content coming soon!" } } if (location.href.includes('/programs/')) { let getAccessNowButton = document.querySelector('a[data-test="button-access"]:not(.touched)') if (getAccessNowButton) { let markup = '

Unlock this video (and 40+ others) with a $7 montly donation. Cancel anytime.

' getAccessNowButton.classList.add('touched') getAccessNowButton.insertAdjacentHTML('afterEnd', markup) } let tabsContainer = document.querySelector('.cbt-action-bar') if (tabsContainer) { if (!tabsContainer.classList.value.includes('touched')) { let programUrl = getPermalinkFromURL(location.href); axios.get(`/api/contents/${programUrl}/access`).then(function (response) { let access = response.data if (access.result) { let askQuestionMarkup = ` Ask a question ` tabsContainer.insertAdjacentHTML('afterBegin', askQuestionMarkup) renderQuizLink(tabsContainer) } else { let playerButtons = document.querySelector('.cbt-action-bar > div:nth-of-type(1):not(.touched)') let playerTopContainer = document.querySelector('.container.cbt-program > div:nth-of-type(1):not(.touched)') if (playerButtons && playerTopContainer) { let programUrl = getPermalinkFromURL(location.href); axios.get(`/api/contents/${programUrl}`).then(function (response) { let program = response.data; let markup = `Become a member` let markup2 = `Upgrade to member to unlock full series` playerTopContainer.insertAdjacentHTML('beforeEnd', markup2) playerButtons.insertAdjacentHTML('beforeEnd', markup) }) playerButtons.classList.add('touched') playerTopContainer.classList.add('touched') } } }) tabsContainer.classList.add('touched') } } } setTimeout(() => detectProgramPage(), 500) } detectProgramPage()

Enter your email address for instant access to the video

* indicates required