refined-github icon indicating copy to clipboard operation
refined-github copied to clipboard

`shorten-links` doesn't (always) apply to links affected by `sort-conversations-by-update-time`

Open fregante opened this issue 3 years ago • 0 comments

Description

Depending on which feature gets to it first, shorten-link may skip a link. Example problematic comment:

Blah blah https://github.com/refined-github/yolo/issues and blah.

This works

  1. shorten-link finds it and shortens its text-content
  2. sort-conversations-by-update-time finds it and changes its href

Screenshot: Screen Shot

This doesn't work

  1. sort-conversations-by-update-time finds it and changes its href
  2. shorten-link finds it but the text-content no longer matches the href

Screenshot: Screen Shot 2

Possible solutions

  • Detect and exclude this specific query (hard ⚠️ )
  • Have sort-conversations-by-update-time save the original link in another attribute, so that shorten-link can use that for the comparison instead of .href
  • Ensure sort-conversations-by-update-time always runs after shorten-link (oof ⚠️ )

How to replicate the issue

Live example:

Blah blah https://github.com/refined-github/yolo/issues and blah.

Extension version

22.8.1

Browser(s) used

Chrome

fregante avatar Aug 05 '22 07:08 fregante

Note: This applies to at least 2 features

  • comments-time-machine-links
  • sort-conversations-by-update-time

fregante avatar Sep 12 '22 09:09 fregante