PageSourceSearch

https://security.nifty.com/posts/post/js/index.js

js nifty.com collected 2026-09-24 07:28:03 UTC 1,181 bytes, 34 lines download raw bytes

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.