-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
daef244
commit 554c657
Showing
2 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// ブラウザバックのアクションが実行された際に、戻るボタンを押す | ||
|
||
// disable browser back | ||
history.pushState(null, null, null); | ||
|
||
// 戻るアクションが発火した際に戻るボタンを探してクリックする | ||
window.addEventListener('popstate', function (e) { | ||
if (document.querySelector(".icon-back") != null) { | ||
document.querySelector(".icon-back").click(); | ||
} else { | ||
alert('ブラウザバックできません。'); | ||
history.pushState(null, null, null); | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"name": "fix kslife \"Modoru\"", | ||
"version": "1.0.0", | ||
"manifest_version": 2, | ||
"description": "K'sLifeを少しマシにするための何か", | ||
"content_scripts": [{ | ||
"matches": ["https://ksuweb.kyusan-u.ac.jp/*"], | ||
"js": [ | ||
"back.js" | ||
] | ||
}] | ||
} |