Fixed original messages / wide view port

This commit is contained in:
M66B 2020-08-08 08:20:28 +02:00
parent 96a75e8cf4
commit 42f1e43dde
1 changed files with 8 additions and 6 deletions

View File

@ -1546,13 +1546,15 @@ public class HtmlHelper {
static void setViewport(Document document) {
// https://developer.mozilla.org/en-US/docs/Mozilla/Mobile/Viewport_meta_tag
document.head().select("meta").select("[name=viewport]").remove();
Elements meta = document.head().select("meta").select("[name=viewport]");
if (meta.size() > 0) {
meta.remove();
document.head().prependChild(document.createElement("meta")
.attr("name", "viewport")
.attr("content", "width=device-width, initial-scale=1.0"));
}
document.head().prependChild(document.createElement("meta")
.attr("name", "viewport")
.attr("content", "width=device-width, initial-scale=1.0"));
Log.i(document.head().html());
Log.d(document.head().html());
}
static String getLanguage(Context context, String body) {