Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More AdGuard names are missing for scriptles #2828

Closed
8 tasks done
krystian3w opened this issue Sep 22, 2023 · 0 comments
Closed
8 tasks done

More AdGuard names are missing for scriptles #2828

krystian3w opened this issue Sep 22, 2023 · 0 comments
Labels
enhancement New feature or request fixed issue has been addressed

Comments

@krystian3w
Copy link

krystian3w commented Sep 22, 2023

Prerequisites

  • I verified that this is not a filter list issue. Report any issues with filter lists or broken website functionality in the uAssets issue tracker.
  • This is not a support issue or a question. For support, questions, or help, visit /r/uBlockOrigin.
  • I performed a cursory search of the issue tracker to avoid opening a duplicate issue.
  • The issue is not present after disabling uBO in the browser.
  • I checked the documentation to understand that the issue I am reporting is not normal behavior.

I tried to reproduce the issue when...

  • uBO is the only extension.
  • uBO uses default lists and settings.
  • using a new, unmodified browser profile.

Description

I checked some AdGuard suggestions how create scriptlet filters and a few was marked as unrecognized.

! not recognized as nano-setInterval-booster.js (nano-sib.js)
example.org#%#//scriptlet('adjust-setInterval')
example.org#%#//scriptlet('adjust-setInterval', 'example')
example.org#%#//scriptlet('adjust-setInterval', 'example', '400')
example.org#%#//scriptlet('adjust-setInterval', 'example', '', '2')
example.org#%#//scriptlet('adjust-setInterval', '', '2000', '0.02')
example.org#%#//scriptlet('adjust-setInterval', '', '2000', '0.001')
example.org#%#//scriptlet('adjust-setInterval', '', '*', '0.02')

! not recognized as nano-setTimeout-booster.js (nano-stb.js)
example.org#%#//scriptlet('adjust-setTimeout')
example.org#%#//scriptlet('adjust-setTimeout', 'example')
example.org#%#//scriptlet('adjust-setTimeout', 'example', '400')
example.org#%#//scriptlet('adjust-setTimeout', 'example', '', '2')
example.org#%#//scriptlet('adjust-setTimeout', '', '2000', '0.02')
example.org#%#//scriptlet('adjust-setTimeout', '', '2000', '0.001')
example.org#%#//scriptlet('adjust-setTimeout', 'test', '*')

! not recognized as window-close-if.js (as they both share the same task and parameter handling)
example.org#%#//scriptlet('close-window')
example.org#%#//scriptlet('close-window', '/example-page.html')

! not recognized as refresh-defuser.js
example.org#%#//scriptlet('prevent-refresh')
example.com#%#//scriptlet('prevent-refresh', '3')
! AdGuard recommends now numbers without citation (last parameter is marked as invalid by uBo and GitHub linter)
example.com#%#//scriptlet('prevent-refresh', 3)
! But this may be an error in their 'wiki'.

obraz

I'm skipping the redirection surrogates check for now, because there I find it more difficult to detect what is no longer supported as a surrogate.

A specific URL where the issue occurs.

https://example.com/
https://example.org/

Steps to Reproduce

  1. copy demo filters
  2. paste into My filters tab/panel
  3. Tada 🎉

Expected behavior

Consider adding more names as an "alias", except close-window?

Actual behavior

All demo filters may not working at all now.

uBO version

1.52.0

Browser name and version

Firefox 117.0.1

Operating System and version

Windows 11

@gwarser gwarser added the enhancement New feature or request label Sep 22, 2023
gorhill added a commit to gorhill/uBlock that referenced this issue Sep 28, 2023
@MasterKia MasterKia added the fixed issue has been addressed label Sep 28, 2023
thypon pushed a commit to brave/uBlock that referenced this issue Sep 28, 2023
* Use AG version of urlhaus list

Related discussion:
uBlockOrigin/uAssets#7636 (comment)

* Remove unmaintained urlhaus PUP filter list

Related issue:
uBlockOrigin/uBlock-issues#2844

* Add scriptlet aliases for compatibility with AdGuard lists

Related issue:
uBlockOrigin/uBlock-issues#2828

* New revision for dev build

* Make Firefox dev build auto-update

* Add `prevent-canvas` scriptlet

Prevent usage of specific or all (default) canvas APIs.

Syntax

```text
example.com##+js(prevent-canvas [, contextType])
```

- `contextType`: A specific type of canvas API to prevent (default to all
  APIs). Can be a string or regex which will be matched against the type
  used in getContext() call. Prepend with `!` to test for no-match.

Examples

1. Prevent `example.com` from accessing all canvas APIs

```adblock
example.com##+js(prevent-canvas)
```

2. Prevent access to any flavor of WebGL API, everywhere

```adblock
*##+js(prevent-canvas, /webgl/)
```

3. Prevent `example.com` from accessing any flavor of canvas API except `2d`

```adblock
example.com##+js(prevent-canvas, !2d)
```

References

https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/getContext

---------

Co-authored-by: Raymond Hill <rhill@raymondhill.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request fixed issue has been addressed
Projects
None yet
Development

No branches or pull requests

3 participants