]> git.mxchange.org Git - friendica.git/commitdiff
Strip base url from links before determining anchor status for iOS linker
authorHypolite Petovan <hypolite@mrpetovan.com>
Sat, 5 Jan 2019 01:36:36 +0000 (20:36 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Sat, 5 Jan 2019 01:36:36 +0000 (20:36 -0500)
view/templates/head.tpl
view/theme/frio/templates/head.tpl

index e76b97b8b94c87822daf51c9ee43f49d3b369ff6..8631d76093b668536d33302fa59814f8816f1c51 100644 (file)
@@ -19,7 +19,7 @@
 <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");
+(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("{{$baseurl}}/", "").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");
 </script>
 
 <link rel="search"
index d8f8b1d82dc531bc1e7906d81eb534226e1606fc..e1805f744fae554db27fcba2ad162c1bbf54ed7f 100644 (file)
@@ -40,7 +40,7 @@
 <link rel="manifest" href="{{$baseurl}}/manifest" />
 <script type="text/javascript">
 // 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");
+(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("{{$baseurl}}/", "").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");
 </script>
 
 <link rel="search"