1const contents = $('#js-post-contents'); 2 3$(function () { 4 // microCMSã§æ±ºãããã¦ããyoutubeã®Style䏿¸ã 5 const youtubeIframes = contents.find('iframe').filter(function () { 6 const src = $(this).attr('src'); 7 return src && src.includes('www.youtube'); 8 }); 9 10 youtubeIframes.each(function () { 11 const $this = $(this); 12 const parent = $this.parent(); 13 parent.attr('style', ''); 14 parent.addClass('youtube'); 15 }); 16}); 17 18/* 19ã³ã³ãã³ãå ã®niftyãã¡ã¤ã³ã®URLã«ãã©ã¡ã¼ã¿ãä»ä¸ 20å ã ãã©ã¡ã¼ã¿ã¼ãããURLã«ã¯ä»ä¸ããªã 21*/ 22document.addEventListener('DOMContentLoaded', function () { 23 const postContentsAtags = document.querySelectorAll('a'); 24 const paramKey = 'security_post'; 25 const postPath = window.location.pathname; 26 const postId = postPath.replace(/\/$/, '').split('/').pop(); 27 const addParam = `?utm_source=${paramKey}&utm_medium=${paramKey}&utm_campaign=${paramKey}_${postId}`; 28 postContentsAtags.forEach(function (link) { 29 const href = link.getAttribute('href'); 30 if (href && href.includes('nifty.com') && !href.includes('?')) { 31 link.setAttribute('href', href + addParam); 32 } 33 }); 34});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.