Skip to content
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

Whitelist Sorting Issues #2919

Open
7 tasks done
cherinyy opened this issue Nov 1, 2023 · 2 comments
Open
7 tasks done

Whitelist Sorting Issues #2919

cherinyy opened this issue Nov 1, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@cherinyy
Copy link

cherinyy commented Nov 1, 2023

Prerequisites

I tried to reproduce the issue when...

  • uBO is the only extension.
  • using a new, unmodified browser profile.

Description

Hello there,

I've noticed that uBO automatically sorts the whitelist, which is great. But the sorting is too simple, just comparing first letters.

This leads to the following sorting problem:

a.example.com
b.example.org
c.example.com
d.example.net
example.org

The situation is obvious, so hopefully the whitelist sorting can be improved, and comparisons should start from the TLDs.

Best regards,
Cheriny

A specific URL where the issue occurs.

https://www.reddit.com/r/uBlockOrigin/

Steps to Reproduce

  1. Open uBO's whitelist settings page
  2. Fill in the domains
  3. Save Settings

Expected behavior

The whitelist can be sorted by comparing the TLDs in order from the TLDs to the previous subdomains.

Actual behavior

The whitelist is simply sorted by comparing initial letters.

Configuration

uBlock Origin: 1.52.2
Chromium: 118
filterset (summary):
 network: 192220
 cosmetic: 213772
 scriptlet: 46526
 html: 0
listset (total-discarded, last-updated):
 added:
  https://easylist-downloads.adblockplus.org/easylistchina.txt: 22458-12, 9h.29m
  https://raw.githubusercontent.com/cjx82630/cjxlist/master/cjx-annoyance.txt: 1869-3, 9h.31m
  https://raw.githubusercontent.com/cjx82630/cjxlist/master/cjx-ublock.txt: 69-1, 9h.30m
  adguard-cookies: 27968-31, 9h.33m
  adguard-generic: 79083-506, 10h.2m
  adguard-mobile: 8805-63, 9h.28m
  adguard-mobile-app-banners: 4719-19, 10h.3m
  adguard-other-annoyances: 13711-18, 9h.27m
  adguard-popup-overlays: 25188-89, 10h.1m
  adguard-spyware: 62651-1402, 9h.32m
  adguard-widgets: 2335-5, 10h.4m
  easylist-annoyances: 4016-254, 4d.21h.26m
  [7 lists not shown]: [too many]
 default:
  user-filters: 0-0, never
  CHN-0: 25438-22554, 10h.5m
  easylist: 72145-1324, 2d.12h.4m
  easyprivacy: 32887-16622, 12h.9m
  plowe-0: 3727-1245, 6d.22h.37m
  ublock-badware: 7401-326, 2d.12h.3m
  ublock-filters: 35357-4295, 2d.12h.2m
  ublock-privacy: 613-87, 4d.21h.31m
  ublock-quick-fixes: 190-95, 5m
  ublock-unbreak: 2134-147, 2d.12h.1m
  urlhaus-1: 11290-0, 5h.54m
filterset (user): [empty]
trustedset:
 added: [array of 6 redacted]
userSettings:
 advancedUserEnabled: true
 cloudStorageEnabled: true
hiddenSettings: [none]
supportStats:
 allReadyAfter: 1185 ms (selfie)
 maxAssetCacheWait: 428 ms
@MasterKia

This comment was marked as resolved.

@MasterKia MasterKia closed this as not planned Won't fix, can't repro, duplicate, stale Nov 1, 2023
@MasterKia MasterKia added the duplicate This issue or pull request already exists label Nov 1, 2023
@gorhill gorhill reopened this Nov 1, 2023
@gorhill gorhill removed the duplicate This issue or pull request already exists label Nov 1, 2023
@gorhill
Copy link
Member

gorhill commented Nov 1, 2023

I don't consider this a duplicate. The issue here is not about asking to preserve the order, but to better sort. The suggestion here is already implemented in the My rules pane, so this can probably somewhat be done in the My trusted sites pane. The only quirk is that not all trusted-site directives are necessarily plain hostnames, there could be page-based directives, even regex-based ones.

@MasterKia MasterKia added the enhancement New feature or request label Nov 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants