This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//@ts-check | |
//#region dom.js | |
/** @typedef {boolean|number|bigint|string} Scalar */ | |
/** @param {string} content */ | |
function appendStyleSheet (content) | |
{ | |
const style = document.createElement ("style") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.addEventListener("DOMContentLoaded", function() { | |
// this must match the rule `.partial-block {max-height: 245px; ...} ` | |
let max_height = 245; | |
let btn_more_tpl = '<div class="show-block-btn">Show more ...</div>'; | |
let btn_less_tpl = '<div class="show-block-btn">Show less ...</div>'; | |
let btn_tpl = $("<tr><td></td><td>"+btn_more_tpl+"</td></tr>")[0]; | |
let last_exp = null; | |
let last_btn = null; |