Contact & Location
熊本大学生命資源研究支援センター 機能ゲノミクス分野
〒860-0811 熊本市中央区本荘 2-2-1 遺伝子実験施設 6階 606 号室
TEL: 096-373-6501
遺伝子実験施設はキャンパスマップ 23番 の建物です。
document.addEventListener(“DOMContentLoaded”, function () {
var emailNodes = document.querySelectorAll(“.js-email-copy”);
var emailMap = window.OKILAB_EMAILS || {};
function copyText(text) {
if (navigator.clipboard && navigator.clipboard.writeText) {
return navigator.clipboard.writeText(text);
}
return new Promise(function (resolve, reject) {
var textarea = document.createElement(“textarea”);
textarea.value = text;
textarea.style.position = “fixed”;
textarea.style.opacity = “0”;
document.body.appendChild(textarea);
textarea.focus();
textarea.select();
try {
var ok = document.execCommand(“copy”);
document.body.removeChild(textarea);
ok ? resolve() : reject(new Error(“copy failed”));
} catch (err) {
document.body.removeChild(textarea);
reject(err);
}
});
}
emailNodes.forEach(function (node) {
var id = node.getAttribute(“data-email-id”);
if (!id || !emailMap[id] || !emailMap[id].user || !emailMap[id].domain) {
node.textContent = “E-mail”;
return;
}
var email = emailMap[id].user + “@” + emailMap[id].domain;
node.textContent = “E-mail”;
node.setAttribute(“title”, “クリックでメールアドレスをコピー”);
node.setAttribute(“aria-label”, “クリックでメールアドレスをコピー”);
function handleCopy(event) {
if (event) event.preventDefault();
copyText(email).then(function () {
node.textContent = “Copied!”;
setTimeout(function () {
node.textContent = “E-mail”;
}, 1200);
}).catch(function () {
node.textContent = “Copy failed”;
setTimeout(function () {
node.textContent = “E-mail”;
}, 1200);
});
}
node.addEventListener(“click”, handleCopy);
});
});



