Päivän tv-vinkit | Sodan jaloissa

Päivän tv-vinkit | Sodan jaloissa

[]
Päivän tv-vinkit | Sodan jaloissa | Uutissuomalainen | Aamuposti { if (!Hyphenopoly.hyphenators) { return } Hyphenopoly.hyphenators[”HTML”].then((hyphenator) => { for (const itemSelector in Hyphenopoly.setup.selectors) { const containerNode = document.querySelector(containerSelector) const itemNodeList = containerNode.querySelectorAll(itemSelector) itemNodeList.forEach((itemNode) => { hyphenator(itemNode, itemSelector) }) } }) } ]]> { if (!previewAdUnits.includes(key)) { delete gamAdUnits[key]; elementsToHide.push(key); } }); // hide deleted adslots window.addEventListener(’load’, (event) => { elementsToHide.forEach(key => { if (document.getElementById(adSlotPrefix+key) != null) { let elementParent = document.getElementById(adSlotPrefix+key).parentElement; if (elementParent != null) { elementParent.style.display = ”none”; } } }); }); } function getCookie(name) { name = name + ’=’; const decodedCookie = decodeURIComponent(document.cookie); const cookies = decodedCookie.split(’;’); for (let i = 0; i 0) { googletag.pubads().setTargeting(”CxSegments”, cXsegmentIds); } if (Array.isArray(topics)) { let topicsAndMarketingCategories = []; if (topics.length > 0) { topicsAndMarketingCategories = topicsAndMarketingCategories.concat(topics); } if (appendMarketingCategoriesToTopics && Array.isArray(marketingCategories) && marketingCategories.length > 0) { topicsAndMarketingCategories = topicsAndMarketingCategories.concat(marketingCategories); } if (topicsAndMarketingCategories.length > 0) { googletag.pubads().setTargeting(’aihe’, topicsAndMarketingCategories); } } if (Array.isArray(marketingCategories) && marketingCategories.length > 0) { googletag.pubads().setTargeting(’mainoskategoria’, marketingCategories); } if (Array.isArray(advertisers) && advertisers.length > 0) { googletag.pubads().setTargeting(’mainostaja’, advertisers); } if (brandSafety) { googletag.pubads().setTargeting(’brand_safety’, brandSafety); } if (brandSafetyScore) { googletag.pubads().setTargeting(’brand_safety_score’, brandSafetyScore); } if (articleid) { googletag.pubads().setTargeting(’articleid’, articleid); } if (isPreview) { googletag.pubads().setTargeting(’is_preview’, ”1”); googletag.pubads().setTargeting(”url_params”, ”test”); } // Set general ad settings if (enableLazyLoad == true) { googletag.pubads().enableLazyLoad({ fetchMarginPercent: fetchMarginPercent, renderMarginPercent: renderMarginPercent, mobileScaling: mobileScaling }); } if (collapseEmptyDivs == true) { googletag.pubads().collapseEmptyDivs(true); } if (disableInitialLoad == true) { googletag.pubads().disableInitialLoad(); } if (enableSRA == true) { googletag.pubads().enableSingleRequest(); }googletag.enableServices(); // Handle notification texts / hide empty ad slots googletag.pubads().addEventListener(’slotRenderEnded’, function(event) { if (event.slot && typeof event.slot.getSlotId === ’function’) { let slotId = event.slot.getSlotId(); if (slotId && typeof slotId.getDomId === ’function’) { let domId = slotId.getDomId(); if (domId && document.getElementById(domId)) { let element = document.getElementById(domId); let wrapper = element.parentElement; // Handle filled ad request if (!event.isEmpty) { let adSlotKey = domId.replace(adSlotPrefix, ”); let adUnit = gamAdUnits[adSlotKey]; let currentConf = null; let adLabels = false; if (adUnit) { if (pageType === ’article’) { currentConf = adUnit.article_config; } else if (pageType === ’section’) { currentConf = adUnit.section_config; } adLabels = currentConf.show_labels; // If paywall is shown to user, use paywall specific config if (pageType === ’article’ && !userHasPermission && typeof currentConf.paywall_config !== ’undefined’ && currentConf.paywall_config.show_labels !== ’undefined’ && !isPreview) { adLabels = currentConf.paywall_config.show_labels; } else if (isComicArticle == true && typeof currentConf.comic_config !== ’undefined’ && currentConf.comic_config.show_labels !== ’undefined’) { adLabels = currentConf.comic_config.show_labels; } } // Show labels if necessary if (adLabels) { var adNoticeTop = document.createElement(”div”); var adNoticeBottom = document.createElement(”div”); adNoticeTop.classList.add(”diks-display-ad__notice”, ”diks-display-ad__notice–before”); adNoticeBottom.classList.add(”diks-display-ad__notice”, ”diks-display-ad__notice–after”); let noticeTextTop = document.createTextNode(inContentAdTextTop); let noticeTextBottom = document.createTextNode(inContentAdTextBottom); adNoticeTop.appendChild(noticeTextTop); adNoticeBottom.appendChild(noticeTextBottom); if (element && wrapper) { // Render notification texts for a single ad element.classList.add(’diks-display-ad__unit–with-notices’); wrapper.insertBefore(adNoticeTop, wrapper.childNodes[0]); wrapper.insertBefore(adNoticeBottom, null); } } // Create a skip link if (adUnit && adUnit.type === ’normal’ && skipLinksEnabled && wrapper) { // Render render skip for a single ad let skipLinkStartElement = document.createElement(’a’); let skipLinkText = document.createTextNode(’Ohita mainos’); let skipLinkEndElement = document.createElement(’div’); let skipLinkEndElementId = ’diks-skip-link-’ + domId; skipLinkStartElement.appendChild(skipLinkText); skipLinkStartElement.classList.add(’diks-display-ad__skip-link’, ’diks-button’, ’diks-button–primary’, ’diks-a11y__screen-reader’, ’diks-a11y__screen-reader–focusable’); skipLinkStartElement.href = ’#’ + skipLinkEndElementId; skipLinkEndElement.id = skipLinkEndElementId; wrapper.insertBefore(skipLinkStartElement, wrapper.childNodes[0]); wrapper.insertBefore(skipLinkEndElement, null); } let iframe = document.querySelector(”#”+domId+” > [id^=google_ads_iframe_] > iframe”); if (iframe) { // This observer is to prevent additional whitespace (margins, paddings, etc). For example some video materials tend to do this. let observer = new MutationObserver(function(mutations) { mutations.forEach(function(mutation) { if (iframe.offsetHeight .diks-header-wrapper’).forEach(function(item) { if ( repositionNavOnly != true ) { document.body.style.paddingTop = item.offsetHeight + ’px’; } let mainNavigation = document.querySelector(’.diks-dropdown-navigation’); if (mainNavigation) { // Place main dropdown navigation mainNavigation.style.top = item.offsetHeight + ’px’; mainNavigation.style.paddingBottom = item.offsetHeight + 16 + ’px’; } }); } // Back button handling document.querySelectorAll(’a.js-diks-back-button’).forEach(function(item) { // Referrer supports new tab/window and provides visual cue. // Note: referrer isn’t always available (browser, tab, window, bookmark, privacy). if (typeof(document.referrer) === ’string’ && document.referrer.length > 0) { item.setAttribute(’href’, document.referrer); } // Overwrite link with history.go, as it also remembers scroll position if (history.length > 1) { var stepsToGoBack = -1; item.addEventListener(’click’, function(e) { e.preventDefault(); history.go(stepsToGoBack); }); } });(function() { function getCookie(name) { name = name + ’=’; const decodedCookie = decodeURIComponent(document.cookie); const cookies = decodedCookie.split(’;’); for (let i = 0; i < cookies.length; i++) { const cookie = cookies[i].trim(); if (cookie.indexOf(name) == 0) { return cookie.substring(name.length, cookie.length); } } } function injectSegmentTeasers(segmentsQueryString) { var xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { var segmentTeasers = this.responseText.trim(); if (segmentTeasers) { var container = document.getElementById("diks-segment-notes"); if (container) { container.innerHTML = segmentTeasers; } } } }; xhttp.open("GET", "/.ajax/segmentTeaser?" + segmentsQueryString, true); xhttp.send(); } var segmentsCookie = getCookie('jankkosegments'); if (segmentsCookie) { var segmentsData = JSON.parse(segmentsCookie); var segments = segmentsData.segments; if (segments && typeof segments === 'object') { var segmentsQueryString = ""; Object.keys(segments).forEach(function(key, index) { segmentsQueryString = index === 0 ? "" : segmentsQueryString + "&"; var value = segments[key]; if (Array.isArray(value)) { value = value.join(','); } segmentsQueryString = segmentsQueryString + key + "=" + value; }); injectSegmentTeasers(segmentsQueryString); } } })();(function () { if(typeof JankkoSSOClient !== 'undefined') { var stringToHTML = function (htmlString) { var div = document.createElement('div'); div.innerHTML = htmlString.trim(); return div.firstChild; }; var showUserRelatedItems = function(user) { var usernameElement = document.querySelector('#diks-sso-username'); var linksElement = document.querySelector('#diks-sso-links'); if (usernameElement) { usernameElement.innerHTML = user.first_name+' '+user.last_name; } if (linksElement) { var myAccountLink = stringToHTML('

  • Omat tiedot’); var logoutForm = stringToHTML(’
  • ’); linksElement.insertBefore(myAccountLink, linksElement.childNodes[0]); linksElement.appendChild(logoutForm); } var htmlElement = document.querySelector(’.diks-user–is-not-logged-in’); // Class is set to main html element if (htmlElement) { htmlElement.classList.replace(’diks-user–is-not-logged-in’, ’diks-user–is-logged-in’); } } var showMenuLinksForLoggedOutUser = function(data) { var linksElement = document.querySelector(’#diks-sso-links’); if (linksElement) { var loginLink = stringToHTML(’
  • Kirjaudu’); linksElement.insertBefore(loginLink, linksElement.childNodes[0]); } } var showCompanyUserRelatedItems = function(data) { var permissions = data.company_subscription.permissions; if (Array.isArray(permissions)) { if (permissions.includes(”paywall”) || permissions.includes(”replica”)) { var htmlElement = document.querySelector(’.diks-user–is-not-company-subscriber’); // Class is set to main html element if (htmlElement) { htmlElement.classList.replace(’diks-user–is-not-company-subscriber’, ’diks-user–is-company-subscriber’); } } } } document.addEventListener(”DOMContentLoaded”, function() { JankkoSSOClient.getSession().then(function(data) { if (data) { if (data.company_subscription) { showCompanyUserRelatedItems(data); } if (data.user) { showUserRelatedItems(data.user); } else { showMenuLinksForLoggedOutUser(); } } else { showMenuLinksForLoggedOutUser(); } }).catch(function(error) { showMenuLinksForLoggedOutUser(); }); }); } }()); // Function for closing main dropdown navigation function closeMainDropdownNavigation() { // Main dropdown navigation if (document.getElementById(’diks-dropdown-navigation’).classList.contains(’diks-dropdown-navigation–is-open’)) { // Close main dropdown nav just in case and toggle icon on main nav toggler document.getElementById(’diks-dropdown-navigation’).classList.remove(’diks-dropdown-navigation–is-open’); mainNavToggler = document.getElementById(’diks-dropdown-toggle’); mainNavToggler.classList.remove(’diks-dropdown-toggle–is-open’); // Toggle icon children = mainNavToggler.querySelectorAll(’.diks-icon’); if ( children.length > 1 ) { for (var j= 0; j 767) { var waypointHeader = new Waypoint({ element: headerElement, handler: function() { if (headerElement.classList.contains(”diks-header–narrow”)) { headerElement.classList.remove(”diks-header–narrow”); } else { headerElement.classList.add(”diks-header–narrow”); } // Reposition dropdown navigation setTimeout(function() { fixedHeaderPositioning(true); }, 500); }, offset: function() { return -this.element.clientHeight; } }); } } ]]>
  • Tähtikirkas yö. Yle Teema & Fem klo 21.10.

    Marko Ahonen

    4.5.2024 10:00

    Marko Ahonen

    Tähtikirkas yö

    Haluatko lukea koko jutun?

    Tilaa Aamuposti digi hurjaan tarjoushintaan!

    Tilaa 3 kk vain 3,90 €/kk

    • Aamuposti.fi-verkkopalvelun rajaton käyttöoikeus vuoden jokaisena päivänä
    • Näköislehti
    • Mobiilisovelluksen käyttöoikeus (iOS ja Android)
    • Lukuoikeus sinulle ja kolmelle perheenjäsenellesi

    { galleryImageLinks[0].focus(); }); }); ]]> { // Stash the event so it can be triggered later deferredPrompt = e; // Update the UI to notify the user they can install PWA pwaShowInstallationOption(); // Handle installation document.querySelectorAll(’.js-diks-apps-pwa-installation-button’).forEach(function(button) { button.addEventListener(’click’, (e) => { // Show the prompt deferredPrompt.prompt(); // Wait for user to respond deferredPrompt.userChoice.then((choiceResult) => { if (choiceResult.outcome === ’accepted’) { console.log(’PWA: Installed (prompt)’); dataLayer.push({ ’event’: ’PWA.installation’, ’eventData’: ’success’ }); } else { console.log(’PWA: User dismissed installation prompt’); dataLayer.push({ ’event’: ’PWA.installation’, ’eventData’: ’canceled’ }); } deferredPrompt = null; }); }); }); }); // iOS installation process (show instructions modal) if (!navigator.standalone) { var userAgent = navigator.userAgent.toLowerCase(); var iPhoneUser = (/iphone/.test(userAgent)); var iPadUser = (/ipad/.test(userAgent) || (/macintosh/.test(userAgent) && navigator.maxTouchPoints > 1)); var safariUser = (/^(?!.*(brave|chrome|crios|duckduckgo|edgeios|firefox|fxios|opios|ucbrowser|yabrowser)).*safari.*$/.test(userAgent)); if (safariUser && (iPhoneUser || iPadUser)) { // Update the UI to notify the user they can install PWA pwaShowInstallationOption(); // Instructions var modals = document.querySelectorAll(’.js-diks-apps-pwa-ios-instructions’).forEach(function(element) { // Position on screen based on device if (iPhoneUser) { element.classList.add(’diks-apps__pwa-ios-modal–bottom’); } else if (iPadUser) { element.classList.add(’diks-apps__pwa-ios-modal–top’); } }); // Handle modal instructions from installation button document.querySelectorAll(’.js-diks-apps-pwa-installation-button’).forEach(function(button) { button.addEventListener(’click’, (e) => { // Show first modal document.querySelector(’.js-diks-apps-pwa-ios-instructions’).classList.toggle(’diks-apps__pwa-ios-modal–is-visible’); dataLayer.push({ ’event’: ’PWA.instructions.shown’, ’eventData’: ’iOS’ }); }); }); } } ]]>

    Lähde

    Vastaa

    Sähköpostiosoitettasi ei julkaista. Pakolliset kentät on merkitty *