mirror of
https://github.com/M66B/FairEmail.git
synced 2025-03-03 10:16:45 +00:00
Set viewport / overview mode
This commit is contained in:
parent
f00e39af36
commit
bdaf84a59d
1 changed files with 6 additions and 2 deletions
|
@ -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…
Reference in a new issue