- manifest.json と script.js を適当な、同じディレクトリ内に保存します。
- Chromeの設定画面を開き、拡張機能の画面を出します。
- 「デベロッパーモード」のチェックボックスにチェックを入れます。
- 「パッケージされていない拡張機能を読み込む」ボタンを押し、先程のディレクトリを選択します。
Last active
August 10, 2021 09:55
-
-
Save kshoji/0566acb53c7b53a23961 to your computer and use it in GitHub Desktop.
秋月電子と共立エレショップのWebサイトのセッションが切れてたらリロードするChrome拡張
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
{ | |
"name": "NoSessionReloader", | |
"version": "0.0.1", | |
"manifest_version": 2, | |
"description": "Noセッションリローダー", | |
"permissions": ["tabs"], | |
"content_scripts": [ | |
{ | |
"matches": ["http://akizukidenshi.com/*", "http://eleshop.jp/*"], | |
"js": ["script.js"], | |
"run_at": "document_end" | |
} | |
] | |
} |
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
(function() { | |
if (document.getElementsByClassName("notice_").length == 1 && | |
document.getElementsByClassName("notice_")[0].innerText.indexOf("セッションの有効期間") >= 0) { | |
location.reload(); | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment