<link rel="stylesheet" type="text/css" href="https://ezone.hk/css/owl.carousel.min.css"/> <link rel="stylesheet" type="text/css" href="https://ezone.hk/css/font-awesome.min.css"/> <div id="section-bar"> </div> <div id="search"> <form name="searchForm" id="searchForm" action="/search" method="GET"> <input type="hidden" name="dis" value="advanced"> <input type="search" name="keywords" id="keywordsField2" placeholder="請輸入關鍵字" /> </form> </div>
讯享网
讯享网 <div class="ezone-post"> </div>"; var str2 = "<div id=""+dfpDiv2+"" class="col-md-12 text-center center-block" style="margin-bottom:20px;padding:0;"></div>"; $(dfp).replaceWith(str); $(dfp2).replaceWith(str2); infiniteItem.setAttribute('pageNum', pageNum); //ga('send', 'event', '載入更多', 'Load', docId); var link = 'https://ezone.hk/article/'+docId+'/'+headline; var _comscore = _comscore || []; _comscore.push({ c1: "2", c2: "", c4: link}); (function() )();
$('div#loadingAnimation').hide(); } }); });
讯享网document.addEventListener('DOMContentLoaded', function () ); } } } // Attach the click event listener to the document document.addEventListener('click', handleLinkClick); }); /*window.dataLayer.push({
'event':'ultriggerpageview', 'ga4': { 'pageview_event_name': 'page_view', 'service': 'article', 'title': "【ChatGPT熱】ChatGPT 越獄教學!開啟 DAN 模式‧解放 AI 道德框架! - ezone.hk - 數碼 - 數碼 - D", 'content': {'id':"", 'type':'article'}, 'category': '科技', 'video':{'program':'NA'}, 'author': '賴立賢', 'taglist':"科技", 'publishdate': '2024-10-05 12:20:25', 'primary':{'main': '','sub': 'NA'}, 'pageurl': window.location.href, 'pagename': "【ChatGPT熱】ChatGPT 越獄教學!開啟 DAN 模式‧解放 AI 道德框架! - ezone.hk - 數碼 - 數碼 - D"} });*/ $(function(){ $(window).bind('scroll', function() { $('.infinite-item').each(function() { var infiniteItem = $(this); var documentId = infiniteItem.find(".article").data("docid"); var headline = infiniteItem.find(".article").data("headline"); var urlTitle = infiniteItem.find(".article").data("seourltitle").trim(); urlTitle = urlTitle.replace(/[" !!「」【】《》〔〕[][]【】〖〗、\\|『』.‧$:"&$#%(())*+,https://ezone.hk/article//:;<=>??@[\]^`{|│|}~–—]+/g, "-"); urlTitle = urlTitle.replace(/^-+/, '').replace(/-+$/, ''); var metatitle = infiniteItem.find(".article").data("metatitle"); var position = infiniteItem.position().top - $(window).scrollTop(); var author = infiniteItem.find(".article").data("author"); var main_cate = infiniteItem.find(".article").data("sectionname"); var sub_cate = infiniteItem.find(".article").data("subsectionname"); var taglist = infiniteItem.find(".article").data("formaltag"); var publishdate = infiniteItem.find(".article").data("publishdate"); const pDate = publishdate.split(" "); const reformDate = pDate[0].split("-"); var formDate = reformDate[2]+'-'+reformDate[1]+'-'+reformDate[0]; var tags = infiniteItem.find(".article").data("tags"); var pageurl = window.location.origin +'/article/'+ documentId +'/'+ headline +'?ref=scroll'; var ga4Channel = infiniteItem.find(".article").data("matomochannelcode"); let model = { 'pageview_event_name': 'infinite_scroll', 'service': 'article', 'title': metatitle, 'content': {'id':documentId == null ?'NA':documentId.toString(),'type':'article'}, 'category': '科技', 'video':{'program':'NA'}, 'author': author==null||author==''?'NA':author, 'taglist':tags==null||tags==''?'NA':tags, 'publishdate': formDate==null||formDate==''?'NA':formDate, 'primary': { 'main': main_cate == null||main_cate =='' ? 'NA' : main_cate, 'sub': sub_cate == null||sub_cate ==''? 'NA' : sub_cate }, 'pageurl': pageurl, 'pagename':metatitle, 'screen': 'article_detail' } var tocDiv = $('.page-right'); if (tocDiv) if (infiniteItem.find('.toc-mobile')[0]) { infiniteItem.find('.toc-mobile')[0].style.display = 'none'; } } else if (infiniteItem.find('.toc-mobile')[0]) { infiniteItem.find('.toc-mobile')[0].style.display = 'inline-flex'; } } } if ((position <= 0) &&(position>-200)) var currentUrl = window.location.href; if(currentUrl.indexOf(documentId) == -1){ $(document).attr("title", metatitle); window.history.replaceState('nextPage', 'Title', '/article/'+documentId+'/'+urlTitle); $('meta[property=og\:url]').attr('content', window.location.href); $('meta[name=twitter\:url]').attr('content', window.location.href); //ga('send', 'pageview', {'page': '/article/'+documentId+'/'+headline+'?ref=scroll', 'title': metatitle}); console.log("gaInfinite: " + metatitle); if (ga4Channel == '10') { model.channel = 'ec'; } if (page == 1) { model.pageview_event_name = 'page_view'; } window.dataLayer.push({ 'event':'ultriggerpageview', 'ga4': model }); window.dataLayer.push({ 'gapageview' : { 'dimension11': author, 'matomoDimension2' : documentId, 'page' : '/article/'+documentId+'/'+headline+'?ref=scroll', 'title' : metatitle }, 'matomo' : { 'channelCode' : "test", 'referrerUrl' : currentUrl, 'customUrl' : '/article/'+documentId+'/'+headline+'?ref=scroll', 'documentTitle' : metatitle } }); window.dataLayer.push({ 'event' : 'infinitescroll' }); } } else var currentUrl = window.location.href; if (currentUrl.indexOf(documentId) != -1) { var passedCount = 0; var updateUrl = '/article/'+documentId+'/'+urlTitle; var figureCount = infiniteItem.find('figure').length; var galleryWrapperCount = infiniteItem.find('.gallery-container').length; var photoSwipeContainerCount = infiniteItem.find('.photoSwipe-container').length; var figuresOutsidePhotoSwipe = infiniteItem.find('figure').filter(function() { return !$(this).closest('.photoSwipe-container').length; }); var figuresOutsidePhotoSwipeCount = figuresOutsidePhotoSwipe.length; var figureContainers = infiniteItem.find('figure'); var galleryWrappers = infiniteItem.find('gallery-wrapper'); var photoSwipeContainers = infiniteItem.find('figure'); var totalSetsOfImages = figuresOutsidePhotoSwipeCount + galleryWrapperCount + photoSwipeContainerCount - 1; if (totalSetsOfImages > 2) var elementTop = $(this).offset().top; var elementBottom = elementTop + $(this).outerHeight(); if (elementBottom < scrollTop) { passedCount++; } });*/ // Check each gallery-wrapper infiniteItem.find('.gallery-container').each(function(index) }); // Check each photoSwipe-container infiniteItem.find('.photoSwipe-container').each(function() }); } checkPassedElements(); //console.log('passedCount ' + passedCount); var passed = Math.floor(passedCount / 2); if (passed == 0) { passed = -1; } if (passed > 0) { updateUrl += '/' + passed; } //console.log("updateUrl " + updateUrl); const currentUrl = window.location.href; if (currentUrl.indexOf(encodeURI(updateUrl)) == -1) if (page == 1) { model.pageview_event_name = 'page_view'; } model.pageurl = updateUrl; window.dataLayer.push({ 'event':'ultriggerpageview', 'ga4': model }); } } else else if (rect.bottom <= window.innerHeight) { updateUrl += '/' + 2; } const currentUrl = window.location.href; if (currentUrl.indexOf(encodeURI(updateUrl)) == -1) if (page == 1) { model.pageview_event_name = 'page_view'; } model.pageurl = updateUrl; window.dataLayer.push({ 'event':'ultriggerpageview', 'ga4': model }); } } } } }); }); });
讯享网function setUpPhotoSwipe(){ var pageNum = $('.infinite-item').length; var className = "photoSwipe" + pageNum; $('.photoSwipe').each( function() { $(this).attr('class', className); }); } function setCookie(c_name,value,expiredays){ document.cookie=c_name+ "=" +escape(value)+ ";path=/"; } function getCookie(c_name) } return "" } function updateClass(contentClass,ezoneHeadingClass){ $('.infinite-item').children().each(function() { //console.log( $('.infinite-item').children().find('.ezone-heading') ); var content = $('.infinite-item').children().find('.content'); content.attr("class", "content " + contentClass); var ezoneHeading = $('.infinite-item').children().find('.ezone-heading'); ezoneHeading.attr("class", "col-md-12 text-center ezone-heading " + ezoneHeadingClass); }); } function wordResize() else //console.log("contentClass(wordResize): " + contentClass); //console.log("ezoneHeadingClass(wordResize): " + ezoneHeadingClass); $('.icon-search-minus').on('click', function (event) else if(contentClass=="content-large") { $('.content').removeClass('content-large'); $('.ezone-heading').removeClass('ezone-heading-large'); contentClass = ""; ezoneHeadingClass = ""; } else if(contentClass=="content-small") { $('.content').removeClass('content-small'); $('.content').addClass('content-small-small'); $('.ezone-heading').removeClass('ezone-heading-small'); $('.ezone-heading').addClass('ezone-heading-small-small'); contentClass = "content-small-small"; ezoneHeadingClass = "ezone-heading-small-small"; } else if(contentClass=="content-small-small") { } else { $('.content').addClass('content-small'); $('.ezone-heading').addClass('ezone-heading-small'); contentClass = "content-small"; ezoneHeadingClass = "ezone-heading-small"; } setCookie("article__contentClass",contentClass); setCookie("article__ezoneHeadingClass",ezoneHeadingClass); console.log("contentClass: " + contentClass); //console.log("ezoneHeadingClass: " + ezoneHeadingClass); updateClass(contentClass,ezoneHeadingClass); }); $('.icon-search-plus').on('click', function (event) else if (contentClass=="content-small") { $('.content').removeClass('content-small'); $('.ezone-heading').removeClass('ezone-heading-small'); contentClass = ""; ezoneHeadingClass = ""; } else if (contentClass=="content-large") { $('.content').removeClass('content-large'); $('.content').addClass('content-large-large'); $('.ezone-heading').removeClass('ezone-heading-large'); $('.ezone-heading').addClass('ezone-heading-large-large'); contentClass = "content-large-large"; ezoneHeadingClass = "ezone-heading-large-large"; } else if (contentClass=="content-large-large") { } else { $('.content').addClass('content-large'); $('.ezone-heading').addClass('ezone-heading-large'); contentClass = "content-large"; ezoneHeadingClass = "ezone-heading-large"; } setCookie("article__contentClass",contentClass); setCookie("article__ezoneHeadingClass",ezoneHeadingClass); console.log("contentClass: " + contentClass); //console.log("ezoneHeadingClass: " + ezoneHeadingClass); updateClass(contentClass,ezoneHeadingClass); }); }
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容,请联系我们,一经查实,本站将立刻删除。
如需转载请保留出处:https://51itzy.com/kjqy/209468.html