mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-16 20:05:14 +02:00
Web app manifest (fixes #3317)
This commit is contained in:
parent
0d2bf557de
commit
ead9cbe534
4 changed files with 37 additions and 0 deletions
|
@ -19,6 +19,7 @@
|
|||
<link rel="apple-touch-icon" href="{{$touch_icon}}"/>
|
||||
|
||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||
<link rel="manifest" href="{{$baseurl}}/manifest" />
|
||||
<script>
|
||||
// Prevents links to switch to Safari in a home screen app - see https://gist.github.com/irae/1042167
|
||||
(function(a,b,c){if(c in b&&b[c]){var d,e=a.location,f=/^(a|html)$/i;a.addEventListener("click",function(a){d=a.target;while(!f.test(d.nodeName))d=d.parentNode;"href"in d&&(chref=d.href).replace(e.href,"").indexOf("#")&&(!/^[a-z\+\.\-]+:/i.test(chref)||chref.indexOf(e.protocol+"//"+e.host)===0)&&(a.preventDefault(),e.href=d.href)},!1)}})(document,window.navigator,"standalone");
|
||||
|
|
9
view/templates/manifest.tpl
Normal file
9
view/templates/manifest.tpl
Normal file
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"name": "{{$title}}",
|
||||
"start_url": "{{$baseurl}}",
|
||||
"display": "standalone",
|
||||
"description": "A Decentralized Social Network",
|
||||
"icons": [{
|
||||
"src": "{{$baseurl}}/{{$touch_icon}}"
|
||||
}]
|
||||
}
|
|
@ -41,6 +41,7 @@
|
|||
<link rel="apple-touch-icon" href="{{$touch_icon}}"/>
|
||||
|
||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||
<link rel="manifest" href="{{$baseurl}}/manifest" />
|
||||
<script>
|
||||
// Prevents links to switch to Safari in a home screen app - see https://gist.github.com/irae/1042167
|
||||
(function(a,b,c){if(c in b&&b[c]){var d,e=a.location,f=/^(a|html)$/i;a.addEventListener("click",function(a){d=a.target;while(!f.test(d.nodeName))d=d.parentNode;"href"in d&&(chref=d.href).replace(e.href,"").indexOf("#")&&(!/^[a-z\+\.\-]+:/i.test(chref)||chref.indexOf(e.protocol+"//"+e.host)===0)&&(a.preventDefault(),e.href=d.href)},!1)}})(document,window.navigator,"standalone");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue