mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-14 02:26:58 -07:00
Work around for iOS web app links opening in Safari
This commit is contained in:
parent
5faf357045
commit
196048cf38
2 changed files with 17 additions and 2 deletions
|
@ -261,6 +261,21 @@ ${next.headerIncludes()}
|
|||
}
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
// Work around for iOS web app links opening in Safari
|
||||
$(document).ready(function () {
|
||||
if (("standalone" in window.navigator) && window.navigator.standalone) {
|
||||
// For iOS Apps
|
||||
$('a').on('click', function (e) {
|
||||
e.preventDefault();
|
||||
var new_location = $(this).attr('href');
|
||||
if (new_location != undefined && new_location.substr(0, 1) != '#' && $(this).attr('data-method') == undefined) {
|
||||
window.location = new_location;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
${next.javascriptIncludes()}
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue