デスクトップとモバイルの両方で、ブラウザーで完全に機能するWebアプリがあります。問題は、次のように追加してきれいにしようとすると発生します。
<meta name="apple-mobile-web-app-capable" content="yes" />
これもうまく機能します-アプリでレコードを削除する必要がある時点まで。
私はまた、私が見つけたこの素晴らしい要点を使用しています-https ://gist.github.com/1042167アプリがモバイルサファリに切り替わるのを止めます:
<script type="text/javascript">
(function(document,navigator,standalone) {
// prevents links from apps from oppening in mobile safari
// this javascript must be the first script in your <head>
if ((standalone in navigator) && navigator[standalone]) {
var curnode, location=document.location, stop=/^(a|html)$/i;
document.addEventListener('click', function(e) {
curnode=e.target;
while (!(stop).test(curnode.nodeName)) {
curnode=curnode.parentNode;
}
// Conditions to do this only on links to your own app
// if you want all links, use if('href' in curnode) instead.
if(
'href' in curnode && // is a link
(chref=curnode.href).replace(location.href,'').indexOf('#') && // is not an anchor
( !(/^[a-z\+\.\-]+:/i).test(chref) || // either does not have a proper scheme (relative links)
chref.indexOf(location.protocol+'//'+location.host)===0 ) // or is in the same protocol and domain
) {
e.preventDefault();
location.href = curnode.href;
}
},false);
}
})(document,window.navigator,'standalone');
</script>
data-method = "delete"がうまく機能するように、これを変更できるかどうか疑問に思っていますか?その瞬間-「削除」をクリックすると-「よろしいですか?」削除が行われずに、同じショーページに私をダンプする前に、確認ボックスが1〜2秒間ハングします。