mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2025-05-14 10:15:55 +00:00

* CSS corrections * HTML corrections * JS corrections * JAVA corrections * remove tab * CSS corrections 2 * JS corrections 2 * back to the roots * max-linie 127 * add slash hr|br * return bootstrap-icons.css * return bootstrap-icons.min.css * return bootstrap.min.css * Update bootstrap-icons.css * Update bootstrap-icons.min.css * Update bootstrap-icons.min.css * Update bootstrap.min.css * CSS corrections * HTML corrections * JS corrections * JAVA corrections * remove tab * CSS corrections 2 * JS corrections 2 * back to the roots * max-linie 127 * add slash hr|br * return bootstrap-icons.css * Update bootstrap-icons.css * Bootstrap CSS * Update prism.css
51 lines
1.3 KiB
JavaScript
51 lines
1.3 KiB
JavaScript
var traceVisible = false;
|
|
|
|
function toggletrace() {
|
|
var traceDiv = document.getElementById("trace");
|
|
if (!traceVisible) {
|
|
traceDiv.style.maxHeight = "500px";
|
|
traceVisible = true;
|
|
} else {
|
|
traceDiv.style.maxHeight = "0px";
|
|
traceVisible = false;
|
|
}
|
|
adjustContainerHeight();
|
|
}
|
|
|
|
function copytrace() {
|
|
var flip = false;
|
|
if (!traceVisible) {
|
|
toggletrace();
|
|
flip = true;
|
|
}
|
|
var traceContent = document.getElementById("traceContent");
|
|
var range = document.createRange();
|
|
range.selectNode(traceContent);
|
|
window.getSelection().removeAllRanges();
|
|
window.getSelection().addRange(range);
|
|
document.execCommand("copy");
|
|
window.getSelection().removeAllRanges();
|
|
if (flip) {
|
|
toggletrace();
|
|
}
|
|
}
|
|
|
|
function dismissError() {
|
|
var errorContainer = document.getElementById("errorContainer");
|
|
errorContainer.style.display = "none";
|
|
errorContainer.style.height = "0";
|
|
}
|
|
|
|
function adjustContainerHeight() {
|
|
var errorContainer = document.getElementById("errorContainer");
|
|
var traceDiv = document.getElementById("trace");
|
|
if (traceVisible) {
|
|
errorContainer.style.height = errorContainer.scrollHeight - traceDiv.scrollHeight + traceDiv.offsetHeight + "px";
|
|
} else {
|
|
errorContainer.style.height = "auto";
|
|
}
|
|
}
|
|
function showHelp() {
|
|
$("#helpModal").modal("show");
|
|
}
|