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:
20
sks/code/js/code.js
Normal file
20
sks/code/js/code.js
Normal file
@@ -0,0 +1,20 @@
|
||||
|
||||
function adjust_code_comment_width()
|
||||
{
|
||||
let max_width = K.get("#text").offsetWidth;
|
||||
K.getv(".code_comment").forEach(function (comment_box) {
|
||||
let block = comment_box.parentNode;
|
||||
let code_box = block.children[0];
|
||||
let comment_width = max_width - code_box.offsetWidth;
|
||||
K.width(comment_box, comment_width);
|
||||
});
|
||||
}
|
||||
|
||||
window.addEventListener("load", function (event) {
|
||||
window.addEventListener(
|
||||
"resize",
|
||||
function (event) {
|
||||
adjust_code_comment_width();
|
||||
});
|
||||
adjust_code_comment_width();
|
||||
});
|
||||
Reference in New Issue
Block a user