sneed
parent
691b80431c
commit
032754f65e
|
@ -2,6 +2,34 @@
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
|
//mobile prompt
|
||||||
|
if (("standalone" in window.navigator) && // Check if "standalone" property exists
|
||||||
|
window.navigator.standalone){ // Test if using standalone navigator
|
||||||
|
|
||||||
|
// Web page is loaded via app mode (full-screen mode)
|
||||||
|
// (window.navigator.standalone is TRUE if user accesses website via App Mode)
|
||||||
|
|
||||||
|
} else {
|
||||||
|
if (window.innerWidth <= 737){
|
||||||
|
try {
|
||||||
|
$('#mobile-prompt').tooltip('show')
|
||||||
|
$('.tooltip')[0].addEventListener(
|
||||||
|
'click',
|
||||||
|
function(event){
|
||||||
|
$('#mobile-prompt').tooltip('hide')
|
||||||
|
var xhr = new XMLHttpRequest();
|
||||||
|
xhr.withCredentials=true;
|
||||||
|
xhr.open("POST", '/dismiss_mobile_tip', true);
|
||||||
|
xhr.send();
|
||||||
|
}
|
||||||
|
)
|
||||||
|
} catch (error) {
|
||||||
|
console.error(error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Voting
|
// Voting
|
||||||
|
|
||||||
var upvote = function(event) {
|
var upvote = function(event) {
|
||||||
|
|
Loading…
Reference in New Issue