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 'adjust-setTimeout' / 'adjust-setInterval' — decrease the minimal value of 'boost' #262

Closed
AdamWr opened this issue Dec 2, 2022 · 0 comments

Comments

@AdamWr
Copy link
Member

AdamWr commented Dec 2, 2022

Sometimes if delay in setTimeout/setInterval is set to a high number, then we still need to wait until function will be executed.

Steps to reproduce:

  1. Add this rule:
example.org#%#//scriptlet('adjust-setTimeout', 'test', '*', '0.02')
  1. Go to - https://example.org/
  2. Run in console:
setTimeout(() => {
  alert('test');
}, 250000);

We still need to wait 5 seconds until alert will be executed.
Maybe we could add an additional option to set a specific value as a delay, so it will be not necessary to wait.

@adguard-bot adguard-bot changed the title Improve adjust-setTimeout/adjust-setInterval Improve 'adjust-setTimeout'/ 'adjust-setInterval' Jan 16, 2023
adguard pushed a commit that referenced this issue Mar 1, 2023
Squashed commit of the following:

commit 374041d
Author: Adam Wróblewski <adam@adguard.com>
Date:   Wed Mar 1 15:40:11 2023 +0100

    Update description

commit dd09356
Author: Adam Wróblewski <adam@adguard.com>
Date:   Wed Mar 1 12:42:55 2023 +0100

    Update description

commit ae2eb3a
Author: Adam Wróblewski <adam@adguard.com>
Date:   Wed Mar 1 12:10:16 2023 +0100

    Improve adjust-setTimeout/adjust-setInterval
    Change MIN_MULTIPLIER to 0.001
@adguard-bot adguard-bot changed the title Improve 'adjust-setTimeout'/ 'adjust-setInterval' Improve 'adjust-setTimeout' / 'adjust-setInterval' — decrease the minimal value of 'boost' Mar 7, 2023
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

3 participants