forked from rDrama/rDrama
dfs
parent
02375b2ef1
commit
25c0e4a82b
|
@ -146,24 +146,25 @@
|
||||||
</script>
|
</script>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if request.path == '/' and g.system and g.timestamp > session.get('tooltip_last_dismissed',0)+60*60*24 and (not g.system.endswith('/chrome') and not g.system.endswith('/other')) and not g.system.endswith('/webview') %}
|
||||||
|
<div id="mobile-prompt-container" class="fixed-bottom">
|
||||||
|
<div id="mobile-prompt" href="javascript:void(0)" data-bs-toggle="tooltip" data-bs-container="#mobile-prompt-container" data-bs-placement="top" data-bs-trigger="click" title="Install the {{'SITE_NAME' | app_config}} webapp by saving this page to your home screen!"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div id="mobile-prompt-container" class="fixed-bottom">
|
<script>
|
||||||
<div id="mobile-prompt" href="javascript:void(0)" data-bs-toggle="tooltip" data-bs-container="#mobile-prompt-container" data-bs-placement="top" data-bs-trigger="click" title="Install the {{'SITE_NAME' | app_config}} webapp by saving this page to your home screen!"></div>
|
if (!("standalone" in window.navigator) && window.navigator.standalone) {
|
||||||
</div>
|
if (window.innerWidth <= 737) {
|
||||||
|
document.getElementById('mobile-prompt').show()
|
||||||
<script>
|
document.getElementsByClassName('tooltip')[0].onclick = function(event){
|
||||||
if (!("standalone" in window.navigator) && window.navigator.standalone) {
|
document.getElementById('mobile-prompt').hide()
|
||||||
if (window.innerWidth <= 737) {
|
var xhr = new XMLHttpRequest();
|
||||||
document.getElementById('mobile-prompt').show()
|
xhr.withCredentials=true;
|
||||||
document.getElementsByClassName('tooltip')[0].onclick = function(event){
|
xhr.open("POST", '/dismiss_mobile_tip', true);
|
||||||
document.getElementById('mobile-prompt').hide()
|
xhr.send();
|
||||||
var xhr = new XMLHttpRequest();
|
}
|
||||||
xhr.withCredentials=true;
|
|
||||||
xhr.open("POST", '/dismiss_mobile_tip', true);
|
|
||||||
xhr.send();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
</script>
|
||||||
</script>
|
{% endif %}
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
Loading…
Reference in New Issue