「Translation_html」の編集履歴(バックアップ)一覧はこちら
Translation_html - (2026/04/07 (火) 23:59:51) の1つ前との変更点
追加された行は緑色になります。
削除された行は赤色になります。
&html(<div id="translation"><label for="translationCheck"><input type="checkbox" id="translationCheck">Translate terms into English</label></div><font color=blue><b>Note: This converts specific terms into English. Please use it together with your browser's translation.</b></font>)
#javascript(){{
/**
* チェックボックスの状態を localStorage に保存
*/
function saveCheckboxState(id, checked) {
try {
localStorage.setItem(id, checked ? "true" : "false");
} catch (e) {
console.error("保存エラー:", e);
}
}
/**
* ページ読み込み時に状態を復元
*/
function restoreCheckboxState(id) {
try {
const saved = localStorage.getItem(id);
if (saved === "true") {
document.getElementById(id).checked = true;
} else if (saved === "false") {
document.getElementById(id).checked = false;
}
} catch (e) {
console.error("復元エラー:", e);
}
}
// 全チェックボックスを処理
document.querySelectorAll("input[type=checkbox]").forEach(cb => {
// 復元
restoreCheckboxState(cb.id);
// 変更時に保存
cb.addEventListener("change", () => {
saveCheckboxState(cb.id, cb.checked);
});
});
}}
&html(<div id="translation"><label for="translationCheck"><input type="checkbox" id="translationCheck">Translate terms into English</label></div><font color=blue><b>Note: This converts specific terms into English. Please use it together with your browser's translation.</b></font>)
表示オプション
横に並べて表示:
変化行の前後のみ表示: