-
Notifications
You must be signed in to change notification settings - Fork 0
Add feature to automatically close ERR_CACHE_MISS page #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…onCanceler Now it is used not only as a talk client but also to directly close tabs.
| if (this.match(section, urlToMatch)) { | ||
| console.log(` => unmatched`); | ||
| this.startMonitoring(); | ||
| callbackWhenMatch(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
今回の機能追加で、このメソッドを流用したい。ただ、今回追加した部分と従来の部分でマッチした場合にさせたい動作が異なる。
- ERR_CACHE_MISSページのURLが合致していた場合はタブを閉じたい。
- それ以外の場合は、RepostConfirmationCanceler.exeを起動したい。
マッチ時にさせたい動作が異なるので、コールバック化して外部から渡せるようにした。
| * } | ||
| */ | ||
| const RepostConfirmationCancelerTalkClient = { | ||
| const RepostConfirmationCanceler = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
このオブジェクトの中にERR_CACHE_MISSのページだったらタブを閉じる、という処理を追加した。
そのため単なるTalkClientではなくなったのでリネームした。
piroor
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
Add feature to automatically close ERR_CACHE_MISS page like below.