about summary refs log tree commit diff stats
path: root/src/assets/javascripts/services.js
diff options
context:
space:
mode:
authorGwyneth Morgan <gwymor@tilde.club>2023-03-07 22:54:34 +0000
committerGwyneth Morgan <gwymor@tilde.club>2023-03-07 22:54:34 +0000
commit933a0482fb42911624395bbafb0a1de54b22a501 (patch)
tree4da13f10406664e306651c2e83acfa72511b8e17 /src/assets/javascripts/services.js
parentAdded support to subdomains for scribe https://github.com/libredirect/libredi... (diff)
downloadlibredirect-933a0482fb42911624395bbafb0a1de54b22a501.zip
Remove Twitter s/t tracking parameters
The `s` parameter seems to correspond to what type of device shared the
Twitter URL (12 = Twitter for iOS, 20 = Twitter website, etc). `t`
appears to be some sort of rotating tracker associated with the person
who shared the URL; I've seen Twitter URLs shared by one person with the
same `t` parameter for a few days, then their parameter changes and the
old one doesn't seem to be used again.

https://github.com/libredirect/libredirect/issues/532
Diffstat (limited to 'src/assets/javascripts/services.js')
-rw-r--r--src/assets/javascripts/services.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/assets/javascripts/services.js b/src/assets/javascripts/services.js
index 07f7a522..3b690629 100644
--- a/src/assets/javascripts/services.js
+++ b/src/assets/javascripts/services.js
@@ -132,6 +132,8 @@ function redirect(url, type, initiator, forceRedirection) {
 
 			search.delete("ref_src")
 			search.delete("ref_url")
+			search.delete("s") // type of device that shared the link
+			search.delete("t") // some sort of tracking ID
 
 			search = search.toString()
 			if (search !== "") search = `?${search}`