Senza categoria

Heritage Thailand Foundation Donates beverages to help flood victims

heritage-thailand-foundation-donates-beverages-to-help-flood-victims
Heritage Thailand Foundation Donates beverages to help flood victims “, overlaySpinner = “”, overlayTitle = “

” + _localizedStrings.redirect_overlay_title + “

“, overlayText = “

” + _localizedStrings.redirect_overlay_text + “

“; switch (_redirectOverlay) { case “overlay-only”: break; case “overlay-with-spinner”: overlayHTML = overlayContainer + overlaySpinner + overlayContainerClose; break; default: overlayHTML = overlayContainer + overlaySpinner + overlayTitle + overlayText + overlayContainerClose; break; } overlay.insertAdjacentHTML(“afterbegin”, overlayHTML); document.body.appendChild(overlay); } window.location = url; }; var targetWindow = _targetWindow || ‘prefer-popup’, lastPopup = false; var buttonLinks = document.querySelectorAll(‘ a[data-plugin=”nsl”][data-action=”connect”], a[data-plugin=”nsl”][data-action=”link”]’); buttonLinks.forEach(function (buttonLink) { buttonLink.addEventListener(‘click’, function (e) { if (lastPopup && !lastPopup.closed) { e.preventDefault(); lastPopup.focus(); } else { var href = this.href, success = false; if (href.indexOf(‘?’) !== -1) { href += ‘&’; } else { href += ‘?’; } var redirectTo = this.dataset.redirect; if (redirectTo === ‘current’) { href += ‘redirect=’ + encodeURIComponent(window.location.href) + ‘&’; } else if (redirectTo && redirectTo !== ”) { href += ‘redirect=’ + encodeURIComponent(redirectTo) + ‘&’; } if (targetWindow !== ‘prefer-same-window’ && checkWebView()) { targetWindow = ‘prefer-same-window’; } if (targetWindow === ‘prefer-popup’) { lastPopup = NSLPopup(href + ‘display=popup’, ‘nsl-social-connect’, this.dataset.popupwidth, this.dataset.popupheight); if (lastPopup) { success = true; e.preventDefault(); } } else if (targetWindow === ‘prefer-new-tab’) { var newTab = window.open(href + ‘display=popup’, ‘_blank’); if (newTab) { if (window.focus) { newTab.focus(); } success = true; e.preventDefault(); } } if (!success) { window.location = href; e.preventDefault(); } } }); }); let hasWebViewLimitation = false; var googleLoginButtons = document.querySelectorAll(‘ a[data-plugin=”nsl”][data-provider=”google”]’); if (googleLoginButtons.length && checkWebView()) { googleLoginButtons.forEach(function (googleLoginButton) { googleLoginButton.remove(); hasWebViewLimitation = true; }); } var facebookLoginButtons = document.querySelectorAll(‘ a[data-plugin=”nsl”][data-provider=”facebook”]’); if (facebookLoginButtons.length && checkWebView() && /Android/.test(window.navigator.userAgent) && !isAllowedWebViewForUserAgent(‘facebook’)) { facebookLoginButtons.forEach(function (facebookLoginButton) { facebookLoginButton.remove(); hasWebViewLimitation = true; }); } const separators = document.querySelectorAll(‘div.nsl-separator’); if (hasWebViewLimitation && separators.length) { separators.forEach(function (separator) { let separatorParentNode = separator.parentNode; if (separatorParentNode) { const separatorButtonContainer = separatorParentNode.querySelector(‘div.nsl-container-buttons’); if (separatorButtonContainer && !separatorButtonContainer.hasChildNodes()) { separator.remove(); } } }) } });})();

Leave a Reply