Curated source subset assembled by klammertext-dev's doc/make_dist.sh: the Klammermachine (mac), the Standard Klammer Set (sks), the commands (com), editor plugins and install guides (doc), a test subset (tst), and lib/bin placeholders. Builds with 'make -C com'. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
34 lines
994 B
JavaScript
34 lines
994 B
JavaScript
function modify_buttons_for_help(status) {
|
|
K.visible("#linkshow", status);
|
|
K.visible("#textshow", status);
|
|
K.visible("#searchtools", status);
|
|
K.get("#help").textContent = status == "show" ? "Help" : "Back";
|
|
}
|
|
|
|
function show_help() {
|
|
let header = K.get("#text h1");
|
|
if (header && header.textContent === "Navigation features") {
|
|
textshow();
|
|
modify_buttons_for_help("show");
|
|
frame_resize();
|
|
} else {
|
|
save_position();
|
|
K.get("#text").replaceWith(K.get("#help_page").cloneNode(true));
|
|
K.attr("#help_page", "id", "text");
|
|
K.visible("#toc", "hide");
|
|
K.visible("#resizer", "hide");
|
|
set_buttons("hide");
|
|
resize_text_width();
|
|
modify_buttons_for_help("hide");
|
|
frame_resize();
|
|
}
|
|
}
|
|
|
|
window.addEventListener("load", function (event) {
|
|
K.get("#help").addEventListener("click", function (e) {
|
|
event.preventDefault();
|
|
show_help();
|
|
});
|
|
define_keypress("H", "#help");
|
|
});
|