Skip to content

Fix #239168 esladvice.com - #239592

Open
xglossyntx wants to merge 2 commits into
AdguardTeam:masterfrom
xglossyntx:Fix-#239168
Open

Fix #239168 esladvice.com#239592
xglossyntx wants to merge 2 commits into
AdguardTeam:masterfrom
xglossyntx:Fix-#239168

Conversation

@xglossyntx

@xglossyntx xglossyntx commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Creating the pull request

Please include a summary of the change and which issue is fixed
If the related issue does not exist in our repository, please create it before making pull request
It is highly recommended to use our Web Reporting Tool instead of creating an issue on GitHub directly
Please note, that we verify every pull request manually, so it may take time to apply it

Prerequisites

To avoid invalid pull requests, please check and confirm following terms

  • This is not an ad/bug report;
  • My code follows the guidelines and syntax of this project;
  • I have performed a self-review of my own changes;
  • My changes do not break web sites, apps and files structure.

What problem does the pull request fix?

If the problem does not fall under any category that is listed here, please write a comment below in corresponding section

  • Missed ads or ad leftovers;
  • Website or app doesn't work properly;
  • AdGuard gets detected on a website;
  • Missed analytics or tracker;
  • Social media buttons — share, like, tweet, etc;
  • Annoyances — pop-ups, cookie warnings, etc;
  • Filters maintenance.

What issue is being fixed?

Enter the issue address

Fix #239168

Terms

  • By submitting this issue, I agree that pull request does not contain private info and all conditions are met

@xglossyntx
xglossyntx marked this pull request as ready for review August 28, 2026 10:41
@xglossyntx

Copy link
Copy Markdown
Contributor Author

I wasn’t sure where to put this. It might be more accurate to put it in Tweaks, but I’m not sure, so I’ll leave it in the base for now. Someone can let me know if it should be moved.

@ghajini

ghajini commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

can you check on mobile device?

@xglossyntx

Copy link
Copy Markdown
Contributor Author

can you check on mobile device?

On mobile, I get an anti adblock message regardless of the suggested rule.

@xglossyntx

Copy link
Copy Markdown
Contributor Author

I’m not really sure why either, since the anti ad block overlay element is the same as on desktop, so it should already be blocked.

@xglossyntx

Copy link
Copy Markdown
Contributor Author

It could be caused by filter optimization, but I would have to look into it further, as I’m not sure at the moment.

@ghajini

ghajini commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

on mobile device i see antiadblock + nuisance you described in your report even with filter in this PR biosjourney.com,esladvice.com#%#//scriptlet("trusted-replace-node-text", "script", "innerHTML", "(sessionKey) === '1'", "(sessionKey) === '0'")


below filters fix for me

esladvice.com#%#//scriptlet('trusted-suppress-native-method', 'Storage.prototype.setItem', 'mustClickAd0', 'prevent')
esladvice.com#%#//scriptlet('trusted-suppress-native-method', 'Storage.prototype.setItem', 'mustClickAd1', 'prevent')
esladvice.com###delulu-overlay

@xglossyntx

Copy link
Copy Markdown
Contributor Author

The anti-adblock issue is already fixed. It appears that we just need to exclude the rule from optimization.

https://github.com/AdguardTeam/AdguardFilters/blob/a514e8945acafe51a09d9fe69847222f6bbf54fc/BaseFilter/sections/antiadblock.txt#L4390 however it is missing in https://filters.adtidy.org/android/filters/2_optimized.txt

@ghajini

ghajini commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

ok can you make necessary changes & make fix workable in all possible products?

@xglossyntx

Copy link
Copy Markdown
Contributor Author

below filters fix for me

mustClickAd It is exclusive to esladvice.com and won’t work on the other sites they rotate through.

Example from biosjourney.com:

    function setCookie(name, value, minutes) {
    let expires = "";
    if (minutes) {
    const date = new Date();
    date.setTime(date.getTime() + (minutes * 60 * 1000));
    expires = "; expires=" + date.toUTCString();
    }
    document.cookie = name + "=" + value + expires + "; path=/";
    }
    function getCookie(name) {
    const nameEQ = name + "=";
    const cookies = document.cookie.split(';');
    for (let i = 0; i < cookies.length; i++) {
    let c = cookies[i].trim();
    if (c.indexOf(nameEQ) === 0) return c.substring(nameEQ.length);
    }
    return null;
    }
    const cooldownCookie = 'adScriptCooldown';
    if (getCookie(cooldownCookie) === '1') {
    document.getElementById('nfo').style.display = "none";
    document.getElementById('f3d754ce73f1e47df96b1bd70a72f62ce632b78f82431f7758003cbbdd24667f').style.display = "block";
    document.getElementById('sf3d754ce73f1e47df96b1bd70a72f62ce632b78f82431f7758003cbbdd24667f').style.display = "block";
    } else {
    function setInstructionText() {
    let instructionText = '<div style="background:#f8f9fa;border:1px solid #eaeaea;border-radius:6px;padding:20px;margin:10px 0;text-align:center;">'
    + '<p style="font-size:15px;color:#1a1a2e;font-weight:600;margin:0 0 8px;">Open an article for a moment</p>'
    + '<p style="font-size:13px;color:#888;margin:0;">Spend a moment on the article, then return here.</p>'
    + '<p style="font-size:12px;color:#aaa;margin:8px 0 0;font-style:italic;">Tip: Open in a new tab if the page redirects.</p>'
    + '</div>';
    let notViewingAdTitle = "You are not reading the article!";
    let waitOnTabText = '<div style="background:#fff8e1;border:1px solid #ffe082;border-radius:6px;padding:16px;margin:10px 0;text-align:center;">'
    + '<p style="font-size:14px;color:#f57f17;font-weight:600;margin:0;">&#9888; Please stay on the article page</p>'
    + '</div>';
    document.getElementById('nfo').innerHTML = instructionText;
    return { notViewingAdTitle, waitOnTabText };
    }
    const { notViewingAdTitle, waitOnTabText } = setInstructionText();
    var timf3d754ce73f1e47df96b1bd70a72f62ce632b78f82431f7758003cbbdd24667f = Math.floor(Math.random() * (30 - 15 + 1)) + 15;
    const sessionKey = 'viewTask0';
    if (sessionStorage.getItem(sessionKey) === null) {
    const shouldRun = Math.random() <= 1;
    sessionStorage.setItem(sessionKey, shouldRun ? '1' : '0');
    }
    if (sessionStorage.getItem(sessionKey) === '0') {
    var monitor = setInterval(function () {
    var elem = document.activeElement;
    if (elem && elem.tagName == 'IFRAME') {
    document.getElementById('nfo').innerHTML = "";
    clearInterval(monitor);
    strf3d754ce73f1e47df96b1bd70a72f62ce632b78f82431f7758003cbbdd24667f();
    }
    }, 100);
    } else {
    document.getElementById('nfo').style.display = "none";
    document.getElementById('f3d754ce73f1e47df96b1bd70a72f62ce632b78f82431f7758003cbbdd24667f').style.display = "block";
    document.getElementById('sf3d754ce73f1e47df96b1bd70a72f62ce632b78f82431f7758003cbbdd24667f').style.display = "block";
    }
    function strf3d754ce73f1e47df96b1bd70a72f62ce632b78f82431f7758003cbbdd24667f() {
    var intervalf3d754ce73f1e47df96b1bd70a72f62ce632b78f82431f7758003cbbdd24667f = setInterval(function () {
    if (timf3d754ce73f1e47df96b1bd70a72f62ce632b78f82431f7758003cbbdd24667f <= 0) {
    clearInterval(intervalf3d754ce73f1e47df96b1bd70a72f62ce632b78f82431f7758003cbbdd24667f);
    document.getElementById("nfo").innerHTML = "";
    document.title = "Completed!";
    document.getElementById('f3d754ce73f1e47df96b1bd70a72f62ce632b78f82431f7758003cbbdd24667f').style.display = "block";
    document.getElementById('sf3d754ce73f1e47df96b1bd70a72f62ce632b78f82431f7758003cbbdd24667f').style.display = "block";
    sessionStorage.setItem(sessionKey, '0');
    setCookie(cooldownCookie, '1', 1);
    } else {
    let timm = timf3d754ce73f1e47df96b1bd70a72f62ce632b78f82431f7758003cbbdd24667f;
    if (document.hasFocus() == false) {
    document.title = timm + " seconds left";
    document.getElementById("nfo").innerHTML = '<div style="background:#f8f9fa;border:1px solid #eaeaea;border-radius:6px;padding:16px;margin:10px 0;text-align:center;">'
    + '<p style="font-size:14px;color:#1a1a2e;font-weight:600;margin:0;">Processing... ' + timm + ' left</p>'
    + '</div>';
    timf3d754ce73f1e47df96b1bd70a72f62ce632b78f82431f7758003cbbdd24667f -= 1;
    } else {
    document.title = notViewingAdTitle;
    document.getElementById("nfo").innerHTML = waitOnTabText;
    }
    }
    }, 1000);
    }
    }

@ghajini

ghajini commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Example from biosjourney.com

can tell me link , STR ?

i don't get redirected to biosjourney.com but it could be possible with

biosjourney.com#%#//scriptlet('trusted-suppress-native-method', 'Storage.prototype.setItem', 'viewTask0', 'prevent')
biosjourney.com#%#//scriptlet('trusted-suppress-native-method', 'Storage.prototype.setItem', 'viewTask1', 'prevent')

@xglossyntx

Copy link
Copy Markdown
Contributor Author

Example from biosjourney.com

can tell me link , STR ?

i don't get redirected to biosjourney.com but it could be possible with

biosjourney.com#%#//scriptlet('trusted-suppress-native-method', 'Storage.prototype.setItem', 'viewTask0', 'prevent')
biosjourney.com#%#//scriptlet('trusted-suppress-native-method', 'Storage.prototype.setItem', 'viewTask1', 'prevent')

That is correct, and it works fine. I was just saying that it would get annoying to create a separate rule for every site, which is why I was trying to create one rule that would work on all of them.

@ghajini

ghajini commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

ok finally i got redirected(after constant reloads) to trash site.

esladvice.com#%#//scriptlet('trusted-suppress-native-method', 'Storage.prototype.setItem', '/mustClickAd\d+/', 'prevent')
biosjourney.com#%#//scriptlet('trusted-suppress-native-method', 'Storage.prototype.setItem', '/viewTask\d+/', 'prevent')
biosjourney.com,esladvice.com###delulu-overlay
biosjourney.com##.ad-728x250-wrapper

@xglossyntx

Copy link
Copy Markdown
Contributor Author

All right, I updated it. Let me know if everything works all right for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

esladvice.com

2 participants