Skip to content

Commit 2fb1553

Browse files
committed
Merge pull request #28 from yoloseem/patch-1
Add email verification link to unwanted paths.
2 parents 363a7ea + f204be5 commit 2fb1553

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/inject/inject.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,10 +186,14 @@ function clearAllIntervals () {
186186
})
187187
}
188188

189-
// Reject unsubscribe and subscription management paths
189+
// Reject unsubscribe, subscription and verification management paths
190190
// Make sure the keywords((un)subscribe) can still be repository names
191191
function reject_unwanted_paths (links) {
192-
paths = ['\/\/[^\/]*\/mailers\/unsubscribe\?', '\/\/[^\/]*\/.*\/.*\/unsubscribe_via_email', '\/\/[^\/]*\/.*\/.*\/subscription$']
192+
paths = ['\/\/[^\/]*\/mailers\/unsubscribe\?',
193+
'\/\/[^\/]*\/.*\/.*\/unsubscribe_via_email',
194+
'\/\/[^\/]*\/.*\/.*\/subscription$',
195+
'\/\/[^\/]*\/.*\/.*\/emails\/.*\/confirm_verification\/.*'
196+
]
193197
regexp = new RegExp(paths.join('|'))
194198
return $(links).filter(function() {
195199
if(!this.href.match(regexp)) return this

0 commit comments

Comments
 (0)