-
-
Notifications
You must be signed in to change notification settings - Fork 577
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
Disable Facebook link tracking #226
Conversation
index.js
Outdated
@@ -222,6 +223,10 @@ app.on('ready', () => { | |||
e.newGuest = new electron.BrowserWindow(options); | |||
} | |||
} else { | |||
if (url.includes('://l.messenger.com/l.php')) { |
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.
Can't you use if (url.startWith('https://l.messenger.com/l.php')) {
? I'm pretty sure Facebook only uses HTTPS.
index.js
Outdated
@@ -222,6 +223,10 @@ app.on('ready', () => { | |||
e.newGuest = new electron.BrowserWindow(options); | |||
} | |||
} else { | |||
if (url.includes('://l.messenger.com/l.php')) { | |||
url = urlMod.parse(url, true).query.u; |
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.
Can you use the ne URL API: https://nodejs.org/api/url.html#url_the_whatwg_url_api
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.
Good idea. Fixed!
Can you add this feature to the readme? |
Thanks Kevin. As a bonus this also makes the links open much faster, since there's no longer a slow redirect. |
🎉 |
Fixes #224.