Set viewport / overview mode

This commit is contained in:
M66B 2021-12-04 16:31:48 +01:00
parent f00e39af36
commit bdaf84a59d
1 changed files with 6 additions and 2 deletions

View File

@ -2026,9 +2026,13 @@ public class HtmlHelper {
// https://drafts.csswg.org/css-device-adapt/#viewport-meta
Elements meta = document.select("meta").select("[name=viewport]");
// Note that the browser will recognize meta elements in the body too
if (overview) // fit width
if (overview) {
// fit width
meta.remove();
else {
document.head().prependElement("meta")
.attr("name", "viewport")
.attr("content", "width=device-width");
} else {
if (meta.size() == 1) {
String content = meta.attr("content");
String[] param = content.split("[;,]");