
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();
});
