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

2846 Commits

Author SHA1 Message Date
Raymond Hill
0afe7c2231
More fine tuning of user interface
The rendering of the total number of blocked
requests will now be abbreviated using `M` and
`G` when the block count is respectively above
1 million and 1 billion.

The storage used figure in the Settings pane
will be rendered using KB, MB or GB.
2020-04-23 08:45:43 -04:00
Raymond Hill
04c07f3e10
Use large units for large values in Settings pane
Shorten "Storage used" values using large
units, i.e. shorten rendered values using
KB, MB, and GB for large figures.
2020-04-22 16:30:23 -04:00
Raymond Hill
64cb7fa843
Import translation work from https://crowdin.com/project/ublock 2020-04-22 16:29:57 -04:00
Raymond Hill
b277b084d5
More fine tuning of latest UI changes 2020-04-22 11:17:58 -04:00
Raymond Hill
4eef5432a9
More fine tuning of UI 2020-04-22 09:56:37 -04:00
Raymond Hill
5bee33253f
More work toward redesigning the UI
As per email feedback from Mozilla's
https://github.com/brampitoyo

This is yet another incremental step toward
redesigning the UI, much more is left to do.
The idea is to align uBO's UI to that of
Firefox Preview.

Additionally, code has been added to reset
the new popup panel to vertical layout should
the viewport be not wide enough to
accomodate the horizontal layout.

Related feedback:
- https://www.reddit.com/r/uBlockOrigin/comments/g4ufvi/
2020-04-21 16:33:08 -04:00
Raymond Hill
b5b72059eb
Import translation work from https://crowdin.com/project/ublock 2020-04-20 09:51:30 -04:00
Raymond Hill
8a6dc8ee88
Minor fine tuning of some dashboard visuals
More left to do as per reference documentation:
- https://protocol.mozilla.org/
- https://material.io/
2020-04-20 09:45:18 -04:00
Raymond Hill
7f999b759f
Fix broken DOM inspector [regression]
Regression from:
- 0bcf04d3dd

Related feedback:
- https://github.com/gorhill/uBlock/commit/0bcf04d3dda2#commitcomment-38594585

The DOM inspector client code is injected as
content script, thus it must be categorized as
non-privileged code.
2020-04-19 08:33:09 -04:00
Raymond Hill
21d7c7ee3d
More fine tuning of various visuals
Summarily:
- Bring back horizontal layout for fenix popup panel
  to be used in desktop environment
- Address feedback from
  https://github.com/gorhill/uBlock/commit/54b68ebd9426#commitcomment-38549940
- Allow future dark theme to be enabled programmatically
2020-04-18 09:48:53 -04:00
Raymond Hill
54b68ebd94
Fine tune various visuals
Related feedback:
- e917213e81 (commitcomment-38533349)
2020-04-16 08:49:34 -04:00
Raymond Hill
0bcf04d3dd
Centralize access to browser.storage.local('localStorage')
Related commit:
- 2ac288397c

Instead of having the `localStorage` data being accessed
from different locations, all accesses are now funnelled
to the main process.

Doing so simplifies the code in auxiliary processes and
also remove the need for browser.storage.local.onChanged()
listeners.

No longer using an onChanged() listener also happens to
remove spurious warnings from the Firefox console.
2020-04-15 15:55:29 -04:00
Raymond Hill
042935b22a
Ensure element picker's height is not affected by web sites
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/987
2020-04-15 09:46:12 -04:00
Raymond Hill
efa3c140ab
Fix typo in last commit
Related commit:
- 36711a7c07
2020-04-14 11:57:59 -04:00
Raymond Hill
8c1a055bfe
Import translation work from https://crowdin.com/project/ublock 2020-04-14 09:19:31 -04:00
Raymond Hill
b20e33ff18
Fine tune CSS to restore intended visuals on fenix 2020-04-14 09:15:36 -04:00
Raymond Hill
36711a7c07
Fix denyallow thrown away with pure hostname patterns 2020-04-14 09:10:59 -04:00
Raymond Hill
7f55e5d54d
Fine tune CSS and fix CSS regressions in last commit
Related commit:
- e917213e81

Specifically, intended font size was no longer
set properly for mobile in popup panel.
2020-04-13 16:40:12 -04:00
Raymond Hill
051cb27f9b
Fix syntax highlighting of line continuation
Thix fixes an exception being thrown when the
line being continued is the last one.
2020-04-13 14:26:17 -04:00
Raymond Hill
94935a4b9e
Pure origin filters can't have denyallow option
This fixes filters of the form:

  *$[...],denyallow=[...],domain=[...]
  |http://$[...],denyallow=[...],domain=[...]
  |https://$[...],denyallow=[...],domain=[...]
2020-04-13 14:22:21 -04:00
Raymond Hill
b5d8b0a9f0
Import translation work from https://crowdin.com/project/ublock 2020-04-13 09:31:22 -04:00
Raymond Hill
e917213e81
Sixth pass to re-design the dashboard
Related commits:
- 0662767dd6
- 99b2a0a761
- a8e3118fea
- 453f5450b6
- a45a21f337

This commit focuses on implementing the use of
CSS `var(...)` throughout so as to make it easy
to create themes -- a requirement for uBO to
support a dark theme.

There is still work to do regarding converting
uBO's CSS to completely support `var(...)` but
being able to start using theming will help
complete and fine tune CSS `var(...)` support.

Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/401
2020-04-13 09:19:58 -04:00
Raymond Hill
e4065ec05c
Import translation work from https://crowdin.com/project/ublock 2020-04-11 11:41:33 -04:00
Raymond Hill
0662767dd6
Fifth pass to re-design the dashboard
Related commits:
- 99b2a0a761
- a8e3118fea
- 453f5450b6
- a45a21f337

Fine tuned previous work.

Started the use of variable-based color values.
2020-04-11 11:32:43 -04:00
Raymond Hill
ebf7ade6b1
Import translation work from https://crowdin.com/project/ublock 2020-04-10 18:27:48 -04:00
Raymond Hill
99b2a0a761
Fourth pass to re-design the dashboard
Related commits:
- a8e3118fea
- 453f5450b6
- a45a21f337

Roughly, the changes in this commit:
- Make it easier to implement a dark theme eventually:
  - Flatten the look of buttons
  - Remove the use of `opacity` style property as a
    color modifier
- Some work toward removing dependency on FontAwesome
  font
2020-04-10 18:17:12 -04:00
Raymond Hill
a7dc0de98f
Update kbd shortcuts only if kbd shortcuts pane is enabled
Related feedback:
- https://github.com/uBlockOrigin/uBlock-issues/issues/386#issuecomment-611806957
2020-04-10 17:25:36 -04:00
Raymond Hill
b1cf3c46a7
Import translation work from https://crowdin.com/project/ublock 2020-04-09 09:36:34 -04:00
Raymond Hill
a8e3118fea
Third pass to re-design the dashboard
Related commits:
- 453f5450b6
- a45a21f337

This commit fixes parts of the re-design not
rendering as intended as per <https://github.com/brampitoyo>'s
feedback screenshots.

The dashboard tab buttons have been converted to
`span` tags (from `a` tags), thus eliminating
the unwanted side effect of the text being
rendered as unvisited links (blueish).

The font size intended for touch screens was not
taking effect due to bad cut & paste.

Other minor adjustments to improve consistency
in spacing.
2020-04-09 09:20:29 -04:00
Raymond Hill
03739ab96b
Add minimal-scale in meta tag 2020-04-08 10:23:40 -04:00
Raymond Hill
5a2e5cfe86
Import translation work from https://crowdin.com/project/ublock 2020-04-08 10:22:38 -04:00
Raymond Hill
4687c60bf9
Support fetching assets from CDNs when auto-updating
This commit add the ability to fetch from CDN servers
when an asset is fetched as a result of auto-update.

If an asset has a `cdnURLs` entry in `assets.json`,
the asset will be auto-updated using one of those
CDN URLs. When many CDN URLs are specified, those
URLs will be shuffled in order to spread the bandwidth
across all specified CDN servers. If all specified CDN
servers fail to respond, uBO will fall back to usual
`contentURLs` entry.

The `cdnURLs` are used only when an asset is
auto-updated, this ensures a user will get the more
recent available version of an asset when manually
updating.

The motivation of this new feature is to relieve
GitHub from acting as a CDN (which it is not) for
uBO -- an increasing concern with the growing adoption
of uBO along with the growing size of key uBO assets.
2020-04-08 09:57:55 -04:00
Raymond Hill
e8a9997de8
Import translation work from https://github.com/gorhill/uBlock 2020-04-06 14:05:16 -04:00
Raymond Hill
a45a21f337
Second pass to re-design the dashboard
Related commit:
- 453f5450b6

The changes in this commit are mostly related
to the "Filter lists" pane.

An eye icon has been added, which purpose is
to view the content of a list. Clicking on the
name of the list will toggle the list's
checkbox.
2020-04-06 14:00:19 -04:00
Raymond Hill
64d8904998
Fine tune font size for reworked dashboard UI
Related feedback:
- https://github.com/gorhill/uBlock/commit/453f5450b6e6#commitcomment-38305932

The larger font size is best justified for
touchscreen to allow tapping -- less justified
on devices with a mouse which allow for more
accurate selection.
2020-04-05 19:37:23 -04:00
Raymond Hill
453f5450b6
First pass to Re-design the dashboard
This is a first pass in which only the dashboard
navigation widget and the "Settings" pane have
been revisited.

Reference work:
- https://app.abstract.com/share/54f1465e-8d1c-4e7b-9ae4-f37e21bef7fe
2020-04-05 15:19:07 -04:00
Raymond Hill
20332c65b4
No need for "Shortcuts" pane in Firefox 74 and above
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/386
2020-04-05 09:47:22 -04:00
Raymond Hill
df08b12d48
Fix race condition at browser launch re. cosmetic filtering
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/974

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

The race condition was that a content script could
query the main process to retrieve cosmetic filters
while the cosmetic filters had not been yet fully
loaded into memory. The fix ensure that an already
injected content script will re-query once the
cosmetic filters are fully loaded in memory at
browser launch time.
2020-04-04 11:34:43 -04:00
Raymond Hill
1295e25961
Remove unused property 2020-04-03 09:07:22 -04:00
Raymond Hill
cc3152e803
Import translation work from https://crowdin.com/project/ublock 2020-04-03 09:02:55 -04:00
Raymond Hill
044a1dd6ee
Fix :style exception filters not being reported in logger
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/962

Regression from:
- 72bb700568
2020-03-26 09:19:02 -04:00
Raymond Hill
0078cea6a0
Import translation work from https://crowdin.com/project/ublock 2020-03-26 08:43:30 -04:00
Raymond Hill
2f927847f2
Discard :style() filters chained to procedural operators
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/961
2020-03-26 08:38:22 -04:00
Raymond Hill
151ff5326a
Import translation work from https://crowdin.com/project/ublock 2020-03-24 12:18:33 -04:00
Raymond Hill
2fcc41f641
Improve disqus_embed.js scriptlet
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/959

The problematic site does not declare the expected
`disqus_shortname` global variable, so the scriptlet
has been extended to deal with such occurrence.
2020-03-24 10:02:20 -04:00
Raymond Hill
11d24abea0
Move proxy-detection code to Firefox-specific code
Related commit:
- https://github.com/uBlockOrigin/uBlock-issues/issues/911

The motivation is to avoid executing code which is
unnecessary on platforms not supporting the browser.dns
API.
2020-03-23 13:31:43 -04:00
Raymond Hill
0c30bee3e3
Fix typo in proxy-detecting code
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/911

Related commit:
- https://github.com/gorhill/uBlock/commit/3f7ece94691f
2020-03-23 12:23:05 -04:00
Raymond Hill
3f7ece9469
Do not cname-uncloak when a proxy is in use
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/911

Since cname-uncloaking is available only on Firefox
at the moment, the fix is relevant only to Firefox.

By default uBO will no longer cname-uncloak when it
detects that network requests are being being proxied.

This default behavior can be overriden by setting the
new advanced setting `cnameUncloakProxied` to `true`.
The new setting default to `false`, i.e. cname-uncloaking
is disabled when uBO detects that a proxy is in use.

This new advanced setting may disappear once the
following Firefox issue is fixed:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1618271
2020-03-22 14:52:58 -04:00
Raymond Hill
f5204235b7
Use prime number to generate cache-bypass token
Related discussion:
- https://github.com/gorhill/uBlock/commit/048bfd251c9b#r37972005

From <https://github.com/gwarser>:

> I think this should be "modulo prime", not 12.
> If someone always turn on PC in "8am" there is
> a slight chance to hit cache.
2020-03-22 11:31:06 -04:00
Raymond Hill
381498daa2
Reorganize filter instances deduplication code
Related commit:
- https://github.com/gorhill/uBlock/commit/ab629b9e1093
2020-03-19 13:42:06 -04:00