(function() { var iframe = document.createElement("iframe"); iframe.setAttribute("frameBorder", "0"); iframe.setAttribute("scrolling", "no"); iframe.setAttribute("allowtransparency", "true"); iframe.setAttribute("loading", "lazy"); iframe.setAttribute("class", "uminohi-widget newssite-newest"); iframe.style.width = document.getElementById('uminohiWidgetEmbed').dataset.width || "100%"; iframe.style.height = document.getElementById('uminohiWidgetEmbed').dataset.height || "auto"; iframe.src = "https://kanagawa.uminohi.jp/widget/newest/?v=2"; document.getElementById('uminohiWidgetEmbed').after(iframe); (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayerUminohi','GTM-PBJ7DMJ'); window.dataLayerUminohi = window.dataLayerUminohi || []; dataLayerUminohi.push({ 'trackPageview': location.href, 'trackWidget': 'kanagawa.uminohi.jp/widget/newest/', 'event': 'event-widget' }); if (iframe.style.height=="auto"){ var isIOS = /iP(hone|(o|a)d)/.test(navigator.userAgent); if(typeof widget_newssite_article_ajust != 'function' || isIOS) { window.addEventListener("message", widget_newssite_article_ajust, false); function widget_newssite_article_ajust(e) { var frames = document.getElementsByTagName('iframe'); for (var i = 0; i < frames.length; i++) { if (frames[i].contentWindow === event.source) { if (frames[i].className.indexOf("widget-scroll")>-1){ return; } frames[i].style.height = event.data + "px"; break; } } } } } }());