-
Notifications
You must be signed in to change notification settings - Fork 225
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
Deprecate @include
and @exclude
metadata
#650
Comments
Hi @ACTCD , Google search engine has hundreds of national domain names, use |
Hi @F9y4ng, The
Obviously these are not your intentions, and may cause all kinds of damage. That's why we want to make the change, to encourage developers to make more secure and accurate user scripts. For your question, here is a userscript for Google, you can refer to its implementation: ACT.Google.DM.NCR.user.js Hope this explains your question and satisfies you. Stay safe! :) |
Maybe I have to adopt your scheme after the browser forces to MV3. 😅 Thanks for your reply. |
IMO, you should keep supporting include. And many existing userscripts will not run on your extension. |
@jesus2099 Thank you for your opinion. I think I have made it clear in OP. If it retains it means additional complexity, maintenance, delay, and safety risks, I think it is reasonable to deprecate it. For regular expression, I recommend using it in user scripts, for example: 249#issuecomment-1150674097 I always think:
So far I have not seen the reason for favorable reasons to change this, but I remain open. |
For this point, I would like to explain my view additionally. We have a reasonable deprecation cycle and this is not a change with a significant burden for any user script developer/author. It takes very little time and effort to migrate, and comes with significant security and/or other benefits. For those long term, unmaintained user scripts, I'm curious if they really still work properly on their own? A user script is not a standalone program, it almost always works with the structure of the site's pages at a particular stage, and typically modern sites change their structure so often that if they aren't maintained and adapted in a timely manner, they will usually fail to work correctly very shortly. And is it really worth carrying the burden and cost of these obsolete user scripts that may not work properly anyway? |
I discovered this extension by random. I didn't know there was an iOS userscript extension! It's great for those iPhone users, at last! But match sometimes takes more lines and is less strict than regex include. It was my reasons to migrate this userscript from matches to regex include. But as userscript author I don't always know that this or that userscript extensions supports everything in GM metadata and API standard, or not. |
@jesus2099 More lines != bad. If needed, please use The WebExtension API never supported "regex", it needs to be supported separately with complex logic.
Then, please read their documents. |
I need to emphasize again that this will not prevent you from using the We want to make thin packaging of Web Extension API, and adopt and promote better security and less errors. @jesus2099 If you want, you could even But what's the point? Comparing lines doesn't make any sense, and not everyone is a regular expression expert. We want better readability and less chance of error, which is why the Web Extension API created and recommends the use of |
Yes yes, I see. 😁 I think you should display an error when one tries to install an include based userscript, once it's no longer supported. So that people understand that they should request a new version from the author. And same when an auto-update brings a version that introduces an include. |
We will warn about all metadata that will be deprecated or unsupported in the next major release, this is a work in progress. |
We will deprecate
@include
and@exclude
and only support@match
and@exclude-match
in the future.include_globs
andexclude_globs
globs
instead of regular expressions.scripting.RegisteredContentScript
no longer supports these keys.We plan to add a deprecation hint in v5 and eventually remove it in v6.0.
The text was updated successfully, but these errors were encountered: