¥n';
}
if(gamPos.LogoAD){
const rlp = d.querySelector(gamPos.LogoAD);
rlp ? rlp.parentNode.insertBefore(rlDiv,rlp) : gamSlotset.Alert('001',rlDiv.id);
} else {
rc ? rc.prepend(rlDiv) : gamSlotset.Alert('002',rlDiv.id);
}
}
const cstmId = d.getElementById('ibo_msp'),
gamPos = typeof gam_pos == 'function' ? gam_pos() : cstmId ? gamSlotset.Msp() : '',
lc = gamPos.LeftColumn ? d.querySelector(gamPos.LeftColumn) : d.querySelector('#masterMain'),
rc = gamPos.RightColumn ? d.querySelector(gamPos.RightColumn) : d.querySelector('#masterSub');
gamSlotset.IndexTopLink();
gamSlotset.RcolRectangle();
gamSlotset.LogoAD();
refreshGam();
};
window.addEventListener('load',function(){
gamSlotset(document); // 広告要素の生成
},false);
// refresh引数
var gam_la1,gam_la2,gam_la3,gam_la4,gam_la5,gam_la6,gam_la7,gam_la8,gam_la9,gam_la10,gam_tl1,gam_tl2,gam_tl3,gam_tl4,gam_tl5,gam_rct1;
// カスタム用処理
// adpathから特集を取得
const gam_adpath = getMetaTag('adpath').content;
const itm_adpath = gam_adpath ? gam_adpath.split('/') : '';
// 体裁判別(adpathで取得)
const gam_custom = itm_adpath[4] ? itm_adpath[4] : '';
const gam_customtl = 'TopLink ' + gam_custom;
// ウィンドウサイズ
const gam_window = window.innerWidth > 768 ? 'pcv' : 'spv';
googletag.cmd.push(function(){
googletag.pubads().collapseEmptyDivs();
// ユニット設定
gam_tl1 = googletag.defineSlot('/43042345/business/PC_IndexTopLink_headline',['fluid'],'PC_IndexTopLink_headline').setTargeting('headline',['Special']).setTargeting('customstyle',[gam_customtl]).setTargeting('windowsize',[gam_window]).setTargeting('slot_pos','1').addService(googletag.pubads());
gam_tl2 = googletag.defineSlot('/43042345/business/PC_IndexTopLink',['fluid'],'PC_IndexTopLink_2').setTargeting('customstyle',[gam_customtl]).setTargeting('windowsize',[gam_window]).setTargeting('slot_pos','2').addService(googletag.pubads());
gam_tl3 = googletag.defineSlot('/43042345/business/PC_IndexTopLink',['fluid'],'PC_IndexTopLink_3').setTargeting('customstyle',[gam_customtl]).setTargeting('windowsize',[gam_window]).setTargeting('slot_pos','3').addService(googletag.pubads());
gam_tl4 = googletag.defineSlot('/43042345/business/PC_IndexTopLink',['fluid'],'PC_IndexTopLink_4').setTargeting('customstyle',[gam_customtl]).setTargeting('windowsize',[gam_window]).setTargeting('slot_pos','4').addService(googletag.pubads());
gam_tl5 = googletag.defineSlot('/43042345/business/PC_IndexTopLink',['fluid'],'PC_IndexTopLink_5').setTargeting('customstyle',[gam_customtl]).setTargeting('windowsize',[gam_window]).setTargeting('slot_pos','5').addService(googletag.pubads());
gam_la1 = googletag.defineSlot('/43042345/business/PC_LogoAD_headline',['fluid'],'PC_LogoAD_headline').setTargeting('customstyle',[gam_customtl]).setTargeting('headline',['スポンサーリンク']).setTargeting('customstyle',[gam_custom]).addService(googletag.pubads());
gam_la2 = googletag.defineSlot('/43042345/business/PC_LogoAD',['fluid'],'PC_LogoAD_2').setTargeting('customstyle',[gam_custom]).addService(googletag.pubads());
gam_la3 = googletag.defineSlot('/43042345/business/PC_LogoAD',['fluid'],'PC_LogoAD_3').setTargeting('customstyle',[gam_custom]).addService(googletag.pubads());
gam_la4 = googletag.defineSlot('/43042345/business/PC_LogoAD',['fluid'],'PC_LogoAD_4').setTargeting('customstyle',[gam_custom]).addService(googletag.pubads());
gam_la5 = googletag.defineSlot('/43042345/business/PC_LogoAD',['fluid'],'PC_LogoAD_5').setTargeting('customstyle',[gam_custom]).addService(googletag.pubads());
gam_la6 = googletag.defineSlot('/43042345/business/PC_LogoAD',['fluid'],'PC_LogoAD_6').setTargeting('customstyle',[gam_custom]).addService(googletag.pubads());
gam_la7 = googletag.defineSlot('/43042345/business/PC_LogoAD',['fluid'],'PC_LogoAD_7').setTargeting('customstyle',[gam_custom]).addService(googletag.pubads());
gam_la8 = googletag.defineSlot('/43042345/business/PC_LogoAD',['fluid'],'PC_LogoAD_8').setTargeting('customstyle',[gam_custom]).addService(googletag.pubads());
gam_la9 = googletag.defineSlot('/43042345/business/PC_LogoAD',['fluid'],'PC_LogoAD_9').setTargeting('customstyle',[gam_custom]).addService(googletag.pubads());
gam_la10 = googletag.defineSlot('/43042345/business/PC_LogoAD',['fluid'],'PC_LogoAD_10').setTargeting('customstyle',[gam_custom]).addService(googletag.pubads());
gam_rct1 = googletag.defineSlot('/43042345/business/PC_subtop_rcol-Rectangle',[[300,600],[300,250],[300,300]],'PC_rcol-Rectangle').addService(googletag.pubads());
gam_keyValue(); // Key-Value設定
googletag.pubads().enableSingleRequest();
googletag.pubads().disableInitialLoad();
googletag.enableServices();
});
¥n';
html += '
¥n';
html += '¥n';
html += (i==count) ? '
¥n
¥n' : '';
}
html += '
¥n
¥n';
return html;
}
var nahtmlset = function(count){
let html = '
¥n';
if(count == 4) html += '
¥n
新着記事 ¥n¥n
¥n';
html += '
¥n';
let countset = (count+10 > list.length) ? list.length : count+10;
for(let i=count;i
¥n';
html += ' ¥n';
if(list[i]['subtitle']) html += '¥n';
html += '¥n';
// html += '¥n';
html += '¥n';
}
html += ' ¥n
¥n';
return html;
}
let d = document;
var list = listGet();
let id = d.getElementById('colBoxTopStories');
if(num == 1) id.innerHTML = htmlset(0);
let naid = d.getElementById('NewArticle');
let naid2 = d.getElementById('NewArticle2nd');
let ml = d.getElementById('MoreLink');
num == 1 ? naid.innerHTML = nahtmlset(4) : naid2.innerHTML = nahtmlset(14);
if(num == 2 || list.length < 14) ml.innerHTML = '
¥n';}
toptopics(1);
¥n';
}
if(!listhtml) return false;
html += '
' + data['name'] + ' ';
html += '
';
html += listhtml;
html += '
';
bannerList.innerHTML = html;
})();