Set viewport / overview mode

pull/194/merge
M66B 3 years ago
parent f00e39af36
commit bdaf84a59d

@ -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("[;,]");

Loading…
Cancel
Save