1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-09-29 22:27:12 +02:00
Commit Graph

164 Commits

Author SHA1 Message Date
Raymond Hill
84818fcd84
Prevent sites from disabling mouse events for the element picker
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/380
2019-01-15 14:41:23 -05:00
Raymond Hill
64bea27881
Add ability to control auto-commenting at filter creation time
Related issues:
- https://github.com/uBlockOrigin/uBlock-issues/issues/372
- https://github.com/gorhill/uBlock/issues/93

A new advanced settings has been added: `autoCommentFilterTemplate`.

Default value is `{{date}} {{origin}}`.

Placeholders are identified by `{{...}}`. There are currently
only three placeholders supported:

- `{{date}}`: will be replaced with current date
- `{{time}}`: will be replaced with current time
- `{{origin}}`: will be replaced with site information on which
  the filter(s) was created

If no placeholder is found in `autoCommentFilterTemplate`, this
will disable auto-commenting. So one can use `-` to disable
auto-commenting.

Additionally, if auto-commenting is enabled, uBO will not emit a
comment if an emitted comment would be a duplicate of the last
one found in the user filter list.
2019-01-08 07:37:50 -05:00
Raymond Hill
91144c4edc
Allow creating broad cosmetic filters directly from the picker
Using the Ctrl key while cliking an element on the page will cause
the picker to choose a broad cosmetic filter as candidate.
2018-12-22 15:44:23 -05:00
Raymond Hill
c8fcdedc44
Report inline script tags in logger if present in document
Related issue:
    - https://github.com/uBlockOrigin/uBlock-issues/issues/343
2018-12-21 14:17:47 -05:00
Raymond Hill
aeff011d4c
Remove obsolete comment 2018-12-21 07:32:23 -05:00
Raymond Hill
3730d7d128
Fix https://github.com/uBlockOrigin/uBlock-issues/issues/40 2018-12-20 17:29:39 -05:00
Raymond Hill
ed265e5f68
fix https://github.com/uBlockOrigin/uBlock-issues/issues/331 2018-12-06 08:50:13 -05:00
Raymond Hill
6d00583a50
fix blob: case as per feedback https://github.com/uBlockOrigin/uBlock-issues/issues/283#issuecomment-436371415 2018-11-06 17:22:09 -02:00
Raymond Hill
835dcd41f2
code review for 7d100f7b21: just the very slow opportunistic walk toward full ES6 code base 2018-11-06 16:20:44 -02:00
Raymond Hill
7d100f7b21
fix https://github.com/uBlockOrigin/uBlock-issues/issues/283 2018-11-06 16:11:03 -02:00
Raymond Hill
9039874fc9
refactor some webRequest-related code (now that firefox legacy is out of the way) 2018-10-28 10:58:25 -03:00
Raymond Hill
96525cffa5
code review for 3c85c03194: simplify counting of script resources 2018-09-01 06:36:17 -04:00
Raymond Hill
3c85c03194
fix #308, #3436, https://github.com/uBlockOrigin/uBlock-issues/issues/155
<https://github.com/gorhill/uBlock/issues/3436>: a new per-site switch
has been added, no-scripting, which purpose is to wholly disable/enable
javascript for a given site. This new switch has precedence over all
other ways javascript can be disabled, including precedence over dynamic
filtering rules.

The popup panel will report the number of script resources which have
been seen by uBO for the current page. There is a minor inaccuracy to
be fixed regarding the count, and which fix requires to extend request
journaling.

<https://github.com/gorhill/uBlock/issues/308>: the `noscript` tags will
now be respected when the new no-scripting switch is in effect on a given
site.

A default setting has been added to the _Settings_ pane to
disable/enable globally the new no-script switch, such that one can
work in default-deny mode regarding javascript execution.

<https://github.com/uBlockOrigin/uBlock-issues/issues/155>: a new
hidden setting, `requestJournalProcessPeriod`, has been added to
allow controlling the delay before uBO internally process it's
network request journal queue. Default to 1000 (milliseconds).
2018-08-31 18:47:02 -04:00
Raymond Hill
ed492bc485
fix https://github.com/uBlockOrigin/uBlock-issues/issues/170, #2240 2018-08-15 07:58:42 -04:00
Raymond Hill
1aa5497841
fix https://github.com/uBlockOrigin/uBlock-issues/issues/162 2018-08-12 19:58:33 -04:00
Raymond Hill
12118e83aa
code review re. https://github.com/gorhill/uBlock/issues/2356#issuecomment-406909702 2018-07-23 09:54:25 -04:00
Raymond Hill
8db80dc4b8
fix #2356 2018-07-22 15:33:35 -04:00
Raymond Hill
8be1aed04d
guard against future instances of issue fixed in #3721 2018-05-03 09:55:36 -04:00
Raymond Hill
674c3c6079
fix https://github.com/uBlockOrigin/uBlock-issues/issues/17 2018-04-29 09:07:12 -04:00
anvakl
4d3a2b5f85 Minor fixes to code (#3720)
* Fix leftovers from old code.

* change changes.procedural.size to changes.procedural.length

changes.procedural is an array so it should be changes.procedural.length
the  code works with changes.procedural.size because (undefined !== 0) is always true.
2018-04-24 06:05:30 -04:00
Hugo Xu
47ae08b0b1 Accept ubo:// (#3682)
This prevents AdBlock and ABP from reacting to subscription links of uBO-only filters.
2018-04-06 17:32:18 -04:00
Raymond Hill
ec29c9a127
fix #3382 2017-12-31 16:05:23 -05:00
Kacper Michajłow
ec70c75264 improve DOM inspector (#3254)
* dom-inspector: Improvments

- Fix race between userCSS injection and element highlight resulting in none or not all elements highlighted.
- Fix page being scanned twice resulting in unneeded slowdown.

* dom-inspector: Clear mutationTimer to allow more than one update.

* dom-inspector: Fix procedural filters shown as declarative with expando.
2017-11-21 18:08:32 -05:00
gorhill
b85ea96d1e
fix #3257 2017-11-21 13:38:31 -05:00
gorhill
806032cdc4
improve DOM inspector
- Fix regressions reported in #3159
- Fix #2001
- Fix some item points in #407
2017-11-20 08:42:32 -05:00
gorhill
374e157b11
fix #3159 2017-11-14 15:03:20 -05:00
gorhill
034e46b055
mind isTrusted for click events (see https://palant.de/2017/11/11/on-web-extensions-shortcomings-and-their-impact-on-add-on-security) 2017-11-12 07:44:28 -05:00
gorhill
3044590fa6
code review: allow free scrolling in element picker mode 2017-10-31 08:26:51 -04:00
gorhill
005c659500
code review: improve element picker for touch-only devices 2017-10-28 09:07:41 -04:00
gorhill
a76f5b15ac
fix https://github.com/gorhill/uBlock/issues/3160#issuecomment-338509997 2017-10-23 12:21:37 -04:00
gorhill
4f7aab695c
fix #3160 2017-10-22 08:59:29 -04:00
gorhill
6112a68faf
fix #2984 2017-10-21 13:43:46 -04:00
gorhill
a6b01cb0e5
fix #3090 2017-10-04 11:14:24 -04:00
gorhill
5f72565f7a
fix #2873 2017-08-15 09:09:16 -04:00
gorhill
5b66a8419d
ignore "Delete" key in element picker mode 2017-05-31 07:26:01 -04:00
gorhill
062846a7d2
make zapper compatible with touch screens 2017-05-29 10:38:22 -04:00
gorhill
189c9d55dd
convenience: shift-click to stay in element-zapper mode 2017-05-28 13:45:11 -04:00
gorhill
39aeaa12a7
new feature: element zapper 2017-05-27 11:51:24 -04:00
gorhill
fd776bbf51
fix #2622 2017-05-20 17:05:55 -04:00
gorhill
582edd5e62
fix #2519 2017-04-08 10:40:38 -04:00
gorhill
cf123b9264
fix #2448 2017-03-13 13:03:51 -04:00
Nik Rolls
a121f2261d DOM Inspector: Fallback to .childNodes when .children not present (#2242)
When the browser does not support .children on the svgRoot element
(MS Edge, for example), filter childNodes for elements and use that
list instead.
2017-02-28 01:19:00 -05:00
gorhill
798e21de36 fix #2414 2017-02-27 16:29:36 -05:00
gorhill
1c4347d69d element picker improvement: to not discard class information when an id is available
Use class(es) whenever available instead of the id when selecting a
broad cosmetic filter (ctrl-click).
When asking for a broad cosmetic filter, using the id instead of
whatever available class(es) is limiting usefulness. The change
here address this.
Example of use case: open
<http://forums.mozillazine.org/viewtopic.php?f=38&t=3027325>.
Now how to remove all signature widgets from all posts?
Without the change here, this was not possible without opening the
browser's inspector, finding out and manually typing whatever class
is used to identify the signature's root element.
With this commit, ctrl-click will now use whatever class information
exist instead of the id.
2017-02-13 08:33:10 -05:00
gorhill
9309df4196 3rd-party filters pane revisited 2017-01-22 16:05:16 -05: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
251bbe0f43 use plain E instead of Greek epsilon (for some reason does not render fine in FFox) 2016-12-25 17:05:30 -05:00
gorhill
73a69711f2 add chainable and recursive cosmetic procedural filters 2016-12-25 16:56:39 -05:00
gorhill
c39adacc50 better abstraction of user styles 2016-12-16 16:25:36 -05:00
gorhill
a1fa4d0fe9 fix #2060 2016-10-08 15:14:24 -04:00
gorhill
6557024434 code review re. #1772: fixed previewing of :has() filters 2016-10-01 13:34:20 -04:00
gorhill
c084853d9a fix #1772: ability to preview procedural cosmetic filters 2016-10-01 12:34:25 -04:00
gorhill
6000adb751 help generate better suggested cosmetic filters for iframes 2016-08-21 09:49:11 -04:00
gorhill
a76703b6ad convenience fix for #1901 2016-08-15 13:10:32 -04:00
gorhill
d82a7e1ece fix #1897 2016-08-15 07:52:50 -04:00
gorhill
6fd0bb4291 more refactoring of content script: better modularization of various components 2016-08-12 08:55:35 -04:00
gorhill
6bd356dd2c fix #1856 2016-08-06 12:05:01 -04:00
gorhill
cc6f80610f fix regression: exception thrown when creating filter thru element picker 2016-08-05 13:51:56 -04:00
gorhill
02e6b088ef further refactoring + performance: skip surveying DOM after too many empty resultset 2016-07-09 19:21:46 -04:00
gorhill
7f9c01d38f fix https://github.com/gorhill/uBlock/issues/769#issuecomment-229873048 and more completely #762 + dom inspector regressions 2016-07-01 08:09:48 -04:00
gorhill
6c513629bf refactor content script code + add support for new :has & :xpath filters
Aside extending cosmetic filtering abilities, I expect this will
also take care of some long standing issues (I will have to find them
and mark them as "resolved" by this commit, as time allow).
2016-06-27 19:09:04 -04:00
gorhill
1cd24380ce more sensible fix to #1725 2016-06-16 10:55:49 -04:00
gorhill
a33dc4f8e2 fix #1725 (assuming the issue was uBO not properly blocking data: images) 2016-06-16 09:46:18 -04:00
gorhill
c0515c20a4 set a limit on longth of suggested network filters (see https://github.com/gorhill/uBlock/issues/1725#issuecomment-226479197) 2016-06-16 09:15:49 -04:00
gorhill
c5fd181bff fix #1629 2016-05-13 11:10:09 -04:00
gorhill
62a4cafe2f code review re. #1202: mind style priority (repro case at #1575) 2016-04-19 09:15:06 -04:00
gorhill
051cc685ce element picker: code review 2016-04-17 10:15:01 -04:00
gorhill
c68ff1487a element picker: more sensible implementation ctrl-clicking a filter candidate 2016-04-16 13:21:48 -04:00
gorhill
e475e1ece8 this fixes #650; code reviewed changes re. #1202, #1545; fine tuning picker UI 2016-04-16 11:20:01 -04:00
gorhill
def2b7cbff this fixes #1202, #1545, other improvements 2016-04-15 12:27:53 -04:00
gorhill
ebcafc8db2 this fixes #1529: harden element picker styles against external changes 2016-04-03 08:34:28 -04:00
gorhill
18937849c3 code review as per feedback from last commit: 99a3d96310 (commitcomment-16748337) 2016-03-17 12:16:56 -04:00
gorhill
99a3d96310 this addresses https://github.com/ABPIsrael/EasyListHebrew/issues/89 2016-03-17 10:32:11 -04:00
gorhill
eb8c17d55c this takes care of #1443 2016-03-08 16:35:06 -05:00
gorhill
3e526476d7 block-by-size: some sites use outline, this hides our placeholders 2016-01-24 19:57:57 -05:00
gorhill
58838ce4c5 blocked-image-by-size: getComputedStyle() on Pale Moon can return null 2016-01-23 16:57:20 -05:00
gorhill
7a0b4356ad blocked-image-by-size: be sure placeholder is visible in interactive mode 2016-01-23 16:42:23 -05:00
gorhill
4bb9ef59ba this fixes #1258 2016-01-19 15:04:44 -05:00
gorhill
89148351e8 #1163: this implements "block elements by size" 2016-01-17 13:30:43 -05:00
gorhill
9b1db96254 this fixes subscribe links not working if URL has a fragment identifier 2015-12-18 12:18:34 -05:00
gorhill
e2e86de89a this fixes #1031 2015-12-08 14:06:33 -05:00
gorhill
c3aadde898 code review re. #1024 2015-12-07 11:18:56 -05:00
gorhill
85dcf6ee17 this fixes #1024 2015-12-07 11:09:39 -05:00
gorhill
3b61f7d11d minor code review 2015-12-07 11:06:06 -05:00
gorhill
89f0e8f1a9 this fixes #1015 2015-12-05 18:02:04 -05:00
gorhill
2750b13e34 code review 2015-12-03 01:08:37 -05:00
gorhill
21b5aa8f38 this fixes #738 2015-11-24 15:27:39 -05:00
gorhill
77504cb561 this fixes #951 2015-11-20 08:47:29 -05:00
gorhill
43be9f2c22 set an id for html tag of epicker
this enables FF users to override epicker style properties
2015-10-30 13:04:01 -04:00
gorhill
6600a27c33 https://github.com/chrisaljoudi/uBlock/issues/1528: apply fix to element picker 2015-08-28 10:56:05 -04:00
gorhill
94a1d72fc8 https://github.com/chrisaljoudi/uBlock/issues/1528: apply fix to scriptlets too 2015-08-28 10:44:33 -04:00
gorhill
9b4b998364 #608: this fixes a bunch of strictness-related warnings 2015-08-18 11:44:24 -04:00
gorhill
595b239df1 this fixes #546 2015-07-30 12:29:37 -04:00
gorhill
d3f741f8fd DOM inspector: to properly report cosmetic filters for dynamically added elements 2015-07-11 07:38:03 -04:00
gorhill
e3e4d577ee this makes shadow DOM work on Firefox 2015-07-06 13:53:39 -04:00
gorhill
497eb87fb0 avoid reporting the DOM layout while it is loading 2015-07-06 10:24:28 -04:00
gorhill
febb18147a #435: using shadow nodes instead of modifying directly nodes' style attr 2015-07-06 07:48:56 -04:00
gorhill
93c4502acc bypass FF's built CSS.escape(), to benefit from serializeAsString 2015-07-03 06:56:15 -04:00
gorhill
cc6a811934 CSS.escape: support "serialize a string" to avoid pointless escaping 2015-07-03 06:34:18 -04:00