Funktion adjustScale() {
const wrapper = document.getElementById("preview-wrapper") || document.body;
if (!wrapper) return;
const width = wrapper.scrollWidth;
const availableWidth = window.innerWidth;
sei skaliert = 1;
if (width > availableWidth) {
scale = availableWidth / width;
}
if (Skala < 1) {
document.body.style.transform = "scale(" + scale + ")";
document.body.style.transformOrigin = "oben Mitte";
document.body.style.width = (100 / Skala) + „%“;
document.body.style.height = (100 / Maßstab) + „%“;
}
}
window.addEventListener("load",adjustScale);
window.addEventListener("resize",adjustScale);
document.addEventListener("submit", function(e) {
e.preventDefault();
console.log("Formularübermittlung aus Sicherheitsgründen blockiert");
return false;
}, true);
// Verhindern Sie, dass Links durch den Iframe navigieren
document.addEventListener("click", function(e) {
const target = e.target.closest("a");
if (Ziel && Ziel.href) {
e.preventDefault();
console.log("Navigation aus Sicherheitsgründen blockiert");
}
}, true);