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

remove duplicate lines when importing user filters #519

Closed
3 of 8 tasks
lvmm opened this issue Apr 9, 2019 · 5 comments
Closed
3 of 8 tasks

remove duplicate lines when importing user filters #519

lvmm opened this issue Apr 9, 2019 · 5 comments
Labels
bug Something isn't working fixed issue has been addressed

Comments

@lvmm
Copy link

lvmm commented Apr 9, 2019

Prerequisites

  • I verified that this is not a filter issue
  • This is not a support issue or a question
  • I performed a cursory search of the issue tracker to avoid opening a duplicate issue
    • Your issue may already be reported.
  • I tried to reproduce the issue when...
    • uBlock Origin is the only extension
    • uBlock Origin with default lists/settings
    • using a new, unmodified browser profile
  • I am running the latest version of uBlock Origin
  • I checked the documentation to understand that the issue I report is not a normal behavior

Description

Please provide ability to remove duplicate lines when importing filters the same way it now works for rules.

A specific URL where the issue occurs

[A specific URL is MANDATORY for issue happening on a web page, even if it happens "everywhere"]

Steps to Reproduce

  1. Open the ublock dashboard
  2. Go to My Filters tab
  3. Export current filters to file
  4. Import filters you've just exported.

Expected behaviour:

All imported lines should be marked as duplicates and ignored. Don't care what will happen with comments and cosmetic empty lines.

Actual behaviour:

All rules are imported and duplicated.

Your environment

  • uBlock Origin version: 1.18.16, firefox-legacy 1.16.4.10
  • Browser Name and version: chrome 72.0.3626.121 and seamonkey 2.53 (wg9s nightly)
  • Operating System and version: windows 10, ubuntu 16.04
@uBlock-user
Copy link
Contributor

The filters are imported but not saved automatically, you have to click Apply changes to save those duplicated filters. I'm conflicted on this, @gorhill what do you think ?

@uBlock-user uBlock-user added the something to address something to address label Apr 9, 2019
@lvmm
Copy link
Author

lvmm commented Apr 9, 2019

Well, yes, I do have to commit, but identical files is just an example. IRL only some lines will be duplicated, sorting it all manually is not at all easy and turning filters into a duplicate-ridden mess is even worse. Actually, I am just trying to keep my filters in sync between different makes of browsers and with existing tools it is not straightforward.

@gwarser
Copy link

gwarser commented Apr 9, 2019

Actually, I am just trying to keep my filters in sync between different makes of browsers and with existing tools it is not straightforward.

Create one custom filter list and import in all browsers as "Custom" in Filter lists tab.

@lvmm
Copy link
Author

lvmm commented Apr 11, 2019

Good idea - allows to implement cloud-agnostic filter syncing, albeit with some manual operations. But I immediately ran into a problem: when on windows machine I added file:///c:\googledrive\ublock.filter as a custom filter in firefox-legacy version of ublock it worked like a charm, but the same line doesn't work in the latest version of ublock: constantly out of date and 0 out of 0 loaded. Is it a bug?

update: in chrome granting 'Allow access to file URLs' permission for ublock fixed this problem, but I cannot find anything similar in firefox.

@gwarser
Copy link

gwarser commented Apr 11, 2019

Firefox bug/limitation https://bugzilla.mozilla.org/show_bug.cgi?id=1266960
gorhill/uBlock#2922

gorhill added a commit to gorhill/uBlock that referenced this issue Apr 20, 2019
@uBlock-user uBlock-user added bug Something isn't working fixed issue has been addressed and removed something to address something to address labels Apr 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed issue has been addressed
Projects
None yet
Development

No branches or pull requests

3 participants