mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2024-11-15 02:21:21 +01:00
Add user scalable query parameter (#74)
This commit is contained in:
parent
61a6d9ff69
commit
8b4877cc4b
@ -85,7 +85,8 @@ def guild_embed(guild_id):
|
|||||||
recaptcha_site_key=config["recaptcha-site-key"],
|
recaptcha_site_key=config["recaptcha-site-key"],
|
||||||
css=customcss,
|
css=customcss,
|
||||||
cssvariables=parse_css_variable(customcss),
|
cssvariables=parse_css_variable(customcss),
|
||||||
same_target=request.args.get("sametarget", False) == "true"
|
same_target=request.args.get("sametarget", False) == "true",
|
||||||
|
userscalable=request.args.get("userscalable", "True").lower().startswith("t")
|
||||||
)
|
)
|
||||||
abort(404)
|
abort(404)
|
||||||
|
|
||||||
|
@ -72,6 +72,22 @@ QUERY_PARAMETERS = [
|
|||||||
"description": "Prefills the guest username field with the given username.",
|
"description": "Prefills the guest username field with the given username.",
|
||||||
"example": "Rainbow%20Dash",
|
"example": "Rainbow%20Dash",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "userscalable",
|
||||||
|
"type": "boolean",
|
||||||
|
"description": "Enables pinch-to-zoom and auto zoom on input fields for most mobile browsers on touch-enabled devices. Disabling this will give your embed a more app-like experience. Keep in mind that disabling this might prevent accessibility features disabled people rely on from functioning.",
|
||||||
|
"example": "false",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "true",
|
||||||
|
"default": True,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "false",
|
||||||
|
"default": False,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
LANGUAGES = [
|
LANGUAGES = [
|
||||||
|
@ -18,6 +18,11 @@
|
|||||||
<!--Let browser know website is optimized for mobile-->
|
<!--Let browser know website is optimized for mobile-->
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||||
|
|
||||||
|
{% if not userscalable %}
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
||||||
|
<meta name="HandheldFriendly" content="true" />
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% include 'seo_meta.html.j2' %}
|
{% include 'seo_meta.html.j2' %}
|
||||||
|
|
||||||
<!--Provide default mobile metadata-->
|
<!--Provide default mobile metadata-->
|
||||||
|
Loading…
Reference in New Issue
Block a user