-
Notifications
You must be signed in to change notification settings - Fork 1
feature: improve linklighter & utmstrip #373
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
feature: improve linklighter & utmstrip #373
Conversation
- Removed duplicate aff_ handling of AliExpress URLs - Add strip() substitute for repeated .replace() pattern throughout the code - Merge checks using includes() with .test() for HubSpot, MailChimp, & Marketo - Optimize cleanup of orphaned params or query string marker - Change wording of alert
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.
Pull request overview
This PR improves two bookmarklets (LinkLighter and UTMStrip) with optimization and feature enhancements, while republishing UnSkim and X-MAN with minor updates. The main focus is on LinkLighter's new prefix/suffix logic for handling duplicate text selections and improving cross-browser compatibility.
- LinkLighter 2.1.0: Adds intelligent prefix/suffix detection for duplicate text, improves word boundary handling, enhances cross-browser compatibility, and adds better error feedback
- X-MAN 1.3.1: Shortens alert messages for smaller bookmarklet size
- Package dependencies updated (removal of "peer" flags in package-lock.json)
Reviewed changes
Copilot reviewed 4 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/linklighter.ts | Major refactoring with new prefix/suffix logic for duplicate text detection, improved word boundary handling, cross-browser compatibility fix (removeAllRanges), and enhanced error handling with user feedback |
| src/x-man.ts | Shortened alert messages to reduce bookmarklet size |
| dist/linklighter.bookmarklet | Updated minified bookmarklet reflecting source changes |
| dist/x-man.bookmarklet | Updated minified bookmarklet reflecting source changes |
| dist/unskim.bookmarklet | Republished with version bump (no source changes) |
| bookmarklets.json | Version numbers updated to match new releases (2.1.0, 1.3.1, 2.0.1) |
| README.md | Documentation updated with new version numbers, improved Linklighter description, and updated Textastic API reference URL |
| package-lock.json | Removed "peer": true flags from several dependencies |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ub.com:mobilemind/OpenInlets into feat/linklighter-robustness-compatibility-size
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.
Pull request overview
Copilot reviewed 8 out of 13 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // If we cut mid-word at start, shift start forward to first complete word | ||
| if (prefixStart > 0 && fullText.charAt(prefixStart - 1) !== ' ') { | ||
| const firstSpace: number = prefix.indexOf(' '); | ||
| if (firstSpace > 0) { |
Copilot
AI
Jan 4, 2026
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.
The condition 'firstSpace > 0' means that if the first space is at position 0, the prefix won't be adjusted. This would leave leading whitespace or partial word at the beginning. The check should be 'firstSpace !== -1' to handle any valid space position, or 'firstSpace >= 0' to be more explicit.
| if (firstSpace > 0) { | |
| if (firstSpace !== -1) { |
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.
Nope. The preceding .trim() will ensure there's never a space at character zero.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Remove redundant/conflicting "/g" flag. Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
feature: improve linklighter & utmstrip, republish unskim & x-man
LinkLighter 2.1.0
UTMStrip 2.1.0
UnSkim 2.0.1
X-MAN 1.3.1
Other