@codedoc/core
Version:
Create beautiful modern documentation websites.
25 lines • 1.04 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.sameLineLengthInCodes$ = exports.sameLineLengthInCodes = void 0;
var transport_1 = require("@connectv/sdh/transport");
function sameLineLengthInCodes() {
transport_1.onReady(function () {
var _exec = function () {
document.querySelectorAll('pre>code').forEach(function (code$) {
var max = 0;
code$.querySelectorAll('div').forEach(function (line$) {
if (max < line$.offsetWidth)
max = line$.offsetWidth;
});
code$.querySelectorAll('div').forEach(function (line$) {
line$.style.width = max + "px";
});
});
};
_exec();
window.addEventListener('navigation', _exec);
});
}
exports.sameLineLengthInCodes = sameLineLengthInCodes;
exports.sameLineLengthInCodes$ = transport_1.funcTransport(sameLineLengthInCodes);
//# sourceMappingURL=same-line-length.js.map