2023-06-29 19:05:24 +00:00
|
|
|
if (!is_pwa) {
|
2023-09-29 00:37:03 +00:00
|
|
|
if (innerWidth <= 737) {
|
2022-12-29 14:20:27 +00:00
|
|
|
const tt = bootstrap.Tooltip.getOrCreateInstance(document.getElementById('mobile-prompt'))
|
|
|
|
tt.show()
|
2023-01-28 14:27:52 +00:00
|
|
|
document.getElementsByClassName('tooltip')[0].addEventListener('click', function(e) {
|
2022-12-29 14:20:27 +00:00
|
|
|
tt.hide()
|
|
|
|
const xhr = new XMLHttpRequest();
|
|
|
|
xhr.open("POST", '/dismiss_mobile_tip', true);
|
|
|
|
xhr.setRequestHeader('xhr', 'xhr');
|
|
|
|
xhr.send();
|
|
|
|
if (!e.target.classList.contains('dismiss-beg'))
|
|
|
|
location.href = "/app"
|
2023-01-28 14:27:52 +00:00
|
|
|
})
|
2022-12-29 14:20:27 +00:00
|
|
|
}
|
|
|
|
}
|