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

Not work on adguard android #170

Closed
1 task done
bropines opened this issue Jun 15, 2024 · 25 comments
Closed
1 task done

Not work on adguard android #170

bropines opened this issue Jun 15, 2024 · 25 comments

Comments

@bropines
Copy link

在提交 issue 之前,请先确认

  • 脚本已更新至最新版本

使用的油猴扩展是?

Adguard for android

使用的浏览器是?

Chrome

问题会在哪个网页上出现?

All

问题是?

The problem arises simply when importing the script. The adgruppd refuses to import it, despite the fact that it imports any others.

Screenshot_2024-06-15-13-33-35-941_com adguard android

here is the documentation of the adguard:
https://adguard.com/kb/general/userscripts/

before some kind of adguard update, everything worked, then the button stupidly stopped appearing, and the script could not update. Installing older versions of the extension did not help.

@hymbz
Copy link
Owner

hymbz commented Jun 15, 2024

I didn't encounter this issue here. The script was successfully imported, and the URL used is: https://update.sleazyfork.org/scripts/374903/ComicRead.user.js.

photo_2024-06-15_21-35-13

From the error message, it seems that there might be an issue with the URL you entered or a network problem.

@bropines
Copy link
Author

I didn't encounter this issue here. The script was successfully imported, and the URL used is: https://update.sleazyfork.org/scripts/374903/ComicRead.user.js.

photo_2024-06-15_21-35-13

From the error message, it seems that there might be an issue with the URL you entered or a network problem.

I thought so too, but I deliberately took it and tried to upload the file. I assume you don't have the nigthly version?
(maybe speak russian?)

@hymbz
Copy link
Owner

hymbz commented Jun 15, 2024

Do you mean the nightly version installed through this link: https://agrd.io/android_nightly? I tried it, and it can also import scripts normally.

Try using the GitHub link: https://raw.githubusercontent.com/hymbz/ComicReadScript/master/ComicRead.user.js.

Additionally, I do not speak Russian. I'm using adguard for Android for the first time, switching to Russian to make sure I'm on the right page.

@bropines
Copy link
Author

bropines commented Jun 15, 2024

msedge_TyZ8pjCWh2.mp4

Is this some kind of joke? I installed version (on the emulator, it has the Internet, checked it on TikTok) 4.4.1 and I once installed the script on it. But now it doesn't work. What version do you have? (On the left is the emulator, on the right is my device)

@bropines
Copy link
Author

bropines commented Jun 15, 2024

If I wrote anything to Adgard, where I was sent far and long
AdguardTeam/AdguardForAndroid#5354 (comment)

If anything, the script itself opens as a file or link on my device. But not added
image

@hymbz
Copy link
Owner

hymbz commented Jun 15, 2024

In my test, this error message appears due to network issues.

Because of the network situation in China, I need to enable Clash for Android to access the script's URL. In the video, I first turned off Clash, and then this error message appeared when importing the script. After turning on Clash, the problem was resolved.

AdGuard.mp4

@hymbz
Copy link
Owner

hymbz commented Jun 16, 2024

Try replacing the @resource section of the code with the following, then save it as a file and try importing it to see if it works?

// @resource        solid-js https://cdn.jsdelivr.net/npm/[email protected]/dist/dev.cjs
// @resource        fflate https://cdn.jsdelivr.net/npm/[email protected]/umd/index.js
// @resource        qr-scanner https://cdn.jsdelivr.net/npm/[email protected]/qr-scanner.legacy.min.js
// @resource        dmzjDecrypt https://greasyfork.org/scripts/467177/code/dmzjDecrypt.js?version=1207199
// @resource        solid-js|store https://cdn.jsdelivr.net/npm/[email protected]/store/dist/dev.cjs
// @resource        solid-js|web https://cdn.jsdelivr.net/npm/[email protected]/web/dist/dev.cjs

@bropines
Copy link
Author

works. however, I had to turn off the filtering and turn on the German VPN. it remains to understand what is being blocked here or who is blocking users from Russia

@hymbz
Copy link
Owner

hymbz commented Jun 16, 2024

Can the Russian network access https://registry.npmmirror.com/fflate/0.8.1/files/umd/index.js?

@bropines
Copy link
Author

Can the Russian network access [registry.npmmirror.com/fflate/0.8.1/files/umd/index.js](https://registry.npmmirror.com/fflate/0.8.1/files/umd/index. js)?

Well, on the phone and PC he opens it. I tried running curl in termux without a VPN, it pings all links. But when I also import the file, it does not import, saying that the link is incorrect.

I also can't see the UI in Chrome.

@bropines
Copy link
Author

I tried to upload it separately in extensions in the Yandex browser, it works, but through adg it doesn’t. At the same time, the Yandex video translator works quietly.

scrcpy_hEkGTiSdW4.mp4

hymbz added a commit that referenced this issue Jun 21, 2024
@hymbz
Copy link
Owner

hymbz commented Jun 21, 2024

Because I need to use a VPN to access many websites, I can't test too many of them.

Some websites malfunction because AdGuard lacks support for GM.addStyle. I have already released an updated version to address this issue. However, there are still some websites that don't work properly, and I can't pinpoint the exact reason.

@bropines
Copy link
Author

bropines commented Jun 21, 2024

Because I need to use a VPN to access many websites, I can't test too many of them.

Some websites malfunction because AdGuard lacks support for GM.addStyle. I have already released an updated version to address this issue. However, there are still some websites that don't work properly, and I can't pinpoint the exact reason.

I will test. I’ll write what it is and how it works.

@hymbz
Copy link
Owner

hymbz commented Jun 24, 2024

Try importing the script through the URL again, it might work now.

@bropines
Copy link
Author

Try importing the script through the URL again, it might work now.

The import works if I add the lines you wrote above to the file, but the link does not work. It also does not work on hitomi and exhentai. How stupid is it to stupidly display the button, and not through gm.style? Or then do we need to rework the entire code?

hymbz added a commit that referenced this issue Jun 26, 2024
@hymbz
Copy link
Owner

hymbz commented Jun 26, 2024

@bropines
Copy link
Author

bropines commented Jun 26, 2024

Try this link: master/ComicRead-AdGuard.user.js (raw)

Not on the first try (it looks like there are already bugs on the adguard side), but it was imported, and even unlike a regular script, it displayed a list of sites that are supported. Import works, but UI does not appear yet...

@hymbz
Copy link
Owner

hymbz commented Jun 27, 2024

Because Adguard does not support GM_registerMenuCommand, it is not possible to use the "Simple Reading Mode". Therefore, I created another version of the script, removing the related functionality and making the script run only on specified websites.

The reason why it can't run on hitomi is probably because the ad filtering rules you are using contain hitomi.la##+js(noeval), which prevents the script from running properly. You need to add a filtering rule @@||hitomi.la^$jsinject.

uBlock Origin extension also needs to add a rule.

@@injections.adguard.org
hitomi.la#@#+js(noeval)
hitomi.la#@#+js(abort-on-property-read, open)

@hymbz
Copy link
Owner

hymbz commented Jun 30, 2024

Running the script through Adguard will cause the script to be blocked by the ad-blocking software. It is necessary to troubleshoot and modify the relevant blocking rules. Therefore, it is more recommended to use the Tampermonkey extension to run it.

@bropines
Copy link
Author

bropines commented Jul 1, 2024

If you add a rule to adguard, then everything works, and even the button display.
@@||hitomi.la^$jsinject

IMG_20240701_144309

@bropines
Copy link
Author

bropines commented Jul 1, 2024

I can try the rules for other sites and write where it works and where it doesn't.

@hymbz
Copy link
Owner

hymbz commented Jul 4, 2024

Since the script can now be imported and run normally, is this issue considered resolved?

@bropines
Copy link
Author

bropines commented Jul 4, 2024

Since the script can now be imported and run normally, is this issue considered resolved?

well, just in case, you can add to the readme about jokes with adguard so that geniuses like me don't suffer. And so yes, I will close the issue. thanks

@bropines bropines closed this as completed Jul 4, 2024
@bropines
Copy link
Author

bropines commented Jul 4, 2024

I made such filters. Stupidly took them from the code and from the readme

@@||bbs.yamibo.com^$jsinject
@@||www.yamibo.com^$jsinject
@@||manhua.idmzj.com^$jsinject
@@||e-hentai.org^$jsinject
@@||nhentai.net^$jsinject
@@||www.yurifans.com^$jsinject
@@||www.copymanga.com^$jsinject
@@||www.ponpomu.com^$jsinject
@@||terra-historicus.hypergryph.com^$jsinject
@@||18comic.vip^$jsinject
@@||www.manhuagui.com^$jsinject
@@||www.manhuadb.com^$jsinject
@@||www.dm5.com^$jsinject
@@||www.wnacg.com^$jsinject
@@||mangabz.com^$jsinject
@@||komiic.com^$jsinject
@@||www.comicabc.com^$jsinject
@@||www.77mh.nl^$jsinject
@@||anchira.to^$jsinject
@@||kemono.su^$jsinject
@@||nekohouse.su^$jsinject
@@||welovemanga.one^$jsinject
@@||cdn.jsdelivr.net^
@@||yamibo.com^$jsinject
@@||dmzj.com^$jsinject
@@||idmzj.com^$jsinject
@@||exhentai.org^$jsinject
@@||hath.network^$jsinject
@@||hypergryph.com^$jsinject
@@||copymanga.\w{2,6}^$jsinject
@@||mangacopy.com^$jsinject
@@||xsskc.com^$jsinject

@hymbz
Copy link
Owner

hymbz commented Jul 4, 2024

Thank you very much 🙏. I have added relevant notes and referenced this issue in the README.

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

No branches or pull requests

2 participants