Enhanced URL Parsing and Handling:
- Introduced
new URL(url) for parsing and manipulating URLs, ensuring compatibility and robustness.
- Added specific logic to handle domain-specific URL parameters.
Domain-Specific Parameter Removal:
removeByDomain(domain, name) function added for removing tracking tokens specific to particular domains.
- Examples include:
- Facebook:
privacy_mutation_token, acontext, notif_t, etc.
- Dropbox:
_ad, _camp, _tk.
- YouTube:
si.
- Microsoft:
ocid, ef_id, etc.
Event Listeners for URL Changes:
- Monitors history state changes using
replaceState and popstate events.
- Added custom
locationchange event to handle URL changes dynamically.
Automatic Execution Control:
- Introduced
setInterval to periodically execute token stripping for dynamic pages.
- Stops interval after 2000ms to avoid unnecessary resource usage.
Improved TrackingTokenStripper Functionality:
- Supports both general parameter removal and domain-specific parameter removal with optional value matching.