https://2p4c.tw/wp-includes/js/jquery/jquery.min.js
https://2p4c.tw/wp-includes/js/jquery/jquery-migrate.min.js
(function() {
if (window.location.pathname.startsWith('/en/')) {
var topBar = document.getElementById('p4c-top-bar');
if (topBar) topBar.style.display = 'none';
}
})();
function copyBdayCode(code, url, btn) {
navigator.clipboard.writeText(code).then(function() {
var originalText = btn.textContent;
btn.textContent = 'COPIED & REDIRECTING...';
btn.style.cssText += 'background:#2a3439!important;color:#F4C842!important;border-color:#2a3439!important;';
setTimeout(function() {
window.open(url, '_blank');
btn.textContent = originalText;
btn.style.background = '';
btn.style.color = '';
btn.style.borderColor = '';
}, 500);
}, function(err) {
window.open(url, '_blank');
});
}
function copyBdayPartner(code, url, btn) {
navigator.clipboard.writeText(code).then(function() {
var originalText = btn.textContent;
btn.textContent = 'COPIED & REDIRECTING...';
btn.style.cssText += 'background:#2a3439!important;color:#F4C842!important;border-color:#2a3439!important;';
setTimeout(function() {
window.open(url, '_blank');
btn.textContent = originalText;
btn.style.background = '';
btn.style.color = '';
btn.style.borderColor = '';
}, 500);
}, function(err) {
window.open(url, '_blank');
});
}
function copyBdayWeekly(code, url, btn) {
navigator.clipboard.writeText(code).then(function() {
var originalText = btn.textContent;
btn.textContent = 'COPIED';
btn.style.cssText += 'background:#2a3439!important;color:#F4C842!important;border-color:#2a3439!important;';
setTimeout(function() {
window.open(url, '_blank');
btn.textContent = originalText;
btn.style.background = '';
btn.style.color = '';
btn.style.borderColor = '';
}, 600);
}, function(err) {
window.open(url, '_blank');
});
}
function copyBdayBank(code, url, btn) {
navigator.clipboard.writeText(code).then(function() {
var originalText = btn.textContent;
btn.textContent = 'COPIED';
btn.style.cssText += 'background:#2a3439!important;color:#F4C842!important;border-color:#2a3439!important;';
setTimeout(function() {
window.open(url, '_blank');
btn.textContent = originalText;
btn.style.background = '';
btn.style.color = '';
btn.style.borderColor = '';
}, 800);
}, function(err) {
window.open(url, '_blank');
});
}
(function() {
const flashDeals = [
{ date: '04/01', day: '週三', time: '11:00', name: '曼谷:宋干節皮卡車體驗', promo: '現折$111 (碼:26SEA111)', url: 'https://www.kkday.com/zh-tw/product/570804' },
{ date: '04/01', day: '週三', time: '11:00', name: '新加坡環球影城 VIP 導覽', promo: '現折$111 (碼:26SEA111)', url: 'https://www.kkday.com/zh-tw/product/104637' },
{ date: '04/01', day: '週三', time: '15:00', name: '亞洲多國 5G eSIM (支援ChatGPT)', promo: '限量 12 元', url: 'https://www.kkday.com/zh-tw/product/533629' },
{ date: '04/01', day: '週三', time: '全日', name: '名古屋 5-6 天計畫機票', promo: '機票折$500 (碼:26TKT500)', url: 'https://www.kkday.com/zh-tw/product/151729' },{ date: '04/02', day: '週四', time: '11:00', name: '東京迪士尼樂園/海洋門票', promo: '現折$111 (碼:26JP111)', url: 'https://www.kkday.com/zh-tw/product/19252' },
{ date: '04/02', day: '週四', time: '11:00', name: 'Skyliner 京成電鐵車票', promo: '現折$111 (碼:26JP111)', url: 'https://www.kkday.com/zh-tw/product/7913' },
{ date: '04/02', day: '週四', time: '15:00', name: '日本 eSIM (KDDI原生高速)', promo: '限量 12 元', url: 'https://www.kkday.com/zh-tw/product/243815' },{ date: '04/03', day: '週五', time: '11:00', name: '六福村主題遊樂園門票', promo: '現折$111 (碼:26TW111)', url: 'https://www.kkday.com/zh-tw/product/6370' },
{ date: '04/03', day: '週五', time: '11:00', name: '宜蘭龜山島賞鯨半日遊', promo: '現折$111 (碼:26TW111)', url: 'https://www.kkday.com/zh-tw/product/5297' },
{ date: '04/03', day: '週五', time: '15:00', name: '日韓雙國 eSIM (原生網路)', promo: '限量 12 元', url: 'https://www.kkday.com/zh-tw/product/136436' },{ date: '04/04', day: '週六', time: '11:00', name: '瑞士旅行通行證 Swiss Travel Pass', promo: '現折$1,111 (碼:NE1111)', url: 'https://www.kkday.com/zh-tw/product/2524' },
{ date: '04/04', day: '週六', time: '15:00', name: '歐洲 eSIM 卡 (吃到飽方案)', promo: '限量 12 元', url: 'https://www.kkday.com/zh-tw/product/265187' },{ date: '04/05', day: '週日', time: '11:00', name: '西澳粉紅湖 3 日遊', promo: '現折$1,111 (碼:OC1111)', url: 'https://www.kkday.com/zh-tw/product/546905' },
{ date: '04/05', day: '週日', time: '15:00', name: '澳洲、紐西蘭 eSIM', promo: '限量 12 元', url: 'https://www.kkday.com/zh-tw/product/533532' }
];const cid = "9516";
const uniqueDates = [...new Set(flashDeals.map(item => item.date))];function getCalendarLink(deal) {
const dateStr = "2026" + deal.date.replace('/', '');
let timeStr = "110000", endTimeStr = "120000";
if(deal.time !== '全日') {
timeStr = deal.time.replace(':', '') + "00";
endTimeStr = String(parseInt(timeStr.substring(0,2)) + 1) + "0000";
}
const title = encodeURIComponent(`【KKday搶購】${deal.name}`);
const link = deal.url.includes('?') ? `${deal.url}&cid=${cid}` : `${deal.url}?cid=${cid}`;
const details = encodeURIComponent(`優惠:${deal.promo}\n搶購連結:${link}`);
return `https://www.google.com/calendar/render?action=TEMPLATE&text=${title}&dates=${dateStr}T${timeStr}/${dateStr}T${endTimeStr}&ctz=Asia/Taipei&details=${details}`;
}function renderList(date) {
const container = document.getElementById('ed-list-render');
const filtered = flashDeals.filter(d => d.date === date);
container.innerHTML = filtered.map(deal => `
<div class="ed-item">
<div class="ed-time-tag ${deal.time === '全日' ? 'allday' : ''}">${deal.time}</div>
<div class="ed-info">
<h4 class="ed-name">${deal.name}</h4>
<span class="ed-promo-highlight">${deal.promo}</span>
</div>
<div class="ed-actions">
<a href="${deal.url}?cid=${cid}" target="_blank" class="ed-btn ed-btn-buy">SHOP NOW 〉</a>
<a href="${getCalendarLink(deal)}" target="_blank" class="ed-btn ed-btn-cal">REMIND ME</a>
</div>
</div>
`).join('');document.querySelectorAll('.ed-tab').forEach(t => t.classList.toggle('active', t.dataset.date === date));
}// Init
const tabWrap = document.getElementById('ed-tabs-container');
uniqueDates.forEach((date, i) => {
const day = flashDeals.find(d => d.date === date).day;
const tab = document.createElement('div');
tab.className = 'ed-tab';
tab.dataset.date = date;
tab.innerHTML = `${date}<span>${day}</span>`;
tab.onclick = () => renderList(date);
tabWrap.appendChild(tab);
});
renderList(uniqueDates[0]);
})();
(function() {
const flashDealsW2 = [
// 📌 4/6
{ date: '04/06', day: '週一', time: '11:00', name: '香港太平山頂纜車/摩天台', promo: '現折$111 (碼:26CN111)', url: 'https://www.kkday.com/zh-tw/product/100640' },
{ date: '04/06', day: '週一', time: '15:00', name: '中國 5G eSIM (原生網路)', promo: '限量 12 元', url: 'https://www.kkday.com/zh-tw/product/208529' },
{ date: '04/06', day: '週一', time: '全日', name: '香港計畫機票|大灣區航空', promo: '機票折$500 (碼:26TKT500)', url: 'https://www.kkday.com/zh-tw/product/183478' },
// 📌 4/7
{ date: '04/07', day: '週二', time: '11:00', name: '首爾/釜山樂天世界門票', promo: '現折$111 (碼:26KR111)', url: 'https://www.kkday.com/zh-tw/product/2948' },
{ date: '04/07', day: '週二', time: '15:00', name: '韓國 eSIM (SK Telecom)', promo: '限量 12 元', url: 'https://www.kkday.com/zh-tw/product/248112' },
// 📌 4/8
{ date: '04/08', day: '週三', time: '11:00', name: '曼谷大象照護體驗', promo: '現折$111 (碼:26SEA111)', url: 'https://www.kkday.com/zh-tw/product/183443' },
{ date: '04/08', day: '週三', time: '15:00', name: '東南亞四國 eSIM 吃到飽', promo: '限量 12 元', url: 'https://www.kkday.com/zh-tw/product/267325' },
// 📌 4/9
{ date: '04/09', day: '週四', time: '11:00', name: '大阪周遊卡 (最新版)', promo: '現折$111 (碼:26JP111)', url: 'https://www.kkday.com/zh-tw/product/12156' },
{ date: '04/09', day: '週四', time: '15:00', name: '日本 5G eSIM 吃到飽', promo: '限量 12 元', url: 'https://www.kkday.com/zh-tw/product/263150' },
// 📌 4/10
{ date: '04/10', day: '週五', time: '11:00', name: '台北101觀景台門票', promo: '現折$111 (碼:26TW111)', url: 'https://www.kkday.com/zh-tw/product/8332' },
{ date: '04/10', day: '週五', time: '全日', name: '首爾/濟州/釜山計畫機票', promo: '機票折$500 (碼:26TKT500)', url: 'https://www.kkday.com/zh-tw/product/135911' },// 📌 4/11
{ date: '04/11', day: '週六', time: '11:00', name: '瑞士少女峰一日遊', promo: '現折$1,111 (碼:NE1111)', url: 'https://www.kkday.com/zh-tw/product/1304' },
{ date: '04/11', day: '週六', time: '11:00', name: '苗栗西湖渡假村', promo: '飯店折$555 (碼:HT555)', url: 'https://www.kkday.com/zh-tw/product/116824' },// 📌 4/12
{ date: '04/12', day: '週日', time: '11:00', name: '紐西蘭冰河直升機探險', promo: '現折$1,111 (碼:OC1111)', url: 'https://www.kkday.com/zh-tw/product/24632' },
{ date: '04/12', day: '週日', time: '11:00', name: 'Costa 歌詩達郵輪', promo: '郵輪折$1,111 (碼:CRU1111)', url: 'https://www.kkday.com/zh-tw/product/249993' }
];const cid = "9516";
const uniqueDatesW2 = [...new Set(flashDealsW2.map(item => item.date))];function getCalendarLinkW2(deal) {
const dateStr = "2026" + deal.date.replace('/', '');
let tStr = "110000", eStr = "120000";
if(deal.time !== '全日') {
tStr = deal.time.replace(':', '') + "00";
eStr = String(parseInt(tStr.substring(0,2)) + 1) + "0000";
}
const title = encodeURIComponent(`【KKday搶購】${deal.name}`);
const link = deal.url.includes('?') ? `${deal.url}&cid=${cid}` : `${deal.url}?cid=${cid}`;
return `https://www.google.com/calendar/render?action=TEMPLATE&text=${title}&dates=${dateStr}T${tStr}/${dateStr}T${eStr}&ctz=Asia/Taipei&details=${encodeURIComponent('代碼:'+deal.promo+'\n連結:'+link)}`;
}function renderListW2(date) {
const container = document.getElementById('list-render-w2');
const filtered = flashDealsW2.filter(d => d.date === date);
container.innerHTML = filtered.map(deal => `
<div class="item-w2">
<div class="time-tag-w2 ${deal.time === '全日' ? 'allday' : ''}">${deal.time}</div>
<div class="info-w2">
<h4 class="name-w2">${deal.name}</h4>
<span class="promo-highlight-w2">${deal.promo}</span>
</div>
<div class="actions-w2">
<a href="${deal.url}?cid=${cid}" target="_blank" class="btn-w2 btn-buy-w2">SHOP NOW 〉</a>
<a href="${getCalendarLinkW2(deal)}" target="_blank" class="btn-w2 btn-cal-w2">REMIND ME</a>
</div>
</div>
`).join('');
document.querySelectorAll('.tab-w2').forEach(t => t.classList.toggle('active', t.dataset.date === date));
}const tabWrap = document.getElementById('tabs-container-w2');
uniqueDatesW2.forEach((date) => {
const day = flashDealsW2.find(d => d.date === date).day;
const tab = document.createElement('div');
tab.className = 'tab-w2';
tab.dataset.date = date;
tab.innerHTML = `${date}<span>${day}</span>`;
tab.onclick = () => renderListW2(date);
tabWrap.appendChild(tab);
});
renderListW2(uniqueDatesW2[0]);
})();
(function() {
const flashDealsW3 = [
// 📌 4/13
{ date: '04/13', day: '週一', time: '11:00', name: '香港迪士尼樂園門票', promo: '現折$111 (碼:26CN111)', url: 'https://www.kkday.com/zh-tw/product/2301' },
{ date: '04/13', day: '週一', time: '15:00', name: '中港澳 eSIM (無限吃到飽)', promo: '限量 12 元', url: 'https://www.kkday.com/zh-tw/product/267330' },
{ date: '04/13', day: '週一', time: '全日', name: '北海道 6/7 天計畫機票|酷航', promo: '機票折$500 (碼:26TKT500)', url: 'https://www.kkday.com/zh-tw/product/135442' },// 📌 4/14
{ date: '04/14', day: '週二', time: '11:00', name: '仁川 / 金浦機場私人接送', promo: '現折$111 (碼:26KR111)', url: 'https://www.kkday.com/zh-tw/product/157235' },
{ date: '04/14', day: '週二', time: '15:00', name: '韓國 5G eSIM (自由配方案)', promo: '限量 12 元', url: 'https://www.kkday.com/zh-tw/product/265171' },// 📌 4/15
{ date: '04/15', day: '週三', time: '11:00', name: '越南下龍灣奢華郵輪體驗', promo: '現折$111 (碼:26SEA111)', url: 'https://www.kkday.com/zh-tw/product/284294' },
{ date: '04/15', day: '週三', time: '15:00', name: '越南 eSIM (Viettel原生5G)', promo: '限量 12 元', url: 'https://www.kkday.com/zh-tw/product/249518' },// 📌 4/16
{ date: '04/16', day: '週四', time: '11:00', name: '黑部立山開山二/三日遊', promo: '現折$111 (碼:26JP111)', url: 'https://www.kkday.com/zh-tw/product/158778' },
{ date: '04/16', day: '週四', time: '15:00', name: 'Docomo 原生 4G 日本 eSIM', promo: '限量 12 元', url: 'https://www.kkday.com/zh-tw/product/163781' },// 📌 4/17
{ date: '04/17', day: '週五', time: '11:00', name: '高雄義大遊樂世界門票', promo: '現折$111 (碼:26TW111)', url: 'https://www.kkday.com/zh-tw/product/8700' },
{ date: '04/17', day: '週五', time: '全日', name: '沖繩 4/5 天計畫機票|虎航', promo: '機票折$500 (碼:26TKT500)', url: 'https://www.kkday.com/zh-tw/product/143936' },// 📌 4/18
{ date: '04/18', day: '週六', time: '11:00', name: '英國蘇格蘭高地三天兩夜', promo: '現折$1,111 (碼:NE1111)', url: 'https://www.kkday.com/zh-tw/product/136421' },
{ date: '04/18', day: '週六', time: '11:00', name: '澳門雅辰酒店 Artyzen', promo: '飯店折$555 (碼:HT555)', url: 'https://www.kkday.com/zh-tw/product/141865' },// 📌 4/19
{ date: '04/19', day: '週日', time: '11:00', name: '魔戒哈比村/螢火蟲洞一日遊', promo: '現折$1,111 (碼:OC1111)', url: 'https://www.kkday.com/zh-tw/product/165791' },
{ date: '04/19', day: '週日', time: '11:00', name: 'MSC地中海郵輪榮耀號', promo: '郵輪折$1,111 (碼:CRU1111)', url: 'https://www.kkday.com/zh-tw/product/150465' }
];const cid = "9516";
const uniqueDatesW3 = [...new Set(flashDealsW3.map(item => item.date))];function getCalendarLinkW3(deal) {
const dateStr = "2026" + deal.date.replace('/', '');
let tStr = "110000", eStr = "120000";
if(deal.time !== '全日') {
tStr = deal.time.replace(':', '') + "00";
eStr = String(parseInt(tStr.substring(0,2)) + 1) + "0000";
}
const title = encodeURIComponent(`【KKday搶購】${deal.name}`);
const link = deal.url.includes('?') ? `${deal.url}&cid=${cid}` : `${deal.url}?cid=${cid}`;
return `https://www.google.com/calendar/render?action=TEMPLATE&text=${title}&dates=${dateStr}T${tStr}/${dateStr}T${eStr}&ctz=Asia/Taipei&details=${encodeURIComponent('折扣碼:'+deal.promo+'\n網址:'+link)}`;
}function renderListW3(date) {
const container = document.getElementById('list-render-w3');
const filtered = flashDealsW3.filter(d => d.date === date);
container.innerHTML = filtered.map(deal => `
<div class="item-w3">
<div class="time-tag-w3 ${deal.time === '全日' ? 'allday' : ''}">${deal.time}</div>
<div class="info-w3">
<h4 class="name-w3">${deal.name}</h4>
<span class="promo-highlight-w3">${deal.promo}</span>
</div>
<div class="actions-w3">
<a href="${deal.url}?cid=${cid}" target="_blank" class="btn-w3 btn-buy-w3">SHOP NOW 〉</a>
<a href="${getCalendarLinkW3(deal)}" target="_blank" class="btn-w3 btn-cal-w3">REMIND ME</a>
</div>
</div>
`).join('');
document.querySelectorAll('.tab-w3').forEach(t => t.classList.toggle('active', t.dataset.date === date));
}const tabWrap = document.getElementById('tabs-container-w3');
uniqueDatesW3.forEach((date) => {
const day = flashDealsW3.find(d => d.date === date).day;
const tab = document.createElement('div');
tab.className = 'tab-w3';
tab.dataset.date = date;
tab.innerHTML = `${date}<span>${day}</span>`;
tab.onclick = () => renderListW3(date);
tabWrap.appendChild(tab);
});
renderListW3(uniqueDatesW3[0]);
})();
(function() {
const flashDealsW3 = [
// 📌 4/13
{ date: '04/13', day: '週一', time: '11:00', name: '香港迪士尼樂園門票', promo: '現折$111 (碼:26CN111)', url: 'https://www.kkday.com/zh-tw/product/2301' },
{ date: '04/13', day: '週一', time: '15:00', name: '中港澳 eSIM (無限吃到飽)', promo: '限量 12 元', url: 'https://www.kkday.com/zh-tw/product/267330' },
{ date: '04/13', day: '週一', time: '全日', name: '北海道 6/7 天計畫機票|酷航', promo: '機票折$500 (碼:26TKT500)', url: 'https://www.kkday.com/zh-tw/product/135442' },// 📌 4/14
{ date: '04/14', day: '週二', time: '11:00', name: '仁川 / 金浦機場私人接送', promo: '現折$111 (碼:26KR111)', url: 'https://www.kkday.com/zh-tw/product/157235' },
{ date: '04/14', day: '週二', time: '15:00', name: '韓國 5G eSIM (自由配方案)', promo: '限量 12 元', url: 'https://www.kkday.com/zh-tw/product/265171' },// 📌 4/15
{ date: '04/15', day: '週三', time: '11:00', name: '越南下龍灣奢華郵輪體驗', promo: '現折$111 (碼:26SEA111)', url: 'https://www.kkday.com/zh-tw/product/284294' },
{ date: '04/15', day: '週三', time: '15:00', name: '越南 eSIM (Viettel原生5G)', promo: '限量 12 元', url: 'https://www.kkday.com/zh-tw/product/249518' },// 📌 4/16
{ date: '04/16', day: '週四', time: '11:00', name: '黑部立山開山二/三日遊', promo: '現折$111 (碼:26JP111)', url: 'https://www.kkday.com/zh-tw/product/158778' },
{ date: '04/16', day: '週四', time: '15:00', name: 'Docomo 原生 4G 日本 eSIM', promo: '限量 12 元', url: 'https://www.kkday.com/zh-tw/product/163781' },// 📌 4/17
{ date: '04/17', day: '週五', time: '11:00', name: '高雄義大遊樂世界門票', promo: '現折$111 (碼:26TW111)', url: 'https://www.kkday.com/zh-tw/product/8700' },
{ date: '04/17', day: '週五', time: '全日', name: '沖繩 4/5 天計畫機票|虎航', promo: '機票折$500 (碼:26TKT500)', url: 'https://www.kkday.com/zh-tw/product/143936' },// 📌 4/18
{ date: '04/18', day: '週六', time: '11:00', name: '英國蘇格蘭高地三天兩夜', promo: '現折$1,111 (碼:NE1111)', url: 'https://www.kkday.com/zh-tw/product/136421' },
{ date: '04/18', day: '週六', time: '11:00', name: '澳門雅辰酒店 Artyzen', promo: '飯店折$555 (碼:HT555)', url: 'https://www.kkday.com/zh-tw/product/141865' },// 📌 4/19
{ date: '04/19', day: '週日', time: '11:00', name: '魔戒哈比村/螢火蟲洞一日遊', promo: '現折$1,111 (碼:OC1111)', url: 'https://www.kkday.com/zh-tw/product/165791' },
{ date: '04/19', day: '週日', time: '11:00', name: 'MSC地中海郵輪榮耀號', promo: '郵輪折$1,111 (碼:CRU1111)', url: 'https://www.kkday.com/zh-tw/product/150465' }
];const cid = "9516";
const uniqueDatesW3 = [...new Set(flashDealsW3.map(item => item.date))];function getCalendarLinkW3(deal) {
const dateStr = "2026" + deal.date.replace('/', '');
let tStr = "110000", eStr = "120000";
if(deal.time !== '全日') {
tStr = deal.time.replace(':', '') + "00";
eStr = String(parseInt(tStr.substring(0,2)) + 1) + "0000";
}
const title = encodeURIComponent(`【KKday搶購】${deal.name}`);
const link = deal.url.includes('?') ? `${deal.url}&cid=${cid}` : `${deal.url}?cid=${cid}`;
return `https://www.google.com/calendar/render?action=TEMPLATE&text=${title}&dates=${dateStr}T${tStr}/${dateStr}T${eStr}&ctz=Asia/Taipei&details=${encodeURIComponent('折扣碼:'+deal.promo+'\n網址:'+link)}`;
}function renderListW3(date) {
const container = document.getElementById('list-render-w3');
const filtered = flashDealsW3.filter(d => d.date === date);
container.innerHTML = filtered.map(deal => `
<div class="item-w3">
<div class="time-tag-w3 ${deal.time === '全日' ? 'allday' : ''}">${deal.time}</div>
<div class="info-w3">
<h4 class="name-w3">${deal.name}</h4>
<span class="promo-highlight-w3">${deal.promo}</span>
</div>
<div class="actions-w3">
<a href="${deal.url}?cid=${cid}" target="_blank" class="btn-w3 btn-buy-w3">SHOP NOW 〉</a>
<a href="${getCalendarLinkW3(deal)}" target="_blank" class="btn-w3 btn-cal-w3">REMIND ME</a>
</div>
</div>
`).join('');
document.querySelectorAll('.tab-w3').forEach(t => t.classList.toggle('active', t.dataset.date === date));
}const tabWrap = document.getElementById('tabs-container-w3');
uniqueDatesW3.forEach((date) => {
const day = flashDealsW3.find(d => d.date === date).day;
const tab = document.createElement('div');
tab.className = 'tab-w3';
tab.dataset.date = date;
tab.innerHTML = `${date}<span>${day}</span>`;
tab.onclick = () => renderListW3(date);
tabWrap.appendChild(tab);
});
renderListW3(uniqueDatesW3[0]);
})();
(function() {
const flashDealsW5 = [
// 📌 4/27
{ date: '04/27', day: '週一', time: '11:00', name: '香港 Fun Pass (含多景點門票)', promo: '現折$111 (碼:26CN111)', url: 'https://www.kkday.com/zh-tw/product/266440' },
{ date: '04/27', day: '週一', time: '15:00', name: '中港澳免翻牆 5G eSIM', promo: '限量 12 元', url: 'https://www.kkday.com/zh-tw/product/141764' },
{ date: '04/27', day: '週一', time: '全日', name: '沖繩 4 天計畫機票|亞航', promo: '機票折$500 (碼:26TKT500)', url: 'https://www.kkday.com/zh-tw/product/154601' },// 📌 4/28
{ date: '04/28', day: '週二', time: '11:00', name: '首爾 Wild Wild 猛男秀', promo: '現折$111 (碼:26KR111)', url: 'https://www.kkday.com/zh-tw/product/119270' },
{ date: '04/28', day: '週二', time: '11:00', name: '濟州 ARTE MUSEUM 門票', promo: '現折$111 (碼:26KR111)', url: 'https://www.kkday.com/zh-tw/product/103871' },
{ date: '04/28', day: '週二', time: '15:00', name: '韓國上網 eSIM 吃到飽', promo: '限量 12 元', url: 'https://www.kkday.com/zh-tw/product/138273' },// 📌 4/29
{ date: '04/29', day: '週三', time: '11:00', name: '泰國機場包車接送 (BKK/DMK)', promo: '現折$111 (碼:26SEA111)', url: 'https://www.kkday.com/zh-tw/product/18945' },
{ date: '04/29', day: '週三', time: '15:00', name: '新馬泰越印五國 eSIM', promo: '限量 12 元', url: 'https://www.kkday.com/zh-tw/product/154313' },// 📌 4/30
{ date: '04/30', day: '週四', time: '11:00', name: '大阪/京都/奈良包車一日遊', promo: '現折$111 (碼:26JP111)', url: 'https://www.kkday.com/zh-tw/product/133661' },
{ date: '04/30', day: '週四', time: '11:00', name: '成田/羽田機場專車接送', promo: '現折$111 (碼:26JP111)', url: 'https://www.kkday.com/zh-tw/product/174325' },
{ date: '04/30', day: '週四', time: '15:00', name: '日本 eSIM (Softbank雙網)', promo: '限量 12 元', url: 'https://www.kkday.com/zh-tw/product/154783' }
];const cid = "9516";
const uniqueDatesW5 = [...new Set(flashDealsW5.map(item => item.date))];function getCalendarLinkW5(deal) {
const dateStr = "2026" + deal.date.replace('/', '');
let tStr = "110000", eStr = "120000";
if(deal.time !== '全日') {
tStr = deal.time.replace(':', '') + "00";
eStr = String(parseInt(tStr.substring(0,2)) + 1) + "0000";
}
const title = encodeURIComponent(`【KKday月底搶購】${deal.name}`);
const link = deal.url.includes('?') ? `${deal.url}&cid=${cid}` : `${deal.url}?cid=${cid}`;
return `https://www.google.com/calendar/render?action=TEMPLATE&text=${title}&dates=${dateStr}T${tStr}/${dateStr}T${eStr}&ctz=Asia/Taipei&details=${encodeURIComponent('代碼:'+deal.promo+'\n連結:'+link)}`;
}function renderListW5(date) {
const container = document.getElementById('list-render-w5');
const filtered = flashDealsW5.filter(d => d.date === date);
container.innerHTML = filtered.map(deal => `
<div class="item-w5">
<div class="time-tag-w5 ${deal.time === '全日' ? 'allday' : ''}">${deal.time}</div>
<div class="info-w5">
<h4 class="name-w5">${deal.name}</h4>
<span class="promo-highlight-w5">${deal.promo}</span>
</div>
<div class="actions-w5">
<a href="${deal.url}?cid=${cid}" target="_blank" class="btn-w5 btn-buy-w5">SHOP NOW 〉</a>
<a href="${getCalendarLinkW5(deal)}" target="_blank" class="btn-w5 btn-cal-w5">REMIND ME</a>
</div>
</div>
`).join('');
document.querySelectorAll('.tab-w5').forEach(t => t.classList.toggle('active', t.dataset.date === date));
}const tabWrap = document.getElementById('tabs-container-w5');
uniqueDatesW5.forEach((date) => {
const day = flashDealsW5.find(d => d.date === date).day;
const tab = document.createElement('div');
tab.className = 'tab-w5';
tab.dataset.date = date;
tab.innerHTML = `${date}<span>${day}</span>`;
tab.onclick = () => renderListW5(date);
tabWrap.appendChild(tab);
});
renderListW5(uniqueDatesW5[0]);
})();
(function () {
// FAQ Data
var faqs = [
{ q: 'KKday 折扣碼要在哪裡輸入?', a: '在 KKday 結帳頁面的付款資訊上方,點選「使用折扣碼」或「輸入優惠碼」欄位,填入代碼並套用即可。' },
{ q: '為什麼我的折扣碼顯示不適用?', a: '常見原因包括該碼已過期、商品非適用範圍(如機票、部分特價票券)、或您的帳號已曾使用過該次活動代碼。' },
{ q: '新戶折扣碼和舊戶可以用同一個嗎?', a: '通常不共用。新戶代碼(如 APP90)折扣力度較強,僅限首購;舊戶代碼則多為滿額折抵或指定商品促銷。' }
];var faqContainer = document.getElementById('kks-faq-render');
faqs.forEach(function (item) {
var el = document.createElement('div');
el.className = 'kks-faq-item';
el.innerHTML = '<button class="kks-faq-q">' + item.q + '<span class="kks-faq-icon">+</span></button>' +
'<div class="kks-faq-a"><div class="kks-faq-a-inner">' + item.a + '</div></div>';
el.querySelector('.kks-faq-q').onclick = function() { el.classList.toggle('open'); };
faqContainer.appendChild(el);
});// Related Data (Keeping existing structure)
var related = [
{ icon: '🇯🇵', title: '大阪勝尾寺攻略', desc: '門票、交通巴士完整整理', href: 'https://2p4c.tw/world/japan-travel/%E5%A4%A7%E9%98%AA%E6%99%AF%E9%BB%9E%E5%8B%9D%E5%B0%BE%E5%AF%BA/' },
{ icon: '🌊', title: '福岡糸島一日遊', desc: '最美海岸線與咖啡廳指南', href: 'https://2p4c.tw/world/itoshima-shi/' },
{ icon: '🚢', title: '越南下龍灣攻略', desc: '郵輪路線與天數建議', href: 'https://2p4c.tw/world/halongbay/' },
{ icon: '🏜️', title: '美國羚羊峽谷', desc: '訂票、拍照與防雷提醒', href: 'https://2p4c.tw/world/%e7%be%9a%e7%be%8a%e5%b3%bd%e8%b0%b7/' }
];var relatedContainer = document.getElementById('kks-related-render');
related.forEach(function (item) {
var a = document.createElement('a');
a.className = 'kks-related-card';
a.href = item.href;
a.innerHTML = '<span class="kks-related-icon">' + item.icon + '</span><div><span class="kks-related-title">' + item.title + '</span><p class="kks-related-desc">' + item.desc + '</p></div>';
relatedContainer.appendChild(a);
});
})();
document.getElementById( "ak_js_1" ).setAttribute( "value", ( new Date() ).getTime() );
document.addEventListener('DOMContentLoaded', function() {var links = document.querySelectorAll('link[rel="alternate"][hreflang]');
var targetUrl = null;
var targetText = null;var isEnglish = window.location.pathname.indexOf('/en/') !== -1;
var currentLang = isEnglish ? 'en' : 'zh-TW';links.forEach(function(link) {
var lang = link.getAttribute('hreflang');
var href = link.getAttribute('href');
if (!href || lang === 'x-default') return;if (currentLang === 'zh-TW' && lang === 'en') {
targetUrl = href;
targetText = 'EN';
} else if (currentLang === 'en' && (lang === 'zh-TW' || lang === 'zh')) {
targetUrl = href;
targetText = '中';
}
});if (!targetUrl) return;var btn = document.createElement('a');
btn.className = 'p4c-lang-float';
btn.href = targetUrl;
btn.title = currentLang === 'zh-TW' ? 'Read in English' : '閱讀中文版本';
btn.textContent = targetText;
btn.style.display = 'flex';document.body.appendChild(btn);
});
function genesisBlocksShare( url, title, w, h ){
var left = ( window.innerWidth / 2 )-( w / 2 );
var top = ( window.innerHeight / 2 )-( h / 2 );
return window.open(url, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=600, height=600, top='+top+', left='+left);
}
var ConverlyCustomData = {channelId: null};
const loadScriptsTimer=setTimeout(loadScripts,5*1000);const userInteractionEvents=['click', 'mousemove', 'keydown', 'touchstart', 'touchmove', 'wheel'];userInteractionEvents.forEach(function(event){window.addEventListener(event,triggerScriptLoader,{passive:!0})});function triggerScriptLoader(){loadScripts();clearTimeout(loadScriptsTimer);userInteractionEvents.forEach(function(event){window.removeEventListener(event,triggerScriptLoader,{passive:!0})})}
function loadScripts(){document.querySelectorAll("script[data-type='lazy']").forEach(function(elem){elem.setAttribute("src",elem.getAttribute("data-src"))})}
var rtocScrollAnimation = {"rtocScrollAnimation":"on"};
var rtocBackButton = {"rtocBackButton":"off"};
var rtocBackDisplayPC = {"rtocBackDisplayPC":""};
var rtocOpenText = {"rtocOpenText":"OPEN"};
var rtocCloseText = {"rtocCloseText":"CLOSE"};
//# sourceURL=rtoc_js-js-extra
https://2p4c.tw/wp-content/plugins/rich-table-of-content/js/rtoc_common.js
https://2p4c.tw/wp-content/plugins/rich-table-of-content/js/rtoc_scroll.js
https://2p4c.tw/wp-content/plugins/rich-table-of-content/js/rtoc_highlight.js
https://2p4c.tw/wp-content/plugins/genesis-blocks/dist/assets/js/dismiss.js
https://2p4c.tw/wp-content/plugins/breeze/assets/js/js-front-end/breeze-lazy-load.min.js
function breezeInitLazyLoad() {
window.lazyLoadInstance = new LazyLoad({
elements_selector: ".br-lazy",
data_src: "breeze",
data_srcset: "brsrcset",
data_sizes: "brsizes",
class_loaded: "br-loaded",
threshold: 300,
});
}
if (document.readyState === "loading") {
document.addEventListener("DOMContentLoaded", breezeInitLazyLoad);
} else {
breezeInitLazyLoad();
}
//# sourceURL=breeze-lazy-js-after
var csLocalize = {"siteSchemeMode":"light","siteSchemeToogle":""};
//# sourceURL=csco-scripts-js-extra
https://2p4c.tw/wp-content/themes/swyft/assets/js/scripts.js
https://2p4c.tw/wp-content/themes/swyft/assets/static/js/comment-reply.js
https://2p4c.tw/wp-content/plugins/akismet/_inc/akismet-frontend.js
window.addEventListener("DOMContentLoaded",(e=>{document.querySelectorAll('img[loading="lazy"]').forEach((e=>{e.getBoundingClientRect().top<=window.innerHeight&&(e.loading="eager")}))}));
const loadScriptsTimer=setTimeout(loadScripts,5*1000);const userInteractionEvents=["mouseover","keydown","touchstart","touchmove","wheel"];userInteractionEvents.forEach(function(event){window.addEventListener(event,triggerScriptLoader,{passive:!0})});function triggerScriptLoader(){loadScripts();clearTimeout(loadScriptsTimer);userInteractionEvents.forEach(function(event){window.removeEventListener(event,triggerScriptLoader,{passive:!0})})}function loadScripts(){document.querySelectorAll("script,iframe[data-type='lazy']").forEach(function(elem){elem.setAttribute("src",elem.getAttribute("data-src"))})}
document.addEventListener("DOMContentLoaded", function () {
const firstSlideImg = document.querySelector(
".cs-hero-type-1_item[data-swiper-slide-index='0'] img"
);if (firstSlideImg) {
firstSlideImg.loading = "eager"; // 讓它成為優先載入圖
firstSlideImg.decoding = "async";
firstSlideImg.removeAttribute("loading"); // 確保 lazy 被移除
}
});