1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-09-15 15:32:28 +02:00
Commit Graph

15 Commits

Author SHA1 Message Date
Raymond Hill
ee83a4304a
Isolate DOM inspector layers from page context
Related issue:
https://github.com/uBlockOrigin/uBlock-issues/issues/1411

Additionally, refactored communication mechanism between content
script contexts and uBO contexts by using MessageChannel/BroadcastChannel
web APIs.
2023-12-03 16:21:32 -05:00
Raymond Hill
a60a5c2772
Fix wrong syntax color highlight in "Trusted sites" pane
Related feedback:
- https://github.com/uBlockOrigin/uBlock-issues/discussions/2521
2023-03-02 20:50:32 -05:00
Raymond Hill
33c437f99f
Add source code viewer (from logger)
This commits add the ability to open html/css/script
resources from the logger, as a formatted and syntax-
highligthed document.

The goal is to make it easier for filter list authors to
investigate filter-related issues.
2023-03-01 11:04:40 -05:00
Raymond Hill
feaa338678
Code maintenance: replace uDom.js with dom.js
`uDom` is old and crusty and `dom` is meant as replacement. The
goal of `dom` is to be simpler and mainly just convenience
methods for handling the DOM with vanilla JS -- this is not a
framework.

Additionally, removed keyboard shortcuts pane which was useful
only on very old versions of Firefox.
2022-11-12 09:51:22 -05:00
Raymond Hill
e31637af78
[mv3] Add ability to enable/disable filter lists 2022-09-13 17:44:24 -04:00
Emilio Cobos Álvarez
4044aa182a
element-picker: Declare we support both light and dark color-schemes. (#3872)
This fixes https://github.com/uBlockOrigin/uBlock-issues/issues/2240 and
should get the desired behavior regardless of browser.

Delay showing the iframe until load to prevent flashing a white
background on the initial about:blank.
2022-09-11 07:34:29 -04:00
Raymond Hill
ecb73d2ff5
Bring dark theme out of experimental status
Too many changes to list here, essentially there is now a
user interface setting to enable/disable dark theme, and
I've rearranged a bit the Settings pane as a result and
also altered other visuals in various places.

There are places which I know have not been thoroughly
tested (i.e. logger inspector).

Will fine-tune as per feedback.

Issues with the classic popup panel will not be addressed,
and if feedback is that it has become unusuable, it will be
outright removed.
2022-02-02 15:40:47 -05:00
Raymond Hill
4ee8a5948d
Work toward bringing dark theme closer to a stable release
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/401
2022-01-30 18:35:26 -05:00
Raymond Hill
22022f636f
Modularize codebase with export/import
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1664

The changes are enough to fulfill the related issue.

A new platform has been added in order to allow for building
a NodeJS package. From the root of the project:

    ./tools/make-nodejs

This will create new uBlock0.nodejs directory in the
./dist/build directory, which is a valid NodeJS package.

From the root of the package, you can try:

    node test

This will instantiate a static network filtering engine,
populated by easylist and easyprivacy, which can be used
to match network requests by filling the appropriate
filtering context object.

The test.js file contains code which is typical example
of usage of the package.

Limitations: the NodeJS package can't execute the WASM
versions of the code since the WASM module requires the
use of fetch(), which is not available in NodeJS.

This is a first pass at modularizing the codebase, and
while at it a number of opportunistic small rewrites
have also been made.

This commit requires the minimum supported version for
Chromium and Firefox be raised to 61 and 60 respectively.
2021-07-27 17:26:04 -04:00
Raymond Hill
ee059540f7
Cache element picker's optimized candidates for reuse
Optimized candidates computed for each depth are now
cached for reuse. This reduces the amount of work
done when moving the depth slider.
2020-10-20 05:37:07 -04:00
Raymond Hill
a095b83250
Use a CodeMirror editor instance in element picker
This allows to bring in all the benefits of
syntax highlighting and enhanced editing
features in the element picker, like auto-
completion, etc.

This is also a necessary step to possibly solve
the following issue:

- https://github.com/gorhill/uBlock/issues/2035

Additionally, incrementally improved the behavior
of uBO's custom CodeMirror static filtering syntax
mode when double-clicking somewhere in a static
extended filter:

- on a class/id string will cause the whole
  class/id string to be   selected, including the
  prepending `.`/`#`.

- somewhere in a hostname/entity will cause all
  the labels from the cursor position to the
  right-most label to be selected (subject to
  change/fine-tune as per feedback of filter
  list maintainers).

Related feedback:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1134#issuecomment-679421316
2020-10-14 10:21:30 -04:00
Raymond Hill
f01bda1159
Rework visuals of element picker sliders
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/851
2020-09-12 07:28:46 -04:00
Raymond Hill
260f762c83
Add widget to control selector depth to element picker
Further iterating on the work done in following commit:
- 1268f0ae43

This commit adds a new widget to the element picker to
control the depth of a cosmetic filter selector. The
new widget is essentially just another way of selecting
the depth, which is still controllable through picking
one of the cosmetic filters in the list of candidates.
2020-09-10 10:32:53 -04:00
Raymond Hill
1268f0ae43
Add element picker widget to control specificity
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/851

The ctrl key is no longer used to adjust specificity of
a candidate filter.

A new widget has been added to adjust the specificity of
a candidate filter to various level. The widget will be
visible as long as the candidate filter matches one entry
in the list of suggested candidate cosmetic filters.
2020-09-09 09:27:53 -04:00
Raymond Hill
d23f9c6a8b
Isolate element picker's svg layers from page content
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1226

Related commit:
- 9eb455ab5e

In the previous commit, the element picker dialog was
isolated from the page content. This commit is to also
isolate the svg layers from the page content.

With this commit, there is no longer a need for an anonymous
iframe and the isolated world iframe is now directly
embedded in the page.

As a result, pages are now unable to interfere with any
of the element picker user interface. Pages can now only
see an iframe, but are unable to see the content of that
iframe. The styles applied to the iframe are from a user
stylesheet, so as to ensure pages can't override the
iframe's style properties set by uBO.
2020-09-03 10:27:35 -04:00