Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
tsuyopon123 committed Apr 15, 2021
1 parent daef244 commit 554c657
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
14 changes: 14 additions & 0 deletions back.js
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);
}
});
12 changes: 12 additions & 0 deletions manifest.json
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"
]
}]
}

0 comments on commit 554c657

Please sign in to comment.