1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-07-08 12:57:57 +02:00
Commit Graph

112 Commits

Author SHA1 Message Date
Raymond Hill
43e0e15125
More fine-tuning of element picker visual/behavior
- Group "Pick" and "Preview"
- Set minimal button width
- Auto-minimize when picking instead of fully hiding the dialog:
  this allows to quit while in picking mode
2024-03-03 10:08:56 -05:00
Raymond Hill
6266c4718d
Move "Quit" button to top bar in element picker
Additionally:

- Removed auto fade out of dialog when mouse does not hover the
  dialog.
- Added a minimize/maximize button in top bar

Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/55
2024-03-02 16:45:03 -05:00
Raymond Hill
953c978d59
Move dragbar to the top of element picker dialog
Also fine-tuning CSS for small screen displays.

Related feedback:
https://github.com/uBlockOrigin/uBlock-discussions/discussions/871
2024-03-01 11:56:22 -05:00
Raymond Hill
68186a9242
Minor code review 2024-02-13 17:52:05 -05:00
Raymond Hill
d80a3e30f8
Minor code review 2024-02-13 16:41:45 -05:00
Fanboynz
397d6d47b9
Fix Chartbeat flicker control div's (#3913) 2024-02-13 16:35:20 -05:00
Raymond Hill
310bfec6a1
Remove obsolete web accessible resources 2023-12-08 12:06:34 -05:00
Raymond Hill
06d22ca6c3
Fix details regarding light/dark theme in dom inspector
Related feedback:
https://github.com/uBlockOrigin/uBlock-issues/issues/1411#issuecomment-1841509464
2023-12-05 17:38:12 -05:00
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
rajiv
a8cf08325d
Add enableLazyLoad function
see https://developers.google.com/publisher-tag/reference#javascript_16

Fixes https://github.com/uBlockOrigin/uAssets/issues/20988
2023-12-01 02:20:40 -05:00
Raymond Hill
bd8a91ed3a
Add support to redirect to noop.json
There ar ea couple of AdGuard filters supporting this local
resource.

Reference:
https://github.com/AdguardTeam/Scriptlets/blob/master/wiki/about-redirects.md#noopjson
2023-11-16 09:54:21 -05:00
Dave Vandyke
c1d8f5908d
More improvements to the google-ima shim script (#3908)
We have enabled the google-ima shim script again in the DuckDuckGo
Privacy Essentials browser extension, and found a couple more issues:
- Some websites set the enablePreloading[1] option, which should
  cause[2] the AdsManager.init() method to trigger the LOADED AdEvent
  to fire. If the event doesn't fire, those websites can get stuck
  waiting for the event forever.
- When AdsManager.start() method is called, a bunch of events are
  dispatched in order, to simulate ads loading, playing and
  finishing. There was a mistake in that logic though. The
  CONTENT_PAUSE_REQUESTED and CONTENT_RESUME_REQUESTED events[3]
  should fire as the ads start and finish respectively. By firing the
  latter early, and skipping the former, some websites got confused
  and tried to display ad overlays at the same time as playing their
  content, or didn't display they content at all.

1 - https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/reference/js/google.ima.AdsRenderingSettings#enablePreloading
2 - https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/preload#timing
3 - https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/reference/js/google.ima.AdEvent
2023-11-16 09:41:07 -05:00
Dave Vandyke
0fa30a73c5
Further improve google-ima shim script (#3900)
I worked through some of the websites listed in the google-ima shim
script issue[1], to see what was going wrong. It turned out the
addEventListener method supports an optional context Object, which is
bound to the listener if provided. Some websites make use of that,
and then break when `this` is not bound correctly when events are
dispatched.

See also https://github.com/duckduckgo/tracker-surrogates/pull/24

1 - https://github.com/uBlockOrigin/uBlock-issues/issues/2265
2023-10-25 12:00:21 -04:00
Dave Vandyke
b445f4f4cd
Improve google-ima shim script (#3899)
We made use of the google-ima shim script from uBlock in the
DuckDuckGo Privacy Essentials extension recently, but found a few
issues with website breakage. After debugging and fixing those[1], I
thought it would be worth sharing the improvements back again. Issues
we ran into:

- The AdDisplayContainer[2] constructor usually creates some DOM
  elements inside the given container. They are all nested within a
  DIV and some websites break when at least that top DIV element isn't
  created.
- While not documented (that I could see), the event listeners can be
  added using an array of event types. Some websites make use of that
  and then hang forever when the expected events aren't fired. This
  caused videos not to play on some websites.
- The Ad.prototype.getUniversalAdIds()[3] method should return an
  array of UniversalAdIdInfo Objects, instead of an Array of
  strings. When an array of strings are returned, some websites then
  break when the UniversalAdIdInfo's methods are missing.
- The UniversalAdIdInfo.prototype.getAdIdValue()[4] method had a typo
  in the name ("getAsIdValue") and was effectively missing. That
  caused some websites to break when the missing method was called.
- The google.ima.OmidVerificationVendor[5] Object was missing, which
  broke some websites that attempted to access it.

1 - 52f2999523
2 - https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/reference/js/google.ima.AdDisplayContainer
3 - https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/reference/js/google.ima.Ad#getUniversalAdIds
4 - https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/reference/js/google.ima.UniversalAdIdInfo#getAdIdValue
5 - https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/reference/js/google.ima#.OmidVerificationVendor
2023-10-24 11:16:14 -04:00
Raymond Hill
02c7b32bef
Improve google-ima.js surrogate
Related issues:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2265
- https://github.com/uBlockOrigin/uAssets/issues/19981
2023-10-07 12:27:03 -04:00
Raymond Hill
7bcc340ab0
Add commented keywords to googlesyndication_adsbygoogle.js scriptlet
Related issue:
https://github.com/uBlockOrigin/uBlock-issues/issues/2773
2023-08-10 09:54:58 -04:00
Raymond Hill
3c609793fd
Improve fingerprint2.js scriptlet
Related issue:
https://github.com/uBlockOrigin/uBlock-issues/issues/2741
2023-08-09 09:28:05 -04:00
Raymond Hill
ee0649329c
Remove obsolete web_accessible_resources
Add removed resource as an alias of `no-window-open-if.js`.

Related discussion:
- https://github.com/uBlockOrigin/uAssets/issues/19002#issuecomment-1638367659
2023-07-18 09:39:06 -04:00
Raymond Hill
cdf385f5f4
Add missing (deprecated) method to google ima
Related feedback:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2265#issuecomment-1637094149
2023-07-16 11:23:31 -04:00
Raymond Hill
ec06981965
Improve compatibility with AdGuard's scriptlets
Related:
https://testcases.agrd.dev/Filters/scriptlet-rules/test-scriptlet-rules.html
2023-07-11 18:25:21 -04:00
Raymond Hill
7184f93cb0
Return empty array instead of undefined
Related discussion:
- https://github.com/uBlockOrigin/uAssets/discussions/18649
2023-06-23 20:42:58 -04:00
Raymond Hill
0bd4b600cf
Rework nowoif scriptlet
New official name: `no-window-open-if`.

The pattern will now be matched against all arguments passed
to `window.open()`: all the arguments are joined as a single
space-spearated string, and the result is used as the target
for matching the pattern.

To enable logging, used the extra parameters approach, i.e.
`log, 1`, which should come after the positional arguments
`pattern`, `delay`, and `decoy`.
2023-06-17 11:53:08 -04:00
Raymond Hill
3b14fd915a
Fix cloud storage widget not showing (regression)
Related feedback:
- 50afd5ae38 (commitcomment-108294887)
2023-04-10 10:03:51 -04: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
4564e3a9b8
Add redirectable resource noop.css, as suggested
Related feedback:
- https://github.com/uBlockOrigin/uAssets/issues/16391#issuecomment-1396316194
2023-01-23 16:39:46 -05:00
Raymond Hill
f596559103
Add options stub to nofab scriptlet
Related issue:
- https://github.com/uBlockOrigin/uAssets/issues/16010

Related AdGuard commit re. `prevent-fab-3.2.0`:
- 3bfb9b39e9
2022-12-15 13:12:37 -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
fb4059d11c
Add missing API method in neutered resource 2022-10-24 09:11:02 -04:00
Raymond Hill
5a9cd724ca
Add missing method to neutered api 2022-10-15 14:46:12 -04:00
Raymond Hill
115f7bb687
Fix operator token-to-ctor map
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2294
2022-09-26 22:27:50 -04:00
Raymond Hill
e31637af78
[mv3] Add ability to enable/disable filter lists 2022-09-13 17:44:24 -04:00
Raymond Hill
067e128163
Patch google-ima shim script for proper integration into uBO
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2158

Additionally, added firing of CONTENT_RESUME_REQUESTED event in
start() method.
2022-09-11 11:03:47 -04:00
Raymond Hill
b6b6e49d57
Add original Firefox-authored google-ima shim script
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2158
2022-09-11 10:54:54 -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
04114942aa
Add missing method to shim script
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2225
2022-08-21 12:54:02 -04:00
Raymond Hill
c521479ef9
Add 0.5s mp3 redirectable resource
Command used to generate 0.5s mp3 file:

ffmpeg -ar 48000 -t 0.5 -f s16le -acodec pcm_s16le -ac 2 -i /dev/zero -acodec libmp3lame -aq 4 noop-0.5s.mp3

Related filter issue:
- https://github.com/uBlockOrigin/uAssets/issues/14231
2022-08-14 13:06:00 -04:00
Raymond Hill
e62604f889
Add queue-related initialization code to AMZN shim script
This would render obsolete the AMZN-related exception at the
following URL:

https://play.mylifetime.com/shows/married-at-first-sight/season-15/episode-1

And possibly lower the likelihood of breakage on other sites.
2022-08-05 11:26:23 -04:00
Raymond Hill
313d694040
Add missing method to outbrain surrogate script
Related issue:
- https://github.com/uBlockOrigin/uAssets/issues/13834
2022-06-25 11:06:05 -04:00
Raymond Hill
ef25f30b30
Squashed commit of the following:
commit 34a290bdd62013591b17efbd2320698b95925c00
Author: Yuki2718 <58900598+Yuki2718@users.noreply.github.com>
Date:   Mon Feb 7 19:14:02 2022 +0900

    update last commit

commit f34ffbcc3d78bc98ee43b015f0ad0dae9d99720e
Author: Yuki2718 <58900598+Yuki2718@users.noreply.github.com>
Date:   Mon Feb 7 19:05:17 2022 +0900

    Improve and rename canrunads.js

Related issue:
- https://github.com/AdguardTeam/Scriptlets/issues/190

Related commit:
- e8bfc9a031
2022-02-07 07:05:44 -05:00
Raymond Hill
e44768f5d3
Ensure click2load.html widget is dark-theme aware
Related feedback:
- https://github.com/uBlockOrigin/uBlock-issues/discussions/1963#discussioncomment-2117460
2022-02-05 13:34:48 -05: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
e8bfc9a031
Add canrunads.js as redirectable resource
Related discussion:
- 036e13101e (commitcomment-65068100)
2022-01-29 08:40:47 -05:00
Raymond Hill
a5ca565e9c
Add hashComponents() to FingerprintJS v3 shim
Related feedback:
- f4824bd0d9 (commitcomment-64534458)
2022-01-28 09:26:57 -05:00
Raymond Hill
fba680f9ab
Improve google-analytics shim
Related issue:
- https://github.com/uBlockOrigin/uAssets/issues/11456
2022-01-24 12:26:24 -05:00
Raymond Hill
f4824bd0d9
Add shim for FingerprintJS (aka Fingerprint v3)
Related issue:
- https://github.com/uBlockOrigin/uAssets/issues/11408
2022-01-21 08:38:48 -05:00
Raymond Hill
fb0de0cc9c
Wait for placeholders to be present
Related issue:
- https://www.reddit.com/r/uBlockOrigin/comments/rgxlda/adblock_detected/

Related discussion:
- 137070f226 (commitcomment-61964299)
2021-12-15 09:08:04 -05:00
Raymond Hill
d17d634b7c
Define new nobab scriptlet
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1863

As per internal discussion with team, best to have a simpler
scriplet, and which is hard-coded to work only on a specific
set of domains -- only those seen used by BAB.
2021-12-08 12:10:18 -05:00
Raymond Hill
92ad101557
Update nobab.js scriptlet
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1863

As discussed internally with uBO filters team.
2021-12-08 10:24:03 -05:00