Initial commit: Klammertext source distribution
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>
This commit is contained in:
44
sks/document/js/show_links.js
Normal file
44
sks/document/js/show_links.js
Normal file
@@ -0,0 +1,44 @@
|
||||
|
||||
function show_link_boxes(show) {
|
||||
K.map("a", function(elt) {
|
||||
if (show) {
|
||||
K.remove_class(elt, "undisplayed_link");
|
||||
K.add_class(elt, "displayed_link");
|
||||
localStorage.setItem("klammertext_links", "true");
|
||||
} else {
|
||||
K.remove_class(elt, "displayed_link");
|
||||
K.add_class(elt, "undisplayed_link");
|
||||
localStorage.setItem("klammertext_links", "false");
|
||||
}
|
||||
});
|
||||
K.map(".pagelink", function(elt) {
|
||||
if (show) {
|
||||
K.remove_class(elt, "undisplayed_link");
|
||||
K.add_class(elt, "displayed_link");
|
||||
} else {
|
||||
K.remove_class(elt, "displayed_link");
|
||||
K.add_class(elt, "undisplayed_link");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
window.addEventListener("load", function (event) {
|
||||
K.get("#linkshow_check").addEventListener("click", function (event) {
|
||||
let box = K.get("#linkshow_check");
|
||||
if (K.attr(box, "active") === "false") {
|
||||
K.attr(box, "active", "true");
|
||||
show_link_boxes(true);
|
||||
} else {
|
||||
K.attr(box, "active", "false");
|
||||
show_link_boxes(false);
|
||||
}
|
||||
|
||||
});
|
||||
/*
|
||||
K.get("#linkshow_check_label").addEventListener("click", function (event) {
|
||||
K.get("#linkshow_check").click();
|
||||
});
|
||||
*/
|
||||
|
||||
define_keypress("L", "#linkshow_check");
|
||||
});
|
||||
Reference in New Issue
Block a user