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

Provide the ability to add userscripts without specifying a resource #1889

Closed
danidoedel opened this issue Jun 20, 2024 · 4 comments
Closed

Comments

@danidoedel
Copy link

Issue Details

Not quite sure if this is the correct repo for this kind of issue.

Some userscripts have an "incorrect" format, but still work fine in other userscript apps/extensions. Specifically in this case it is the @resource header. For this script it is pointing to a website, not a real resource used within the script. AdGuard fails to install the script while other apps/extensions can handle this. It would be great if AdGuard would allow this too.

Script has an incorrect format:
image

Example script: https://update.greasyfork.org/scripts/463536/%2A%20Gebäude-%20%20Fuhrparkverwalter.user.js

I'm using AdGuard 2.15.0.1701 nightly on macOS Sonoma 14.5

Proposed solution

Ignore invalid resources.

Alternative solution

No response

@Aydinv13
Copy link

@danidoedel Hello!

Unfortunately, such a script may simply fail without the @resource or be broken upon update, so we need to check the integrity of the script before installing or updating it.

@danidoedel
Copy link
Author

@Aydinv13 I'm not quite sure if I fully understand this. As mentioned other major userscript extensions can handle such scripts just fine. Why wouldn't AdGuard be able to handle it the same way?

@danidoedel
Copy link
Author

@Aydinv13 any further explanation why AdGuards behavior has to differ from other major userscript extensions? If there's no resource name, why not just ignore the resource?

@Aydinv13
Copy link

As mentioned other major userscript extensions can handle such scripts just fine. Why wouldn't AdGuard be able to handle it the same way?

We'll think about how we can simplify adding a userscript in this case, thanks for asking.

@Aydinv13 Aydinv13 transferred this issue from AdguardTeam/AdguardForMac Jun 26, 2024
@adguard-bot adguard-bot changed the title Better handling for incorrect userscript formats Provide the ability to add userscripts without specifying a resource Jul 15, 2024
@adguard-bot adguard-bot assigned anyakushin and unassigned sfionov Aug 13, 2024
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

5 participants