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

soft98.ir #126425

Closed
wants to merge 5 commits into from
Closed

soft98.ir #126425

wants to merge 5 commits into from

Conversation

MasterKia
Copy link
Contributor

@MasterKia MasterKia commented Aug 6, 2022

Address: #126252

Related: uBlockOrigin/uAssets#14278

I'll send pull request everyday to update the filters.

cc @zloyden @Yuki2718

@MasterKia
Copy link
Contributor Author

I could convert uBO to AdGuard syntax if that's really necessary.

@MasterKia
Copy link
Contributor Author

I get The 'MasterKia/AdguardFilters' repository doesn't contain the 'EnglishFilter/sections/foreign.txt' path in 'MasterKia-patch2/EnglishFilter/sections/foreign.txt'. when I try to edit the file.

Copy link
Collaborator

@Yuki2718 Yuki2718 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a general comment

soft98.ir##+js(acis, document.oncontextmenu)
soft98.ir##[src*="file.soft98.ir"]:upward(3):remove()

=>

soft98.ir#%#//scriptlet("abort-current-inline-script", "document.oncontextmenu")
soft98.ir#$?#[src*="file.soft98.ir"]:upward(3)  { remove: true; }

However, a rule for document.oncontextmenu should be in Annoyances if it's meant to tackle right click issue.

||file.soft98.ir^$all,redirect=nooptext => ||file.soft98.ir^$script,xmlhttprequest,redirect=nooptext (should be this way for uBO too)

soft98.ir##body > :nth-of-type(1):before:style(content: "در صورت دیدن هرگونه مشکل در سایت و یا پیغامی برای غیرفعال کردن افزونه حذف تبلیغات، کافیست به تنظیمات افزونه مسدودسازتان بروید و لیست AdGuard Base و PersianBlocker را بروز کنید." !important; color: #ff0000 !important; visibility: visible; font-size: large !important;)
=>
soft98.ir#$#body > :first-of-type:before { content: "در صورت دیدن هرگونه مشکل در سایت و یا پیغامی برای غیرفعال کردن افزونه حذف تبلیغات، کافیست به تنظیمات افزونه مسدودسازتان بروید و لیست AdGuard Base و PersianBlocker را بروز کنید." !important; color: #ff0000 !important; visibility: visible; font-size: large !important; }

@@||soft98.ir^$ghide => @@||soft98.ir^$generichide

@MasterKia
Copy link
Contributor Author

MasterKia commented Aug 6, 2022

@Yuki2718 Doesn't AdGuard translate these uBo syntax to AG compatible syntax internally anyway?

@MasterKia
Copy link
Contributor Author

MasterKia commented Aug 6, 2022

However, a rule for document.oncontextmenu should be in Annoyances if it's meant to tackle right click issue.

I'll drop this rule, no longer needed effective.

||file.soft98.ir^$script,xmlhttprequest,redirect=nooptext (should be this way for uBO too)

Doesn't work. It's supposed to remove the banner at the top like this, but your suggest filter doesn't do that on uBO.

@Yuki2718
Copy link
Collaborator

Yuki2718 commented Aug 6, 2022

Doesn't work. It's supposed to remove the banner at the top like this, but your suggest filter doesn't do that on uBO.

Then use according request type and corresponding redirect resource, $all is not very good for redirect.

@MasterKia
Copy link
Contributor Author

MasterKia commented Aug 6, 2022

Then use corresponding redirect resource

1x1.gif (and similar) => results in a big white square
noopframe => doesn't work
nooptext and click2load.html work.

Then use according request type $all is not very good for redirect.

Ok, I'll see if $image works.

@MasterKia
Copy link
Contributor Author

@Yuki2718 I can't edit the file.
#126425 (comment)

@Yuki2718
Copy link
Collaborator

Yuki2718 commented Aug 6, 2022

I can't edit the file.?

What? You can edit whatever file in you branch, right?

@MasterKia
Copy link
Contributor Author

MasterKia commented Aug 7, 2022

@Yuki2718 Please check if the syntax is acceptable.
Also could you test the :before:style() filter on Chromium? For me it only works on Firefox.

soft98.ir#$##last-news:before:style(content: "در صورت دیدن هرگونه مشکل در سایت و یا پیغامی برای غیرفعال کردن افزونه حذف تبلیغات، کافیست به تنظیمات افزونه مسدودسازتان بروید و لیست AdGuard Base را بروز کنید." !important; color: #E6000D !important; visibility: visible !important; font-size: medium !important;)

@@ -6459,11 +6459,36 @@ zoomit.ir#$#body[style^="padding-top:"] { padding-top: 0!important; }
zoomit.ir#$#body > .hotMenu[style="top: auto;"] { top: 0!important; }
zoomit.ir#$#body > nav.is-sticky[style="top: 130px;"] { top: 0!important; }
zoomit.ir#%#document.cookie = "BnShowNum=4; path=/;";
soft98.ir#$#[id^="sidebar"][id*="stick"] > section { opacity: 0 !important; pointer-events: none !important; }
soft98.ir#$#header[id]:has(.row) { remove: true; }
Copy link
Contributor

@zloyden zloyden Aug 8, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use syntax example.com#$?#.ad { remove: true; } for such rules.
Btw, they cause adb detection.

These rules work fine on my end. A directive is needed to limit platforms.

!#if (!adguard_app_windows && !adguard_app_mac && !adguard_app_android && !adguard_ext_android_cb)
||soft98.ir/engine/modules/antibot/antibot.php
||soft98.ir/engine/ajax/controller.php
||file.soft98.ir^$image,redirect=nooptext
||cdn.hostdl.com^$image,redirect=nooptext
||linkdoni.soft98.ir^
||iranicard.ir^$domain=soft98.ir
||asiatech.ir^$domain=soft98.ir
||sysban.ir^$domain=soft98.ir
||smostafa.ir^$domain=soft98.ir
soft98.ir##.show.fade.tooltip
!#endif

Copy link
Contributor Author

@MasterKia MasterKia Aug 8, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

they cause adb detection.

This site changes fast, if AdGuard merge my filters slowly they'll become useless.

@zloyden
Copy link
Contributor

zloyden commented Aug 8, 2022

Doesn't AdGuard translate these uBo syntax to AG compatible syntax internally anyway?

Our compiler does both, but when you add rules to our filters, they must be written using our syntax.

@MasterKia
Copy link
Contributor Author

MasterKia commented Aug 8, 2022

##header[id]:has(.row):remove() 
=>
#$?#header[id]:has(.row) {remove: true;}

##[src*="file.soft98.ir"]:upward(3):remove()
=>
#$?#[src*="file.soft98.ir"]:upward(3) {remove: true;}

^$ghide
=>
^$generichide

##+js(acis, document.oncontextmenu)
=>
#%#//scriptlet("abort-current-inline-script", "document.oncontextmenu")

##[src*="cdn.hostdl.com"]:style(color: white !important; background-color: white !important; border: white !important;) 
=>
#$#[src*="cdn.hostdl.com"] { color: white !important; background-color: white !important; border: white !important; }

@MasterKia
Copy link
Contributor Author

@zloyden I tried to be compatible.
Please check.

zloyden added a commit that referenced this pull request Aug 9, 2022
Copy link
Contributor

@zloyden zloyden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added some of your rules directly 1ea38d9, I can't edit your branch.

@zloyden zloyden closed this Aug 9, 2022
@MasterKia
Copy link
Contributor Author

The latest rules are:

soft98.ir##+js(rc, c6e1y2, *, stay)
soft98.ir##[src*="file.soft98.ir"]:style(color: #437593 !important; background-color: #437593 !important; border: #437593 !important;)
soft98.ir##[src*="cdn.hostdl.com"]:style(color: white !important; background-color: white !important; border: white !important;)
soft98.ir##:xpath(/html/body/div[*]/div/div[*]/div/div[1]):not(:has([role])):remove()
soft98.ir##[href*="linkdoni.soft98.ir"]:remove()
soft98.ir##:xpath(/html/body/div[*]/div/aside/section[*]/header):remove()
soft98.ir##:xpath(/html/body/div[*]/div/div/section[*]/header):remove()
soft98.ir##:xpath(/html/body/div[*]/div/aside/section[*]/div):has(img[src*="cdn.hostdl.com"]):style(color: white !important;)
soft98.ir##:xpath(/html/body/div[*]/div/aside/div/section/header):remove()
soft98.ir##:xpath(/html/body/div[*]/div/aside/div/section/div):remove()
soft98.ir##:xpath(/html/body/div[*]/div/div/div/section):remove()
soft98.ir##:xpath(/html/body/div[*]/div[*]/main/article[*]/span):remove()
soft98.ir##:xpath(/html/body/div[*]/div[*]/main/article[*]/div[*]):not(:has(img[src*="cdn.soft98.ir"])):not(:has-text(/)):not(:has-text(-)):not(:has(a[href*="/dl"])):remove()
soft98.ir##[href*="SMostafa.ir"]:remove()
||soft98.ir/engine/modules/antibot/antibot.php^$all
||soft98.ir/engine/ajax/controller.php^$all
||file.soft98.ir^$image,redirect=click2load.html
||cdn.hostdl.com^$image,redirect=click2load.html
||linkdoni.soft98.ir^$all
||iranicard.ir^$all,domain=soft98.ir
||iranicard.ir^$removeparam=/^utm_/
||asiatech.ir^$all,domain=soft98.ir
||asiatech.ir^$removeparam=/^utm_/
||cdn.hostdl.com/goto/soft98^$all
||sysban.ir^$all,domain=soft98.ir
||smostafa.ir^$all,domain=soft98.ir
@@||soft98.ir^$ghide

As you can see here, I'm constantly sending PRs and they get merged quickly:
https://github.com/uBlockOrigin/uAssets/pulls?q=is%3Apr+is%3Aclosed+author%3AMasterKia

@MasterKia MasterKia deleted the MasterKia-patch2 branch August 9, 2022 07:12
@zloyden
Copy link
Contributor

zloyden commented Aug 9, 2022

Not all of them are nedeed.
About using our syntax.

soft98.ir##+js(rc, c6e1y2, *, stay) - soft98.ir#%#//scripltet('remove-class', 'c6e1y2')
soft98.ir##[src*="cdn.hostdl.com"]:style(color: white !important; background-color: white !important; border: white !important;) - soft98.ir#$#[src*="cdn.hostdl.com"] { color: white !important; background-color: white !important; border: white !important; }
soft98.ir##[href*="linkdoni.soft98.ir"]:remove() - soft98.ir#$?#[href*="linkdoni.soft98.ir"] { remove: true; }
@@||soft98.ir^$ghide - @@||soft98.ir^$generichide

Why do you need a modifier $all - ||linkdoni.soft98.ir^$all?

@MasterKia
Copy link
Contributor Author

Why do you need a modifier $all - ||linkdoni.soft98.ir^$all?

I don't want them to get tricky with popups or redirects.

@zloyden
Copy link
Contributor

zloyden commented Aug 9, 2022

I got it, but don't see any popups on my end.

@MasterKia
Copy link
Contributor Author

MasterKia commented Aug 9, 2022

Disable AdGuard, refresh the page and click on the Amazon banner in the header => it's a popup.

The "آسیاتک" banner on the sidebar is also opens as a popup.

@Rusenche
Copy link

Rusenche commented Aug 9, 2022

The latest rules are:

soft98.ir##+js(rc, c6e1y2, *, stay)
soft98.ir##[src*="file.soft98.ir"]:style(color: #437593 !important; background-color: #437593 !important; border: #437593 !important;)
soft98.ir##[src*="cdn.hostdl.com"]:style(color: white !important; background-color: white !important; border: white !important;)
soft98.ir##:xpath(/html/body/div[*]/div/div[*]/div/div[1]):not(:has([role])):remove()
soft98.ir##[href*="linkdoni.soft98.ir"]:remove()
soft98.ir##:xpath(/html/body/div[*]/div/aside/section[*]/header):remove()
soft98.ir##:xpath(/html/body/div[*]/div/div/section[*]/header):remove()
soft98.ir##:xpath(/html/body/div[*]/div/aside/section[*]/div):has(img[src*="cdn.hostdl.com"]):style(color: white !important;)
soft98.ir##:xpath(/html/body/div[*]/div/aside/div/section/header):remove()
soft98.ir##:xpath(/html/body/div[*]/div/aside/div/section/div):remove()
soft98.ir##:xpath(/html/body/div[*]/div/div/div/section):remove()
soft98.ir##:xpath(/html/body/div[*]/div[*]/main/article[*]/span):remove()
soft98.ir##:xpath(/html/body/div[*]/div[*]/main/article[*]/div[*]):not(:has(img[src*="cdn.soft98.ir"])):not(:has-text(/)):not(:has-text(-)):not(:has(a[href*="/dl"])):remove()
soft98.ir##[href*="SMostafa.ir"]:remove()
||soft98.ir/engine/modules/antibot/antibot.php^$all
||soft98.ir/engine/ajax/controller.php^$all
||file.soft98.ir^$image,redirect=click2load.html
||cdn.hostdl.com^$image,redirect=click2load.html
||linkdoni.soft98.ir^$all
||iranicard.ir^$all,domain=soft98.ir
||iranicard.ir^$removeparam=/^utm_/
||asiatech.ir^$all,domain=soft98.ir
||asiatech.ir^$removeparam=/^utm_/
||cdn.hostdl.com/goto/soft98^$all
||sysban.ir^$all,domain=soft98.ir
||smostafa.ir^$all,domain=soft98.ir
@@||soft98.ir^$ghide

As you can see here, I'm constantly sending PRs and they get merged quickly: https://github.com/uBlockOrigin/uAssets/pulls?q=is%3Apr+is%3Aclosed+author%3AMasterKia

I confirm! These rules work for now. Tested with Ungoogled Chromium v.103.0.5060.134 i s uBlock Origin v.1.42.4.

https://i.postimg.cc/Yq0C6Mcs/SssS.png

Here it is in the picture, if it gets blocked, the site breaks. But it remains visible anyway - it's not a problem.

@MasterKia
Copy link
Contributor Author

MasterKia commented Aug 9, 2022

@Rusenche

Use:

Filters
soft98.ir##+js(rc, c6e1y2, *, stay)
soft98.ir##[src*="file.soft98.ir"]:style(color: #437593 !important; background-color: #437593 !important; border: #437593 !important;)
soft98.ir##[src*="cdn.hostdl.com"]:style(color: white !important; background-color: white !important; border: white !important;)
soft98.ir,~forum.soft98.ir##:xpath(/html/body/div[*]/div/div[*]/div/div[1]):has(a[href*="98"]):remove()
soft98.ir##[href*="linkdoni.soft98.ir"]:remove()
soft98.ir##:xpath(/html/body/div[*]/div/aside/section[*]/header):remove()
soft98.ir##:xpath(/html/body/div[*]/div/div/section[*]/header):remove()
soft98.ir##:xpath(/html/body/div[*]/div/aside/section[*]/div):has(img[src*="cdn.hostdl.com"]):style(color: white !important;)
soft98.ir##:xpath(/html/body/div[*]/div/aside/div/section/header):remove()
soft98.ir##:xpath(/html/body/div[*]/div/aside/div/section/div):remove()
soft98.ir##:xpath(/html/body/div[*]/div/div/div/section):remove()
soft98.ir##:xpath(/html/body/div[*]/div[*]/main/article[*]/span):remove()
soft98.ir##:xpath(/html/body/div[*]/div[*]/main/article[*]/div[*]):not(:has(img[src*="cdn.soft98.ir"])):not(:has-text(/)):not(:has(li)):not(:has(a[href*="/dl"])):remove()
soft98.ir##[href*="SMostafa.ir"]:remove()
||soft98.ir/engine/modules/antibot/antibot.php^$all
||soft98.ir/engine/ajax/controller.php^$all
||file.soft98.ir^$image,redirect=click2load.html
||cdn.hostdl.com^$image,redirect=click2load.html
||linkdoni.soft98.ir^$all
||iranicard.ir^$all,domain=soft98.ir
||iranicard.ir^$removeparam=/^utm_/
||asiatech.ir^$all,domain=soft98.ir
||asiatech.ir^$removeparam=/^utm_/
||cdn.hostdl.com/goto/soft98^$all
||sysban.ir^$all,domain=soft98.ir
||smostafa.ir^$all,domain=soft98.ir
@@||soft98.ir^$ghide

I'll try to get these merged into AdGuard as well so you don't have to manually use filters.

@Rusenche
Copy link

Rusenche commented Aug 9, 2022

@MasterKia

https://postimg.cc/fJ4sZ4Rc

Any idea on blocking this?

@MasterKia
Copy link
Contributor Author

Remove all previous filters and use the filters I sent here.

If that doesn't help, then disable AdGuard Base filters temporarily and see if it's still like that.

@MasterKia MasterKia mentioned this pull request Aug 9, 2022
@MasterKia
Copy link
Contributor Author

@Rusenche

You said you're using uBlock Origin, if that's the case then remove all of my filters and just update the Quick-Fixes list from uBO settings.

The related soft98 issue on uBO issue-tracker:
https://github.com/uBlockOrigin/uAssets/issues/14296

@Rusenche
Copy link

Rusenche commented Aug 9, 2022

Remove all previous filters and use the filters I sent here.

If that doesn't help, then disable AdGuard Base filters temporarily and see if it's still like that.

@MasterKia

I did exactly what you wrote but the result is as I showed it in the picture.

https://postimg.cc/fJ4sZ4Rc

You said you're using uBlock Origin, if that's the case then remove all of my filters and just update the Quick-Fixes list from uBO settings.

The related soft98 issue on uBO issue-tracker: https://github.com/uBlockOrigin/uAssets/issues/14296

I did exactly what you wrote but the result is as I showed it in the picture.

https://postimg.cc/fJ4sZ4Rc

@MasterKia
Copy link
Contributor Author

@Rusenche Okay I can reproduce using Ungoogled Chromium.

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.

4 participants