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

Improve 'trusted-click-element' — add ability to click element if cookie doesn't exist #298

Closed
AdamWr opened this issue Mar 6, 2023 · 0 comments

Comments

@AdamWr
Copy link
Member

AdamWr commented Mar 6, 2023

At the moment if rule like this:

example.org#%#//scriptlet('trusted-click-element', 'a', 'cookie:test')

is used, then element is clicked only if specific cookie exist.

It would be nice to have opposite option to click element only if specific cookie doesn't exist, something like:

example.org#%#//scriptlet('trusted-click-element', 'a', '!cookie:test')
@adguard-bot adguard-bot assigned slavaleleka and unassigned zzebrum Mar 6, 2023
@slavaleleka slavaleleka added the enhancement Improvement of existent feature label Mar 22, 2023
adguard pushed a commit that referenced this issue Mar 28, 2023
…sn't exist. #298

Squashed commit of the following:

commit 19d09f4
Author: Adam Wróblewski <adam@adguard.com>
Date:   Tue Mar 28 13:10:20 2023 +0200

    Do not reassign function parameters

commit 2b6fef7
Author: Adam Wróblewski <adam@adguard.com>
Date:   Mon Mar 27 14:15:24 2023 +0200

    Fix typo in description

commit eaf048a
Author: Adam Wróblewski <adam@adguard.com>
Date:   Mon Mar 27 11:56:13 2023 +0200

    Use parseMatchArg helper
    Use native startsWith in parseMatchArg helper
    Return string in parseMatchArg helper
    Add test with cookie value
    Set isInvertedMatchCookie and isInvertedMatchLocalStorage to false instead of null
    Rever test for abort-on-stack-trace
    Fix typo in description

commit df78bc3
Author: Adam Wróblewski <adam@adguard.com>
Date:   Tue Mar 21 20:17:52 2023 +0100

    Add ability to click element if cookie/localStorage item doesn't exist
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants