Skip to content

Commit a3d11ef

Browse files
committed
Merge branch 'zerowidth-ignore-unsubscribe-links'
2 parents 2da11f4 + f563d56 commit a3d11ef

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

chrome/src/inject/inject.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@ function initOnHashChangeAction(domains) {
4343

4444
if (github_links.length ) {
4545
var url = github_links[github_links.length-1].href
46+
47+
// skip notification unsubscribe links:
48+
if (url.match('notifications/unsubscribe')) {
49+
url = github_links[github_links.length-2].href
50+
}
4651
// Go to thread instead of .diff link (pull request notifications)
4752
url = url.match(/\.diff/) ? url.slice(0, url.length-5) : url
4853
var link = document.createElement('a')

0 commit comments

Comments
 (0)