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 () {
'use strict';var BASE = 'https://affiliate.klook.com/redirect?aid=5797&aff_adid=1245259&k_site=';function affiliateUrl(destination) {
return BASE + encodeURIComponent(destination);
}var DATA = {
lastVerified: '2026/07/29',
top3: [
{
rank: 1,
badge: 'BEST CASH SAVING',
name: '星展全站滿額折 NT$450',
desc: '全站商品單筆滿 NT$3,000,現折 NT$450。',
note: '限星展銀行卡友;限量,以結帳結果為準。',
code: 'DBS2645008',
url: affiliateUrl('https://www.klook.com/zh-TW/')
},
{
rank: 2,
badge: 'HOTEL DEAL',
name: '新光 Visa 海外飯店 75 折',
desc: '海外飯店最高 75 折,最高折抵 NT$800。',
note: '限指定新光三越聯名 Visa 卡。',
code: 'VSKBHOT267508',
url: affiliateUrl('https://www.klook.com/zh-TW/hotels/')
},
{
rank: 3,
badge: 'EASY TO USE',
name: 'Visa 海外商品 92 折',
desc: 'Klook 海外商品 92 折,最高折抵依活動頁規則。',
note: '每月限量;須使用符合資格的 Visa 卡。',
code: 'VISA269208',
url: affiliateUrl('https://www.klook.com/zh-TW/')
}
],
transport: [
{
target: '全球體驗/交通',
desc: '聯邦銀行卡友 85 折,最高折抵 NT$250。',
discount: '85',
unit: '折',
code: 'UBOTTM2625008',
url: affiliateUrl('https://www.klook.com/zh-TW/')
},
{
target: '日本新幹線',
desc: '玉山銀行卡友 88 折,最高折抵 NT$300。',
discount: '88',
unit: '折',
code: 'ESUNSKS2688',
url: affiliateUrl('https://www.klook.com/zh-TW/japan-rail/')
},
{
target: '海外一日遊',
desc: '台新銀行卡友 85 折,最高折抵 NT$200。',
discount: '85',
unit: '折',
code: 'TSBTU2608',
url: affiliateUrl('https://www.klook.com/zh-TW/')
},
{
target: '韓國鐵路',
desc: '富邦 J 卡 75 折,最高折抵 NT$200。',
discount: '75',
unit: '折',
code: 'JCARDKR7508',
url: affiliateUrl('https://www.klook.com/zh-TW/rails-32/1010-south-korea/')
}
],
creditCards: [
{
name: '華南銀行',
desc: '海外全商品 95 折',
code: 'HUWNAN269508',
note: '8 月批次',
url: affiliateUrl('https://www.klook.com/zh-TW/')
},
{
name: '聯邦銀行',
desc: '海外全商品 95 折',
code: 'UBOT269508',
note: '8 月批次',
url: affiliateUrl('https://www.klook.com/zh-TW/')
},
{
name: '第一銀行',
desc: '全球飯店 85 折,最高折 NT$400',
code: 'FCBHOT268508',
note: '8 月批次',
url: affiliateUrl('https://www.klook.com/zh-TW/hotels/')
},
{
name: '玉山銀行',
desc: '海外全商品 95 折',
code: 'ESUN269508',
note: '8 月批次',
url: affiliateUrl('https://www.klook.com/zh-TW/')
},
{
name: '星展銀行',
desc: '滿 NT$3,000 折 NT$450',
code: 'DBS2645008',
note: '8 月批次',
url: affiliateUrl('https://www.klook.com/zh-TW/')
},
{
name: '國泰世華 CUBE',
desc: '指定熱門景點/樂園 95 折,最高折 NT$140',
code: 'CUBETTD9508',
note: '8 月批次',
url: affiliateUrl('https://www.klook.com/zh-TW/')
},
{
name: 'Visa',
desc: '海外商品 92 折',
code: 'VISA269208',
note: '8 月批次',
url: affiliateUrl('https://www.klook.com/zh-TW/')
},
{
name: 'AFTEE 先享後付',
desc: '海外全商品 95 折',
code: 'AFTEE269508',
note: '8 月批次',
url: affiliateUrl('https://www.klook.com/zh-TW/')
},
{
name: '富邦 J 卡',
desc: '指定星野集團飯店 9 折,最高折 NT$500',
code: 'JCARDHO0908',
note: '8 月批次',
url: affiliateUrl('https://www.klook.com/zh-TW/hotels/')
},
{
name: '中國信託華航卡',
desc: '海外飯店 8 折,最高折 NT$1,000',
code: 'CTBCCIHOT262H8',
note: '限指定卡別',
url: affiliateUrl('https://www.klook.com/zh-TW/hotels/')
}
]
};function fallbackCopy(text) {
var textarea = document.createElement('textarea');
textarea.value = text;
textarea.setAttribute('readonly', '');
textarea.style.position = 'fixed';
textarea.style.opacity = '0';
textarea.style.pointerEvents = 'none';
document.body.appendChild(textarea);
textarea.select();try {
document.execCommand('copy');
} finally {
document.body.removeChild(textarea);
}
}function writeClipboard(text) {
if (navigator.clipboard && window.isSecureContext) {
return navigator.clipboard.writeText(text);
}return new Promise(function (resolve, reject) {
try {
fallbackCopy(text);
resolve();
} catch (error) {
reject(error);
}
});
}function copyAndGo(code, url, button) {
var originalText = button.textContent;writeClipboard(code)
.then(function () {
button.textContent = 'COPIED ✓';
button.classList.add('is-copied');setTimeout(function () {
window.open(url, '_blank', 'noopener,noreferrer');
button.textContent = originalText;
button.classList.remove('is-copied');
}, 450);
})
.catch(function () {
window.open(url, '_blank', 'noopener,noreferrer');
});
}function createButton(code, url, className, label) {
var button = document.createElement('button');
button.type = 'button';
button.className = className;
button.textContent = label || ('COPY CODE: ' + code);
button.dataset.code = code;
button.dataset.url = url;
return button;
}document.getElementById('kl-date').textContent = DATA.lastVerified;var top3Grid = document.getElementById('kl-top3-grid');
DATA.top3.forEach(function (item) {
var card = document.createElement('div');
card.className = 'kl-top3-card';card.innerHTML =
'<div class="kl-rank-num">' + item.rank + '</div>' +
'<span class="kl-badge-mini">' + item.badge + '</span>' +
'<h3>' + item.name + '</h3>' +
'<p>' + item.desc + '</p>' +
'<small class="kl-card-note">' + item.note + '</small>';card.appendChild(
createButton(item.code, item.url, 'kl-copy-btn', 'COPY CODE: ' + item.code)
);
top3Grid.appendChild(card);
});var transGrid = document.getElementById('kl-trans-grid');
DATA.transport.forEach(function (item) {
var card = document.createElement('div');
card.className = 'kl-card-item';card.innerHTML =
'<div class="kl-discount-val">' +
'<span class="num">' + item.discount + '</span>' +
'<span class="unit">' + item.unit + '</span>' +
'</div>' +
'<div class="kl-card-info">' +
'<h4>' + item.target + '</h4>' +
'<p>' + item.desc + '</p>' +
'</div>';card.appendChild(
createButton(item.code, item.url, 'kl-copy-btn', 'COPY: ' + item.code)
);
transGrid.appendChild(card);
});var tbody = document.getElementById('kl-table-body');
DATA.creditCards.forEach(function (item) {
var row = document.createElement('tr');var nameCell = document.createElement('td');
nameCell.innerHTML = '<strong>' + item.name + '</strong>';var descCell = document.createElement('td');
descCell.textContent = item.desc;var codeCell = document.createElement('td');
codeCell.appendChild(
createButton(item.code, item.url, 'kl-tbl-btn', item.code)
);var noteCell = document.createElement('td');
noteCell.textContent = item.note;row.appendChild(nameCell);
row.appendChild(descCell);
row.appendChild(codeCell);
row.appendChild(noteCell);
tbody.appendChild(row);
});document.querySelector('.kl-editorial-wrap').addEventListener('click', function (event) {
var button = event.target.closest('[data-code][data-url]');
if (!button) return;copyAndGo(button.dataset.code, button.dataset.url, button);
});
})();
(function () {
// FAQ Data
var faqs = [
{ q: 'Klook 折扣碼要在哪裡輸入?', a: '在 Klook 結帳頁面,點選「輸入優惠碼」欄位,貼上折扣碼後按「套用」即可反映在總金額。' },
{ q: '折扣碼顯示「不適用」怎麼辦?', a: '常見原因包含:該碼已過期、商品不在適用範圍、或您的帳號已使用過同一優惠。' },
{ q: 'App 專屬碼和網頁版有差嗎?', a: '有差。部分折扣碼僅限 App 使用,App 內的專屬活動通常能提供更高的折扣力道。' }
];var faqContainer = document.getElementById('kls-faq-render');
faqs.forEach(function (item) {
var el = document.createElement('div');
el.className = 'kls-faq-item';
el.innerHTML = '<button class="kls-faq-q">' + item.q + '<span class="kls-faq-icon">+</span></button>' +
'<div class="kls-faq-a"><div class="kls-faq-a-inner">' + item.a + '</div></div>';
el.querySelector('.kls-faq-q').onclick = function() { el.classList.toggle('open'); };
faqContainer.appendChild(el);
});// Related Data
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('kls-related-render');
related.forEach(function (item) {
var a = document.createElement('a');
a.className = 'kls-related-card';
a.href = item.href;
a.innerHTML = '<span class="kls-related-icon">' + item.icon + '</span><div><span class="kls-related-title">' + item.title + '</span><p class="kls-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
document.addEventListener("DOMContentLoaded", function () {
if ( "function" !== typeof window.LazyLoad && "function" !== typeof LazyLoad ) {
return;
}var breezeLazyLoad = window.LazyLoad || LazyLoad;window.lazyLoadInstance = new breezeLazyLoad({
elements_selector: ".br-lazy",
data_src: "breeze",
data_srcset: "brsrcset",
data_sizes: "brsizes",
class_loaded: "br-loaded",
threshold: 300,
});
});
//# 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 被移除
}
});