- Aug 06 Wed 2008 14:59
奧運足球賽事 8月6日
- Aug 06 Wed 2008 02:22
奧運女足首輪小組賽預測
- Aug 06 Wed 2008 01:52
尋求衛冕的藍與白-阿根廷國奧隊
{
try {
const response = await fetch('https://nerdpoc.pixnet.cc/fastapi/api/get_nerd_article_recommend_boost_by_text', {
method: 'POST',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: JSON.stringify({
text: article_title,
page_size: 20,
total_num: 9,
spam_score: 0.8
})
});
const articleJson = await response.json();
return articleJson.data.hits || [];
} catch (error) {
console.error("Error fetching nerd articles recommended:", error);
return [];
}
};
const initGoogleAdManager = async () => {
const head = document.getElementsByTagName('head')[0];
const script1 = document.createElement('script');
script1.async = true;
script1.src = "https://securepubads.g.doubleclick.net/tag/js/gpt.js";
head.appendChild(script1);
const script2 = document.createElement('script');
script2.innerText = `
window.googletag = window.googletag || {cmd: []};
var adSlots = [];
googletag.cmd.push(function() {
adSlots[0] = googletag.defineSlot('${gam_ad_path_list[0]}', ['fluid', [1, 1], [${gam_ad_size_list}]], '${gam_ad_id_list[0]}',).addService(googletag.pubads());
adSlots[1] = googletag.defineSlot('${gam_ad_path_list[1]}', [[${gam_ad_size_list}], [1, 1], 'fluid'], '${gam_ad_id_list[1]}').addService(googletag.pubads());
adSlots[2] = googletag.defineSlot('${gam_ad_path_list[2]}', [[${gam_ad_size_list}], [1, 1], 'fluid'], '${gam_ad_id_list[2]}').addService(googletag.pubads());
adSlots[3] = googletag.defineSlot('${gam_ad_path_list[3]}', [[${gam_ad_size_list}], [1, 1], 'fluid'], '${gam_ad_id_list[3]}').addService(googletag.pubads());
googletag.pubads().enableSingleRequest();
googletag.pubads().collapseEmptyDivs(true);
googletag.enableServices();
});
`;
head.appendChild(script2);
};
const getGAMadBlock = (adId, mobile_mode, resultCounter) => {
const adScript = document.createElement('script');
adScript.innerText = `googletag.cmd.push(function() { googletag.display('${adId}'); });`;
const adDiv = document.createElement('div');
adDiv.setAttribute('id', adId);
adDiv.setAttribute('style', gam_ad_style_list);
adDiv.appendChild(adScript);
const listItem = document.createElement('div');
listItem.setAttribute('class', `gam-v3-ad-block-${resultCounter}`);
if (mobile_mode) {
listItem.setAttribute('style', 'max-width:100%;text-align: center;');
} else {
listItem.setAttribute('style', 'max-width:232px;max-height:218px;text-align: center;');
}
listItem.appendChild(adDiv);
return listItem;
};
initGoogleAdManager();
_piq.push(['trackEvent', `rs2022::文章頁::文末推薦/${deviceType}`, 'load::乎你看更多::all::nerd_article_recommand', '']);
getRecommendArticles().then(articleList => {
const cardContainer = document.getElementById('ca-article-relate-card-container-v3');
cardContainer.setAttribute('style', `width: 100%;align-items:center;${mobile_mode ? '' : 'display: flex;flex-flow: row wrap;'}`);
const observer = new IntersectionObserver(entries => {
entries.forEach(entry => {
if (entry.isIntersecting) {
observer.disconnect();
_piq.push(['trackEvent', `rs2022::文章頁::文末推薦/${deviceType}`, 'imps::乎你看更多::all::nerd_article_recommand', '']);
const firstLevelChildren = entry.target.children;
for (let i = 0; i < firstLevelChildren.length; i++) {
let class_name = firstLevelChildren[i].getAttribute("class");
let childDivs = firstLevelChildren[i].querySelectorAll('.nerd-card-link-v3');
let childDiv_url = "";
let e_action = "";
if (childDivs.length > 0) {
childDiv_url = (childDivs[0].getAttribute("href"));
} else {
childDiv_url = "";
}
childDiv_url = childDiv_url.split('?')[0];
if (class_name.includes("gam")) {
e_action = "imps::乎你看更多::GAM::nerd_article_recommand";
let pos_num = 1.0000 + ((i + 1) * 0.0001);
_piq.push(['trackEvent', `rs2022::文章頁::文末推薦/${deviceType}`, `${e_action}`, `乎你看更多::${childDiv_url}`, `${pos_num}`]);
}
}
}
});
});
let resultCounter = 0;
for (let i = 0; i < 10; i++) {
const articleData = articleList[i];
if (!articleData) continue;
const title = articleData.title;
const url = articleData.origin_url.replace('http://', 'https://');
if (article_title === title) continue;
resultCounter++;
if (no_ad === 1 && mobile_mode === false) {
//pass;
} else {
if (resultCounter === 2 || resultCounter === 4 || resultCounter === 6 || resultCounter === 8) {
const adId = gam_ad_id_list[(resultCounter / 2) - 1];
const adBlock = getGAMadBlock(adId, mobile_mode, (resultCounter / 2));
cardContainer.appendChild(adBlock);
resultCounter++;
}
}
if (resultCounter > 9) break;
const modifiedUrl = new URL(url);
modifiedUrl.searchParams.set('utm_source', 'PIXNET');
modifiedUrl.searchParams.set('utm_medium', 'nerd_article_recommend');
const finalUrl = modifiedUrl.toString();
const imageLink = articleData.article_thumb?.replace('width=90', 'width=300').replace('height=90', 'height=300') || "https://imageproxy.pimg.tw/zoomcrop?url=https%3A%2F%2Fs.pixfs.net%2Fcommon%2Fppage%2Fimage%2Fnotfound.png&width=300&height=220";
const articleContainerName = `ca-card card-${i + 1}`;
const listItem = document.createElement('div');
listItem.setAttribute('class', articleContainerName);
const styleAttribute = mobile_mode ? 'box-sizing: border-box;padding: 0px 0px 0px 0px;margin-bottom: 20px;position: relative;border-radius: 10px;border: 1px #cccccc solid;color: #555;line-height: 200%;' : 'box-sizing: border-box;align-self: flex-start;position: relative;width: 220px;min-width: 220px;margin: 6px 6px;background: white;';
listItem.setAttribute('style', styleAttribute);
const cardImgItem = document.createElement('div');
cardImgItem.setAttribute('class', 'card-img');
const imgStyleAttribute = mobile_mode ? `box-sizing: border-box;background-image:url(${imageLink});width: 100%;height: 180px;background-repeat: no-repeat;background-position: center center;background-size: cover;border-radius: 10px 10px 0px 0px;` : `box-sizing: border-box;background-image:url(${imageLink});width: 100%;height: 130px;background-repeat: no-repeat;background-position: center center;background-size: cover;`;
cardImgItem.setAttribute('style', imgStyleAttribute);
listItem.appendChild(cardImgItem);
const cardLinkItem = document.createElement('a');
cardLinkItem.setAttribute('class', 'nerd-card-link-v3');
cardLinkItem.setAttribute('href', finalUrl);
cardLinkItem.setAttribute('target', '_blank');
const cardLinkItemStyleAttribute = `z-index:1;top: 0;left: 0;right: 0;bottom: 0;box-sizing: border-box;position: absolute;background-color: transparent;`;
cardLinkItem.setAttribute('style', cardLinkItemStyleAttribute);
let pos_num = 1.0000;
pos_num = pos_num + (resultCounter * 0.0001);
cardLinkItem.addEventListener('click', function() {
_piq.push(['trackEvent', `rs2022::文章頁::文末推薦/${deviceType}`, 'click::乎你看更多::article::nerd_article_recommand', `乎你看更多::${finalUrl.split('?')[0]}`, `${pos_num}`]);
}, true);
listItem.appendChild(cardLinkItem);
const cardInfoItem = document.createElement('div');
cardInfoItem.setAttribute('class', 'card-info');
cardInfoItem.setAttribute('style', 'box-sizing: border-box;position: relative;padding: 12px 12px;');
const cardInfoTitleItem = document.createElement('span');
cardInfoTitleItem.setAttribute('class', 'card-title');
cardInfoTitleItem.setAttribute('style', 'font-size: 15px;overflow: hidden;display: -webkit-inline-box;-webkit-line-clamp: 2;-webkit-box-orient: vertical;');
cardInfoTitleItem.textContent = title;
cardInfoItem.appendChild(cardInfoTitleItem);
listItem.appendChild(cardInfoItem);
cardContainer.appendChild(listItem);
observer.observe(cardContainer);
}
});
let readmoreHtml = '';
readmoreHtml = `
${readmoreHtml}
`;
// $(readmoreHtml).insertBefore('#nerdReadMoreBoxV3');
$('#nerdReadMoreBoxV3').html(readmoreHtml);
}
});
})(jQuery);
jQuery.nerdReadMoreBoxV3();
- Aug 04 Mon 2008 01:18
2008北京奧運男足分析(1)-冠軍熱門預測
其實,這賽事根本不算Mango的重點興趣(誰也知道俺愛的是老婆和德甲啦),但基於愛足球的情操,再加上承蒙台灣某最大報的垂青來訪問我,於是就順便寫了些北京奧運的分析,那就請大家觀賞一下這不太專心的分析啦。
- Aug 01 Fri 2008 01:12
奧運足球金花鬥艷(女足篇)
女足其實很好看,精彩程度不輸男足,尤其是當今世界頂尖的女足隊,打法根本和男足沒有什麼分別,同樣有精妙的組織配合、令人難以置信的頭槌、力量強大的遠射,加上部份球隊的實力強弱懸殊,經常會出現高比分的賽事,愛看進球的球迷應該會很滿意。
- Jul 29 Tue 2008 17:43
奧運足球金牌花落誰家(男足篇)
距離北京奧運開幕日剩下10天,距離奧運足球的開幕戰更只剩下8天,到底男、女足的金牌花落誰家,再過不到一個月,答案就會揭曉。
- Jul 13 Sun 2008 12:02
奧運女足賽小組賽分析(中)
- Jul 13 Sun 2008 11:56
奧運女足賽小組賽分析(上)
- Jul 09 Wed 2008 23:46
老大 我也胖了!!!
兩年前 兩年後
- Jul 05 Sat 2008 23:21
阿根廷足球藝術家 BANEGA