Skip to content

Conversation

@mobilemind
Copy link
Owner

@mobilemind mobilemind commented Jan 4, 2026

feature: improve linklighter & utmstrip, republish unskim & x-man

LinkLighter 2.1.0

  • Improved highlighting of text that may be repeated on the page, leveraging prefix & suffix
  • Improved match consistency & reliability with word boundary checks
  • Improved cross-browser compatibility
  • Refactored logic to reduce code size
  • Reworded alerts (shorter bookmarklet)
  • dist version now < 2Kb

UTMStrip 2.1.0

  • 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
  • Reworded alerts (shorter bookmarklet)
  • dist version now < 4Kb

UnSkim 2.0.1

  • No source changes, Terser now makes it slightly smaller, so version was bumped

X-MAN 1.3.1

  • Reworded alerts (shorter bookmarklet)
  • Terser now makes it slightly smaller, too

Other

  • Minor improvements to build, workflow, and support files

- 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
Copy link
Contributor

Copilot AI left a 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.

Copy link
Contributor

Copilot AI left a 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) {
Copy link

Copilot AI Jan 4, 2026

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.

Suggested change
if (firstSpace > 0) {
if (firstSpace !== -1) {

Copilot uses AI. Check for mistakes.
Copy link
Owner Author

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.

mobilemind and others added 3 commits January 4, 2026 02:41
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>
@mobilemind mobilemind merged commit ca5226d into main Jan 4, 2026
14 checks passed
@mobilemind mobilemind deleted the feat/linklighter-robustness-compatibility-size branch January 4, 2026 23:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants