Commit graph

45 commits

Author SHA1 Message Date
Raymond Hill
e1d75ee602
Prevent reverse-lookup from finding badfilter-ed filters
This could occur when clicking old entries in the logger
which no longer matched the internal state of uBO.

Related feedback:
- https://github.com/MajkiIT/polish-ads-filter/issues/14768#issuecomment-536006312
2019-09-30 08:53:02 -04:00
Raymond Hill
23c4c80136
Add support for elemhide (through specifichide)
Related documentation:
- https://help.eyeo.com/en/adblockplus/how-to-write-filters#element-hiding

Related feedback/discussion:
- https://www.reddit.com/r/uBlockOrigin/comments/d6vxzj/

The `elemhide` filter option as per ABP semantic is
now supported. Previously uBO would consider `elemhide`
to be an alias of `generichide`.

The support of `elemhide` is through the convenient
conversion of `elemhide` option into existing
`generichide` option and new `specifichide` option.

The purpose of the new `specifichide` filter option
is to disable all specific cosmetic filters, i.e.
those who target a specific site.

Additionally, for convenience purpose, the filter
options `generichide`, `specifichide` and `elemhide`
can be aliased using the shorter forms `ghide`,
`shide` and `ehide` respectively.
2019-09-21 11:30:38 -04:00
Raymond Hill
5eff4a027a
Fix https://github.com/gorhill/uBlock/issues/3541 2019-05-20 18:29:28 -04:00
Raymond Hill
3573b6b32c
Add ability to report exception cosmetic filters in the logger
Related issue:
- https://github.com/gorhill/uBlock/issues/127

Additionally, the extended exception filters in the
logger will be rendered with a line-through to more
easily distinguish them from non-exception ones.

Also, opportunistically converted revisited code to
ES6 syntax.
2019-05-16 13:44:49 -04:00
Raymond Hill
93f80eedfa
Refactor runtime storage of specific cosmetic filters
This was a TODO item:
- 07cbae66a4/src/js/cosmetic-filtering.js (L375)

µBlock.staticExtFilteringEngine.HostnameBasedDB has been
re-factored to accomodate the storing of specific cosmetic
filters.

As a result of this refactoring:

- Memory usage has been further decreased
- Performance of selector retrieval marginally
  improved
- New internal representation opens the door
  to use a specialized version of HNTrie, which
  should further improve performance/memory
  usage
2019-05-14 08:52:34 -04:00
Raymond Hill
0edf53f508
Add export-to-clipboard feature to logger
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/334

Additionally, a number of smallish issues following
refactoring of the logger code were addressed.
2019-01-14 14:57:31 -05:00
Raymond Hill
183caa2782
fix regression from ba32c6a473 2018-09-09 18:08:07 -04:00
Raymond Hill
108fb425fc
fix typo in comment 2018-09-06 12:55:57 -04:00
Raymond Hill
ba32c6a473
fix https://github.com/uBlockOrigin/uBlock-issues/issues/208 2018-09-06 12:51:50 -04:00
Raymond Hill
51a4e9ccf4
fix #2763 2018-07-22 10:47:02 -04:00
Raymond Hill
d5f40b90f6
fix #2179 2018-07-22 08:14:02 -04:00
Raymond Hill
8e9fe020b5
allow to view list content from blocked-document page 2018-07-21 12:22:53 -04:00
Raymond Hill
ab867dedf5
improve in-memory storage of specific cosmetic filters + more ES6
- collate together specific filters with same base domain
- replace string-based hash to integer-based hash
- revisit code to benefit from ES6-specific syntax
2018-05-31 10:41:03 -04:00
Raymond Hill
333c6f60fb
fix #3580 2018-03-07 06:28:26 -05:00
Raymond Hill
959f68ce89
fix #3494 2018-03-01 13:11:17 -05:00
Raymond Hill
a9f68fe02f
Fix #3069, and consequently #3374, #3378.
A new filtering class has been created: "static extended filtering".
This new class is an umbrella class for more specialized filtering
engines:
- Cosmetic filtering
- Scriptlet filtering
- HTML filtering

HTML filtering is available only on platforms which support modifying
the response body on the fly, so only Firefox 57+ at the moment.

With the ability to modify the response body, HTML filtering has
been introduced: removing elements from the DOM before the source
data has been parsed by the browser.

A consequence of HTML filtering ability is to bring back script tag
filtering feature.
2017-12-28 13:49:02 -05:00
Raymond Hill
3f335ad432
address incomplete fix for #2877 as per feedback: dec0b80a72 (commitcomment-26447318) 2017-12-23 08:14:08 -05:00
gorhill
6e18829f02
add to #2984: fix regressions, as per feedback and code review 2017-10-23 09:01:00 -04:00
gorhill
14109b33d6
minor code review 2017-10-22 14:20:33 -04:00
gorhill
ef84e6d8fd
fix https://github.com/gorhill/uBlock/issues/2984#issuecomment-338475886 2017-10-22 12:48:13 -04:00
gorhill
6112a68faf
fix #2984 2017-10-21 13:43:46 -04:00
gorhill
4639d75896
fix #3101 2017-10-06 13:35:45 -04:00
gorhill
2c9c98eb79
fix #2664 2017-06-07 17:35:22 -04:00
gorhill
dbe95c438b
fix #2666 2017-05-31 11:49:37 -04:00
gorhill
c7a9befdab
fix #2664 2017-05-30 13:04:01 -04:00
gorhill
f3e6057e07
fix #2598: refactor to address the cause rather than the symptoms 2017-05-25 17:46:59 -04:00
gorhill
0232382695
refactor static network filtering, add support for csp injection 2017-05-12 10:35:11 -04:00
Raymond Hill
3b9fd49c50 Assets management refactored (#2314)
* refactoring assets management code

* finalizing refactoring of assets management

* various code review of new assets management code

* fix #2281

* fix #1961

* fix #1293

* fix #1275

* fix update scheduler timing logic

* forward compatibility (to be removed once 1.11+ is widespread)

* more codereview; give admins ability to specify own assets.json

* "assetKey" is more accurate than "path"

* fix group count update when building dom incrementally

* reorganize content (order, added URLs, etc.)

* ability to customize updater through advanced settings

* better spinner icon
2017-01-18 13:17:47 -05:00
gorhill
c6dbdbd23b code review of procedural cosmetic filters + better validate :style option (#2278) 2016-12-30 10:32:17 -05:00
gorhill
73a69711f2 add chainable and recursive cosmetic procedural filters 2016-12-25 16:56:39 -05:00
gorhill
015d38dc8c fix #1691 (regression from a7fe367eec) 2016-10-30 15:54:05 -04:00
gorhill
aac6c091c2 fix regression from a7fe367eec: see https://github.com/uBlockOrigin/uAssets/issues/138#issuecomment-246666723 2016-09-13 09:03:00 -04:00
gorhill
b9d1cd54bc fix #1779: do not give up scanning the list if first match turns out negative 2016-07-04 19:42:34 -04:00
gorhill
e99d993a4c new content script code: perf work re. high-high generics
Now splitting high-high generics in two subgroups: one group for
simple selectors, another group for complex selectors. Turns out
the great majority of high-high generics are simple selectors, and
simple selectors can be applied incrementally with DOM changes, as
opposed to complex selectors. This brings in a significant perf.
improvement in the processing of high-high generics (previously,
all high-high generic selectors were processed as one big complex
selector).
2016-06-28 22:01:15 -04:00
gorhill
a5ecf2ed68 fix #1691 2016-06-06 09:11:27 -04:00
gorhill
04d59367b0 minor code review 2016-02-17 10:04:55 -05:00
gorhill
939b3a2d83 this fixes #1392 2016-02-16 13:15:30 -05:00
gorhill
520e251112 this fixes #1093 2015-12-22 11:17:32 -05:00
gorhill
ea49484dd3 this fixes #1067 + partially fixes #1070 2015-12-15 10:40:40 -05:00
gorhill
2cd47098b1 this fixes #835 2015-10-16 11:42:45 -04:00
gorhill
ce12fdba01 update reverse lookup code to deal with #711 2015-09-13 14:59:33 -04:00
gorhill
de393cf020 this fixes looking up ##a[href^="..."] 2015-06-19 13:11:30 -04:00
gorhill
34723e1a45 code review 2015-06-13 13:32:14 -04:00
gorhill
9a5404ef07 this fixes the other half of #58: from which list(s) a cosmetic filter originates 2015-06-13 11:21:55 -04:00
gorhill
060a43fe81 this addresses half of #58: find list(s) from which a static network filter originates 2015-06-11 12:12:23 -04:00