質問編集履歴
2
ソースをテキストでつけた
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,4 +1,16 @@
|
|
1
1
|
##前提・実現したいこと
|
2
2
|
現在、ブラウザバックの無効化機能を実装しているのですが、safariは無効化できるのにGoogle chromeではできないという現象に陥ってしまいました。どのような記述をすればGoogle chromeでも効くようになるのかご指導いただきたいです。よろしくお願いいたします。
|
3
3
|
今回のjsファイルの記述です↓
|
4
|
+
```ここに言語を入力
|
5
|
+
window.onpageshow = function() {
|
6
|
+
var path = location.href;
|
7
|
+
|
4
|
-
|
8
|
+
if(path.indexOf("confirm") >= 0){
|
9
|
+
history.pushState(null, null, null);
|
10
|
+
window.addEventListener('popstate', function(event) {
|
11
|
+
history.pushState(null, null, null);
|
12
|
+
location.reload();
|
13
|
+
});
|
14
|
+
}
|
15
|
+
}
|
16
|
+
```
|
1
タイトル編集
title
CHANGED
@@ -1,1 +1,1 @@
|
|
1
|
-
ブラウザバックがGoogle chromeで効かない
|
1
|
+
ブラウザバック禁止がGoogle chromeで効かない
|
body
CHANGED
File without changes
|