박문호의 자연과학 세상 · 게시판
인상깊었던 몽골 노래 감상
작성자 신양수
작성일 2012.09.05
원문 · https://new.mhpark.or.kr/board/freeboard/2027
신양수
👤 프로필
📅 2012.09.05 18:45
👁️ 13,160
💬 3
안녕하세요
몽골 탐사에 가셨던 분들에게 남아 있는 인상적인 기억이 하나 있지요...
마지막날 울란바타르 식당의 만찬 자리에서, 스타렉스를 운전해주셨던 바트라 아저씨가 불렀던
몽골 노래 말입니다. 여러분들이 말씀하셔서 기록을 찾아보니, 다행히 임지용님이 촬영해 놓은
동영상이 있어 업로드 하오니, 다시 한번 감상해 보시기 바랍니다.
',
'VIDEO ',
'
'
].join('');
}
);
const walker = document.createTreeWalker(
article,
NodeFilter.SHOW_TEXT,
{
acceptNode(node) {
const parent = node.parentElement;
if (
!parent ||
parent.closest(
'a, iframe, script, style, pre, code, textarea, ' +
'.youtube-player-wrap'
)
) {
return NodeFilter.FILTER_REJECT;
}
return /https?:\/\/[^\s<>"']+/i.test(node.nodeValue)
? NodeFilter.FILTER_ACCEPT
: NodeFilter.FILTER_REJECT;
}
}
);
const nodes = [];
while (walker.nextNode()) {
nodes.push(walker.currentNode);
}
nodes.forEach(function (node) {
const fragment = document.createDocumentFragment();
const parts = node.nodeValue.split(/(https?:\/\/[^\s<>"']+)/gi);
parts.forEach(function (part) {
if (!/^https?:\/\//i.test(part)) {
fragment.appendChild(document.createTextNode(part));
return;
}
const trailingMatch = part.match(/[.,!?;:)\]}]+$/);
const trailing = trailingMatch ? trailingMatch[0] : '';
const url = trailing ? part.slice(0, -trailing.length) : part;
const link = document.createElement('a');
link.href = url;
link.textContent = url;
link.target = '_blank';
link.rel = 'noopener noreferrer';
link.className = 'article-auto-link';
fragment.appendChild(link);
if (trailing) {
fragment.appendChild(document.createTextNode(trailing));
}
});
node.replaceWith(fragment);
});
// Run after legacy iframe restoration and automatic link conversion.
document.querySelectorAll('#print-article iframe').forEach(function (iframe) {
let url;
try { url = new URL(iframe.getAttribute('src'), window.location.href); }
catch (error) { return; }
if (!['www.youtube.com', 'youtube.com', 'www.youtube-nocookie.com', 'youtube-nocookie.com'].includes(url.hostname)) return;
const match = url.pathname.match(/^\/embed\/([a-zA-Z0-9_-]+)$/);
if (!match) return;
let wrap = iframe.closest('.youtube-player-wrap');
if (!wrap) {
wrap = document.createElement('div');
wrap.className = 'youtube-player-wrap';
iframe.before(wrap);
wrap.appendChild(iframe);
}
// Flatten old saved wrappers as well as wrappers generated by earlier code.
while (wrap.parentElement && wrap.parentElement.classList.contains('youtube-player-wrap')) {
const parent = wrap.parentElement;
wrap.replaceWith(...wrap.childNodes);
wrap = parent;
}
if (wrap.nextElementSibling?.classList.contains('youtube-watch-actions')) return;
const actions = document.createElement('div');
actions.className = 'youtube-watch-actions';
const link = document.createElement('a');
const watch = new URL('https://www.youtube.com/watch');
watch.searchParams.set('v', match[1]);
if (url.searchParams.has('list')) watch.searchParams.set('list', url.searchParams.get('list'));
if (/^\d+$/.test(url.searchParams.get('start') || '')) watch.searchParams.set('t', url.searchParams.get('start') + 's');
link.href = watch.href;
link.target = '_blank';
link.rel = 'noopener noreferrer';
link.textContent = 'YouTube에서 보기 ↗';
link.setAttribute('aria-label', (iframe.title || '영상') + ' — YouTube에서 보기 (새 창)');
actions.appendChild(link);
wrap.after(actions);
});
});
💬 댓글 3개