Start AdSense Auto Ads Tanglaw Daily
Section

News

← Tanglaw Daily

Latest

Latest

Recommended
<script src="https://player.gliacloud.com/player/Tanglaw Daily_desktop" data-media-query="(min-width: 601px)" async="" type="text/javascript"></script>
<script src="https://player.gliacloud.com/player/Tanglaw Daily_mobile" data-media-query="(max-width: 600px)" async="" type="text/javascript"></script>
COLUMNISTS
Inside Tanglaw Daily
2 days ago
2 hours ago
12 hours ago
2 hours ago
3 hours ago
12 hours ago
22 minutes ago
59 minutes ago
47 minutes ago
1 hour ago
Are you sure you want to log out?
X
Login

Tanglaw Daily is one of the most vibrant, opinionated, discerning communities of readers on cyberspace. With your meaningful insights, help shape the stories that can shape the country. Sign up now!

Get Updated:

Signup for the News Round now

FORGOT PASSWORD?
SIGN IN
or sign in with
<script type="text/javascript"> function check_credentials(info) { if (signup_click_nl) { sign_up_now(info.email); close_newsletter_signup(info.email); } else { console.log("no signup email just login", info); var xhr = new XMLHttpRequest(); xhr.open('POST', 'https://www.Tanglaw Daily/check_credentials.php'); xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); xhr.onload = function() { if (xhr.status >= 200 && xhr.status < 300) { var oauthInfo = xhr.responseText; console.log(oauthInfo); console.log("no signup email just login"); location.reload(); } else { console.error("Authentication check failed:", xhr.statusText); } }; xhr.onerror = function() { console.error("Network error during credential check."); }; var family_name = info.family_name ? info.family_name : ''; // Safely construct URL parameters using URLSearchParams var params = new URLSearchParams({ id: info.sub || '', email: info.email || '', firstname: info.given_name || '', lastname: family_name, loginType: 'gmail', picture: info.picture || '' }); xhr.send(params.toString()); } } window.handleCredentialResponse = (response) => { // decodeJwtResponse() is a custom function defined by you // to decode the credential response. console.log(response); responsePayload = decodeJwtResponse(response.credential); check_credentials(responsePayload); console.log(responsePayload); } </script>
<script type="text/javascript"> /** * This function will initialize the `AppleID.auth` object with parameter we pass in. */ AppleID.auth.init({ clientId : 'com.Tanglaw Daily.myaccount', scope : 'name email', redirectURI : 'https://www.Tanglaw Daily/redirect-apple-signin.php', state : 'https://www.Tanglaw Daily/', usePopup : true }); function decodeJwtResponse(token) { let base64Url = token.split('.')[1] let base64 = base64Url.replace(/-/g, '+').replace(/_/g, '/'); let jsonPayload = decodeURIComponent(atob(base64).split('').map(function(c) { return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2); }).join('')); return JSON.parse(jsonPayload) } // Listen for authorization success. document.addEventListener('AppleIDSignInOnSuccess', (event) => { if (signup_click_nl){ payLoadToken = decodeJwtResponse(event.detail.authorization.id_token) // console.log(event.detail.authorization.id_token); // console.log("payLoadToken", payLoadToken); document.getElementById("newsletter-signup-form_email").value = payLoadToken.email; sign_up_now(payLoadToken.email); close_newsletter_signup(payLoadToken.email); }else{ // Handle successful response. // console.log('AppleIDSignInOnSuccess', event.detail); var xmlhttp = new XMLHttpRequest(); xmlhttp.open("POST", 'https://www.Tanglaw Daily/check_credentials.php', true); xmlhttp.onreadystatechange = function () { if (xmlhttp.readyState === XMLHttpRequest.DONE && xmlhttp.status === 200) { var data = xmlhttp.responseText; // console.log('apple output:', data); location.reload(); } }; xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); xmlhttp.send('code=' + event.detail.authorization.code+'&id=' + event.detail.authorization.id_token + "&email=''&firstname=''&lastname=''"+ "&loginType=apple"); } }); // Listen for authorization failures. document.addEventListener('AppleIDSignInOnFailure', (event) => { // Handle error. console.log('AppleIDSignInOnFailure', event.detail.error); }); </script>
<script type="text/javascript"> // This sample demonstrates how to initialize the library // and render the sign-in button with JavaScript. window.onload = function () { const result = ms.auth.initialize({ client_id: "bec057d2-e821-43ca-b14d-310225b775e5", callback: userAuthenticated, login_uri: 'https://www.Tanglaw Daily/', cancel_on_tap_outside: false }); if (result.result !== "success") { console.error("ms.auth.initialize failed: ", result); } else { ms.auth.renderSignInButton( document.getElementById("sign-in-button-msso"), { type: "icon", theme: "dark", text: "signin", } ); } }; function userAuthenticated(signInAccountInfo, errorInfo) { console.log("signInAccountInfo", signInAccountInfo); // console.log("id", signInAccountInfo.id); // console.log("email", signInAccountInfo.email); // console.log("firstname", signInAccountInfo.givenName); // console.log("lastname", signInAccountInfo.surname); // check_credentials(info); if (signup_click_nl){ sign_up_now(signInAccountInfo.email); close_newsletter_signup(signInAccountInfo.email); }else{ var xhr = new XMLHttpRequest(); xhr.open('POST', 'https://www.Tanglaw Daily/check_credentials.php'); xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); xhr.onload = function() { oauthInfo = xhr.responseText; console.log("no signup email just login"); location.reload(); }; xhr.send("id=" + signInAccountInfo.id + "&email=" + signInAccountInfo.email + "&firstname=" + signInAccountInfo.givenName + "&lastname=" + signInAccountInfo.surname + "&loginType=microsoft"); } if (!signInAccountInfo) { console.log("Sign in failed with error: ", errorInfo); return; } } </script>
<script type="text/javascript" src="https://www.Tanglaw Daily/js/jquery-ui.min.js"></script> <script type="text/javascript" src="https://www.Tanglaw Daily/js/jquery.history.js"></script> <script type="text/javascript" src="https://www.Tanglaw Daily/js/java.min.js"></script> <script type="text/javascript"> (function() { /* Burger Menu */ nav_pub = document.querySelector("#nav_publications"); burger_menu = document.getElementById("header_burger"); top_navig = document.getElementById("top-navig"); // thisUrl = window.location.pathname; // console.log("url_last segment" + thisUrl.substring(thisUrl.lastIndexOf('/') + 1)); burger_menu.addEventListener("click", function(event) { this.classList.toggle("burger_active"); nav_pub.style.top = document.getElementById("nav_container").offsetHeight + "px"; nav_pub.classList.add("animate__animated"); nav_pub.classList.add("animate__slideInLeft"); if (!this.classList.contains("burger_active")) nav_pub.classList.add("animate__slideOutLeft"); else nav_pub.classList.remove("animate__slideOutLeft"); }); function detectwinWidth() { if (window.innerWidth >= 768) nav_pub.classList.add("desktop-nav"); else { nav_pub.classList.remove("desktop-nav"); nav_pub.classList.add("expand-scroll"); } } detectwinWidth(); $(window).resize(function() { detectwinWidth(); }); var subSecs = document.querySelectorAll(".sub-secs"); var mobnav = document.querySelectorAll(".mobile-navig"); subSecs.forEach((el, index) => el.addEventListener("click", event => { pmn = el.parentNode.querySelector(".mobile-navig"); pnav = document.getElementById("nav_publications"); console.log(index); if (!pnav.classList.contains("desktop-nav")) { pmn.classList.toggle("expand"); el.querySelector(".arrow-right").classList.toggle('arrow-down'); pnav.classList.add("expand-scroll"); // detect expand scroll r = true; for (i = 0; i < mobnav.length; i++) { if (mobnav[i].classList.contains("expand")) { r = false; break; } } if (r == true) pnav.classList.remove("expand-scroll"); } else { for (i = 0; i < mobnav.length; i++) { if (i == index) { pmn.classList.toggle("expand"); subSecs[index].classList.toggle("active"); } else { mobnav[i].classList.remove("expand"); subSecs[i].classList.remove("active"); } } } return false; })); var arrowLb = document.querySelectorAll(".arrow-lb"), navig_subnav = document.querySelector(".mobile-navig_subnav"); subnav_close = document.querySelector(".subnav_close"); console.log(arrowLb); arrowLb.forEach((el, index) => el.addEventListener("click", event => { top_navig.style.display = "none"; myID = el.getAttribute('id'); navig_subnav.classList.add("open"); // console.log(myID); return false; })); subnav_close.addEventListener("click", function(event) { top_navig.style.display = "block"; navig_subnav.classList.remove("open"); }); /* contrib button in subnav */ // let liContrib = document.createElement("li"); html = '<a class="contrib-button__nav" href="/support-our-work">SUPPORT Tanglaw Daily</a>'; // liContrib.innerHTML = html; let liContrib2 = document.createElement("li"); liContrib2.innerHTML = html; // document.getElementById("top-navig").appendChild(liContrib); document.getElementById("main-navig").appendChild(liContrib2); //adjust leaderboardtop margin document.getElementById("skin_holder").style.marginTop = document.getElementById("header").offsetHeight + "px"; })(); </script> <script type="text/javascript"> startApp(); var tutorial; $(function() { // let images = document.querySelectorAll("img.lazy"); // lazyload(images); // $("img.lazy").lazyload({ // effect : "fadeIn", // failure_limit : 40, // threshold: 100 // }); $(window).unload(function(e) { $.post("https://www.Tanglaw Daily/unload.php", "start=1792384600&page=&os=Linux&browser=Chrome"); }); $(window).resize(function() { // if ($(".mobile_only").css('display') == "none" && $(".tutorial-mobile").css({display: "block"})) { // $(".tutorial-regular").css({display: 'inline-block'}); // $(".tutorial-mobile").hide(); // } // else if ($(".mobile_only").css('display') == "block" && $(".tutorial-regular").css({display: "block"})) { // $(".tutorial-regular").hide(); // $(".tutorial-mobile").css({display: 'inline-block'}); // } }); console.log("session: 0"); console.log("tracking: 1, 10.10.10.3"); }); </script> <script type="text/javascript"> (function ($) { var publicationScreentip; var getPublication = $("#sports_article_credits").text(); var publication = ["The Philippine Star", "Pilipino Star Ngayon", "The Freeman", "Pang-masa", "Banat"]; for (var i = 0; i < publication.length; i++) { if (getPublication.indexOf(publication[i]) != -1) { publicationScreentip = publication[i]; } } function replaceDisclaimer() { return '' + publicationScreentip + ' <span id="pub-dis" ><span class="dis-btn"><img src="https://media.Tanglaw Daily/assets/icons/info-icon.webp"></span><div class="dis-tooltip">This content was originally published by <a href="https://www.Tanglaw Daily/' + publicationScreentip.replace(/\s+/g, '-').toLowerCase() + '/about-us">' + publicationScreentip + '</a> following its editorial guidelines. <b>Tanglaw Daily</b> hosts its content but has no editorial control over it.</div></span>'; } if ($('#sports_article_credits').length && publicationScreentip) { var sports_article_credits = $('#sports_article_credits'); sports_article_credits.html(sports_article_credits.html().replace(publicationScreentip, replaceDisclaimer())); if ($(window).width() <= 1024) { sports_article_credits.on('click', '.dis-btn', function () {wisfw dis_tooltip = sports_article_credits.find('.dis-tooltip'); if (!dis_tooltip.hasClass('m-show')) { tl = $(window).width() / 2 >= $(this).offset().left ? "tl-left" : ""; dis_tooltip.addClass('m-show ' + tl); } else { dis_tooltip.removeClass('m-show'); } }).on('click', '.dis-tooltip', function () { $(this).removeClass('m-show'); }); } } })(jQuery); </script> <script type="text/javascript" id="script__newsletter-signup"> // shows in homepage, article and pages if allowed_urls is empty var allowed_urls = [ // "homepage", "headlines","sports", ]; var excluded_urls = [ "events", // "newsletter", "elections-2022" ]; var pathArray = window.location.pathname.split('/'); var inPublication = pathArray[1]; // sign up functions if (getCookie('newsletter_hide') == null || getCookie('newsletter_hide') == 0) { // newsletter_show(); } function newsletter_create(elem, tag) { // create link tag scriptTag = document.getElementById("script__newsletter-signup"); var linkTag = document.createElement("link"); linkTag.setAttribute("rel", "stylesheet"); linkTag.setAttribute("href", "https://media.Tanglaw Daily/assets/newsletter/signup/newsletter_signup_v3-with_signup-options.css"); // linkTag.setAttribute("href", "https://dev.Tanglaw Daily/css/newsletter_signup_v3-with_signup-options.css"); scriptTag.parentNode.insertBefore(linkTag, scriptTag); var newsletterSignUpWrap = document.createElement("div"); newsletterSignUpWrap.setAttribute("class", "newsletter-sign-up-wrap " + tag); var newsletterSignupForm = document.createElement("div"); newsletterSignupForm.setAttribute("id", "newsletter-signup-form"); newsletterSignupForm.innerHTML = `<div class="newsletter-signup-form_container"> <h2>Relevant. <span class="br"></span>Witty. Daily</h2> <p class="newsletter-signup-form_txt">Morning news briefings <span class="br"></span>from Tanglaw Daily</p> <input type="text" id="newsletter-signup-form_email" name="email" placeholder="Your Email Address"></input> <button type="submit" id="newsletter-signup-form_signup" name="signup">SIGN-UP</button> <div class="nl-signup-label">or sign in with </div> <button type="submit" id="newsletter-signup-form_signup_via" name="signup_via" onclick="signup_via_account()"> <img src="https://media.Tanglaw Daily/assets/newsletter/Login-options-icons-v2.png"> </button> </div>`; newsletterSignUpWrap.appendChild(newsletterSignupForm); if (elem.length > 0) $(newsletterSignUpWrap).insertAfter(elem); document.getElementById("newsletter-signup-form_signup").addEventListener('click', function (e) { sign_up_now(document.getElementById("newsletter-signup-form_email").value); }); document.getElementById("newsletter-signup-form_email").addEventListener('click', function (e) { this.value = ""; }); } function modal_newsletter_signup_via__info() { } let signup_click_nl = false; document.getElementById("login_close").addEventListener("click", function () { document.getElementById("whiteout").classList.remove("modal_newsletter-sign_up_via"); signup_click_nl = false; console.log("close click", signup_click_nl); }); document.getElementById("bg-modal-c").addEventListener("click", function () { // if (signup_click_nl){ document.getElementById("whiteout").classList.remove("modal_newsletter-sign_up_via"); signup_click_nl = false; console.log("close click", signup_click_nl); // } }); function signup_via_account() { if (login_via) { // let email_log = login_via.split("..")[1]; // console.log("login via", login_via); document.getElementById("newsletter-signup-form_email").value = login_via.split("..")[1] sign_up_now(login_via.split("..")[1]); } else { signup_click_nl = true; document.getElementById("whiteout").classList.add("modal_newsletter-sign_up_via"); console.log("signup_click_nl", signup_click_nl); $("body").css({ overflow: "hidden" }), whiteout_reset(), $("#floatingBarsG").css({ display: "none" }), $("#login").css({ display: "block" }); } } function sign_up_now(email) { if (email && validateEmail(email)) { var providers = ['list', 'sendy']; var xmlhttp = new XMLHttpRequest(); (function loop(i, length) { if (i >= length) return; var url = 'https://www.Tanglaw Daily/newsletter_signup_widget.php'; xmlhttp.open("POST", url, true); xmlhttp.onreadystatechange = function () { if (xmlhttp.readyState === XMLHttpRequest.DONE && xmlhttp.status === 200) { var data = xmlhttp.responseText; console.log(data); msg_newsletter("Thank you for signing up!", "success"); loop(i + 1, length); } }; xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); xmlhttp.send('email=' + email + '&provider=' + providers[i]); })(0, providers.length); } else { msg_newsletter("Please enter valid email address.", "error"); } } function msg_newsletter(msg, cla = "") { signupMsg = $(".signup-msg"); if (signupMsg.length) signupMsg.text(msg).attr("class", "signup-msg " + cla); else $('<div class="signup-msg ' + cla + '">' + msg + '</div>').insertAfter($("input#newsletter-signup-form_email")); } function close_newsletter() { var nsf = document.getElementById("newsletter-signup-form"); nsf.classList.add("slideOutDown"); nsf.classList.remove("slideInUp"); console.log("no thanks click"); return false; } function validateEmail(email) { var re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; return re.test(String(email).toLowerCase()); } function setCookie(name, value, days) { var expires = ""; if (days) { var date = new Date(); date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000)); expires = "; expires=" + date.toUTCString(); } document.cookie = name + "=" + (value || "") + expires + ";path=/"; } function getCookie(name) { var nameEQ = name + "="; var ca = document.cookie.split(';'); for (var i = 0; i < ca.length; i++) { var c = ca[i]; while (c.charAt(0) == ' ') c = c.substring(1, c.length); if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length); } return null; } function eraseCookie(name) { document.cookie = name + '=; Max-Age=-99999999;'; } function filter_url(allowed_urls, excluded_urls) { p = false; cur_url = window.location.pathname; "/" == cur_url && (cur_url += "homepage"); if (allowed_urls.length) $.each(allowed_urls, function (key, allowed) { if (cur_url.search("/" + allowed) >= 0) { p = true; return false; } }); else p = true; if (excluded_urls.length) $.each(excluded_urls, function (key, excluded) { if (cur_url.search("/" + excluded) >= 0) { p = false; return false; } }); return p; } // create newsletter classNewsleter = ""; //regular page if ($("#sidebar .recommended_cell").length > 0) insertNewsleter = $("#sidebar .recommended_cell").eq(0), classNewsleter = "homepage"; //lifestyle homepage if ($("#section__newsletter .square-ad").length > 0) insertNewsleter = $("#section__newsletter .square-ad"), classNewsleter = "lifestyle"; //regular article if ($("#article_tags_below").length > 0) insertNewsleter = $("#article_tags_below"), classNewsleter = "article"; //as it happen article else if ($("#sports_article_writeup").length > 0) insertNewsleter = $("#sports_article_writeup"), classNewsleter = "article"; //microsite page else if ($("#right-sidebar-mrec-ad").length > 0) insertNewsleter = $("#right-sidebar-mrec-ad"); //newsletter page else if ($("#signup_header").length > 0) insertNewsleter = $("#signup_header"), classNewsleter = "page-newsletter"; // create newsletter if (filter_url(allowed_urls, excluded_urls) && classNewsleter) newsletter_create(insertNewsleter, classNewsleter); </script> <script type="text/javascript"> (function ($) { var pathArray = window.location.pathname.split('/'); var inDomain = pathArray[0]; var inPublication = pathArray[1]; var linkPublication = ["the-philippine-star", "pilipino-star-ngayon", "the-freeman", "pang-masa", "banat"]; if (inPublication == "pang-masa") { inPublicationtitle = inPublication.replace(/\b[a-z]/g, function (letter) { return letter.toUpperCase(); }); } else { inPublicationtitle = inPublication.replace(/-/g, ' ').replace(/\b[a-z]/g, function (letter) { return letter.toUpperCase(); }); } var replaceAboutlink = "<a href='" + inDomain + "/" + inPublication + "/about-us'>About " + inPublicationtitle + "</a> | <a href='" + inDomain + "/about-us'>About Tanglaw Daily</a>"; var navfooterFirstchild = $("#nav_footer a:first-child"); for (var i = 0; i < linkPublication.length; i++) { if (inPublication.indexOf(linkPublication[i]) != -1) { navfooterFirstchild.replaceWith(replaceAboutlink); } } })(jQuery); </script> Tanglaw Daily_all_leaderboard_inarticle
<script type="text/javascript"> var pathArray = window.location.pathname.split('/'); var inArticle = pathArray[5]; if (inArticle > 0) { googletag.cmd.push(function () { googletag.display('gpt-ad-Tanglaw Daily_all_leaderboard_inarticle'); }); } </script>
<script type="text/javascript"> (function ($) { if (inArticle > 0) { detach_article_leaderboard = $("#gpt-ad-Tanglaw Daily_all_leaderboard_inarticle").detach(); $(detach_article_leaderboard).insertBefore($('div[data-spotim-app="reactions"]')); } })(jQuery); </script> <script type="text/javascript"> (function () { 'use strict'; /* * ============================================ * Tanglaw Daily ARTICLE AUDIO - GA4 TRACKING * ============================================ * * Tracks: * audio_play * audio_pause * audio_25 * audio_50 * audio_75 * audio_complete * * Requires: * #article-audio-player * #articleAudio * GA4 gtag() */ function initTanglaw DailyAudioGA4() { var audio = document.getElementById('articleAudio'); var player = document.getElementById('article-audio-player'); // No audio player on this page if (!audio || !player) { return; } // Prevent duplicate initialization if (audio.dataset.ga4Initialized === 'true') { return; } audio.dataset.ga4Initialized = 'true'; /* * ============================================ * ARTICLE INFORMATION * ============================================ */ var articleId = ''; /* * Extract article ID from URL. * * Example: * /headlines/2026/09/10/2555320/article-title * * Result: * 2555320 */ var urlMatch = window.location.pathname.match( /\/\d{4}\/\d{2}\/\d{2}\/(\d+)(?:\/|$)/ ); if (urlMatch) { articleId = urlMatch[1]; } /* * Article title */ var articleTitle = ''; var ogTitle = document.querySelector('meta[property="og:title"]'); if (ogTitle) { articleTitle = ogTitle.getAttribute('content') || ''; } if (!articleTitle) { articleTitle = document.title || ''; } /* * Article section */ var articleSection = ''; var sectionMeta = document.querySelector('meta[property="article:section"]'); if (sectionMeta) { articleSection = sectionMeta.getAttribute('content') || ''; } /* * Fallback * * You can remove this if Tanglaw Daily always * provides article:section. */ if (!articleSection) { var pathParts = window.location.pathname .split('/') .filter(Boolean); if (pathParts.length > 0) { articleSection = pathParts[0]; } } /* * ============================================ * AUDIO INFORMATION * ============================================ */ var audioProvider = 'Tanglaw Daily TTS'; var audioType = 'article'; /* * ============================================ * MILESTONE STATUS * ============================================ * * Prevents multiple events from firing * while the audio remains above the * same percentage. */ var milestones = { 25: false, 50: false, 75: false }; /* * ============================================ * GA4 EVENT FUNCTION * ============================================ */ function trackAudioEvent(eventName) { /* * Make sure GA4 is loaded. */ if (typeof window.gtag !== 'function') { console.warn( '[Tanglaw Daily Audio GA4] gtag() not available' ); return; } /* * Audio duration */ var duration = 0; if (isFinite(audio.duration) && audio.duration > 0) { duration = Math.round(audio.duration); } /* * Current playback position */ var currentTime = 0; if (isFinite(audio.currentTime) && audio.currentTime >= 0) { currentTime = Math.round(audio.currentTime); } /* * Playback percentage */ var percent = 0; if (duration > 0) { percent = Math.round((audio.currentTime / audio.duration) * 100); } /* * Prevent percentage above 100 */ if (percent > 100) { percent = 100; } /* * Send GA4 event */ window.gtag('event', eventName, { /* * Article */ article_id: articleId, article_title: articleTitle, article_section: articleSection, /* * Audio */ audio_type: audioType, audio_provider: audioProvider, /* * Playback */ audio_duration: duration, audio_current_time: currentTime, audio_percent: percent }); /* * Console logging * * Useful during deployment/testing. * Can be removed later. */ if (window.console) { console.log( '[Tanglaw Daily Audio GA4]', eventName, { article_id: articleId, article_section: articleSection, audio_percent: percent, audio_duration: duration, audio_current_time: currentTime } ); } } /* * ============================================ * PLAY * ============================================ */ audio.addEventListener('play', function () { trackAudioEvent('audio_play'); }); /* * ============================================ * PAUSE * ============================================ */ audio.addEventListener('pause', function () { /* * Do not send audio_pause when the * audio naturally reaches the end. */ if (!audio.ended) { trackAudioEvent('audio_pause'); } }); /* * ============================================ * AUDIO PROGRESS * ============================================ */ audio.addEventListener('timeupdate', function () { /* * Duration may not be available * immediately because preload="none" */ if (!isFinite(audio.duration) || audio.duration <= 0) { return; } var percent = (audio.currentTime / audio.duration) * 100; /* * 25% */ if (percent >= 25 && !milestones[25]) { milestones[25] = true; trackAudioEvent('audio_25'); } /* * 50% */ if (percent >= 50 && !milestones[50]) { milestones[50] = true; trackAudioEvent('audio_50'); } /* * 75% */ if (percent >= 75 && !milestones[75]) { milestones[75] = true; trackAudioEvent('audio_75'); } }); /* * ============================================ * AUDIO COMPLETE * ============================================ */ audio.addEventListener('ended', function () { trackAudioEvent('audio_complete'); }); /* * ============================================ * RESET MILESTONES * ============================================ * * If the user goes back to the beginning * and plays again, allow the milestones * to be recorded again. */ audio.addEventListener('seeking', function () { if (audio.currentTime <= 1) { milestones[25] = false; milestones[50] = false; milestones[75] = false; } }); } /* * ============================================ * START * ============================================ */ if (document.readyState === 'loading') { document.addEventListener( 'DOMContentLoaded', initTanglaw DailyAudioGA4 ); } else { initTanglaw DailyAudioGA4(); } })(); </script> <script src="https://www.Tanglaw Daily/js/jquery.mobile.custom.min.js" type="text/javascript"></script> <script src="https://www.Tanglaw Daily/js/owl.carousel-v2.min.js" type="text/javascript"></script> <script type="text/javascript"> var jscrolls = 0; function endless(slotName) { //googletag.pubads().disableInitialLoad(); googletag.cmd.push(function() { googletag.defineSlot('/1015401/Tanglaw Daily_all_MRec_Left1_300x250', [[1, 1], [300, 250]], slotName).addService(googletag.pubads()); googletag.pubads().enableSingleRequest(); googletag.pubads().collapseEmptyDivs(); googletag.enableServices(); // Display has to be called before googletag.display(slotName); }); } (function($){ $.getScript( "https://www.Tanglaw Daily/js/jquery.jscroll.min.js", function( data, textStatus, jqxhr ) { $('#news_main').jscroll({ loadingHtml: '<div class="loading_gif"><img style="width: 20px; height: 20px" src="https://www.Tanglaw Daily/images/Home/loader.gif"></div>', callback: function() { call_google("Homepage article bottom lazy load " + (jscrolls + 1)); console.log('jscrolls'+jscrolls); ready_sharing(); $(".jscroll-added").each(function(index) { if (jscrolls % 2 == 0 && index == jscrolls) { $(this).find(".news_column").each(function(index) { if (index == 0) { console.log("left: #left" + Math.floor(jscrolls / 2)); $(this).prepend('<div class="tiles late trend alwaystable"><div id="left' + Math.floor(jscrolls / 2) + '" class="TilesText TilesAd"></div></div>'); endless("left" + Math.floor(jscrolls / 2)); } }); jscrolls += 1; } else if (jscrolls % 2 == 1 && index == jscrolls - 1) { $(this).find(".news_column").each(function(index) { if (index == 1) { console.log("right: #right" + Math.floor(jscrolls / 2)); $(this).append('<div class="tiles late trend alwaystable"><div id="right' + Math.floor(jscrolls / 2) + '" class="TilesText TilesAd"></div></div>'); endless("right" + Math.floor(jscrolls / 2)); } }); jscrolls += 1; } }); if ($("#section_checker").css('display') != "none") { $(".section_switcher").each(function() { if ($(this).hasClass('active')) { var section = $(this).attr('targ'); $(".tiles, .typeNews").css({display: "none"}); if (section == "articles") { $(".tiles").css({display: "inline-block"}); $("#sidebar").css({display: "none"}); } else if (section == "columnist") { $(".tiles").css({display: "none"}); $("#sidebar").css({display: "inline-block"}); } else { $("." + section).css({display: "inline-block"}); $(".typeNews." + section).css({display: "none"}); } } }); } } }); }); })(jQuery); // owl_carousel var checkWidth = jQuery(window).width(); function carousel_actual_config(){ return { items: 1, loop: true, autoplay: true, autoplayTimeout: 4000, autoplayHoverPause: true, responsiveClass: true, responsive: { 0: { nav: false }, 768: { nav: true }, } }; } function owl_carousel_bites_config() { return { items: 1, nav: true, responsiveClass: true, responsive: { 0: { autoHeight: true, }, 600: { slideBy: 2, items: 2, }, } }; } function owl_home_columnists_config(){ return { items: 2, nav: true, responsiveClass: true, responsive: { 0: { items: 1, }, 600: { slideBy: 2, items: 2, dots: true }, } }; } var carousel_actual = $('#carousel_actual'); carousel_actual.owlCarousel(carousel_actual_config()); carousel_actual.on('click','.owl-dot', function(){ carousel_actual.trigger('play.owl.autoplay', [4000]); }); if (checkWidth <= 1023) { owl_carousel_bites = $('#bite_entries'); owl_carousel_bites.addClass('owl-carousel').owlCarousel(owl_carousel_bites_config()); } window.onresize = function(){ owl_carousel_bites = $('#bite_entries'); checkWidth = jQuery(window).width(); if (checkWidth > 1023) owl_carousel_bites.trigger('destroy.owl.carousel').removeClass('owl-carousel'); else owl_carousel_bites.addClass('owl-carousel').owlCarousel(owl_carousel_bites_config()); }; owl_home_columnists = $('#home_columnists_actual'); owl_home_columnists.owlCarousel(owl_home_columnists_config()); </script>