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

More options for userscript matches (not only URLs) #23

Closed
WorldLanguages opened this issue Jul 29, 2020 · 12 comments · Fixed by #2305
Closed

More options for userscript matches (not only URLs) #23

WorldLanguages opened this issue Jul 29, 2020 · 12 comments · Fixed by #2305
Labels
scope: addon.json About the addon.json file structure scope: core Related to the core script/extension workings type: enhancement New feature for the project

Comments

@WorldLanguages
Copy link
Member

Let's say a userscript only works on user profiles. The current match would currently be https://scratch.mit.edu/users/*/, why not just userprofile? And other potential filters for common use.

@WorldLanguages WorldLanguages added the type: enhancement New feature for the project label Jul 29, 2020
@WorldLanguages
Copy link
Member Author

I believe it's too late to implement this. It's not a big deal, either. Closing

@Hans5958
Copy link
Member

too late

@TheColaber
Copy link
Member

I believe this one is worth reopening. Once we implement #390, addons that work on the editor/project page would also need to work on turbowarp's editor/project page. If we simply said for the match URL to be project, then we could have the match URL patterns for both turbowarp and scratch to link to htpps://scratch.mit.edu/projects/* and https://turbowarp.org/* (excluding the https://turbowarp.org/privacy.html page). And, if we end up supporting addons on another site, then it would be useful there too. This would also help with #646. And I think it's just easier if all the user needed to add in their addon, was just search or user

@RedGuy12
Copy link
Contributor

RedGuy12 commented Jan 1, 2021 via email

@WorldLanguages
Copy link
Member Author

I believe this one is worth reopening. Once we implement #390, addons that work on the editor/project page would also need to work on turbowarp's editor/project page. If we simply said for the match URL to be project, then we could have the match URL patterns for both turbowarp and scratch to link to htpps://scratch.mit.edu/projects/* and https://turbowarp.org/* (excluding the https://turbowarp.org/privacy.html page). And, if we end up supporting addons on another site, then it would be useful there too. This would also help with #646. And I think it's just easier if all the user needed to add in their addon, was just search or user

I honestly doubt userscript made for the Scratch editor could work "as-is" on TurboWarp, so it wouldn't make sense to merge both origins into one permission - an addon might only work on the Scratch editor

@RedGuy12
Copy link
Contributor

RedGuy12 commented Jan 2, 2021 via email

@TheColaber
Copy link
Member

TheColaber commented Jan 2, 2021

I honestly doubt userscript made for the Scratch editor could work "as-is" on TurboWarp, so it wouldn't make sense to merge both origins into one permission - an addon might only work on the Scratch editor

I'm sure that most do, and some (like project-notes-tabs) could easily be fixed by adding an if statement to not run at all.

@TheColaber
Copy link
Member

I honestly doubt userscript made for the Scratch editor could work "as-is" on TurboWarp, so it wouldn't make sense to merge both origins into one permission - an addon might only work on the Scratch editor

How bout now hehe. But even so, this should 100% be implemented... for future mods.

This was referenced Feb 17, 2021
@TheColaber TheColaber added scope: addon.json About the addon.json file structure scope: core Related to the core script/extension workings labels Mar 26, 2021
@TheColaber
Copy link
Member

wl has recondered. pr soon.

@TheColaber
Copy link
Member

@mxmou

One reason is that there are addons that don't set their match to the forums but are closely related to them (discuss button)

In this case, the addon can manually add the tag.

There are also addons that have forum matches to implement forum-specific functionality but aren't otherwise forum addons (infinite scrolling).

I argue that infinite scrolling and other addons like that should have the forums tag, even if their effect on it is very little. Alternatively, we can check if the userscripts/userstyles have the settingMatch property. Then it will ignore its matches.

Another reason is that if we add subcategories, editor addons will need to set them explicitly anyway. Why would website addons work differently?

The editor is not different pages, whereas the forums and the profiles are.

@mxmou
Copy link
Member

mxmou commented Apr 26, 2021

One reason is that there are addons that don't set their match to the forums but are closely related to them (discuss button)

In this case, the addon can manually add the tag.

There are also addons that have forum matches to implement forum-specific functionality but aren't otherwise forum addons (infinite scrolling).

I argue that infinite scrolling and other addons like that should have the forums tag, even if their effect on it is very little. Alternatively, we can check if the userscripts/userstyles have the settingMatch property. Then it will ignore its matches.

This would cause similar issues as the theme tag did. I don't think we should add more features that affect both functionality and categorization like that.

The forums tag should be only for addons users want to see when choosing "forums" in a menu. Maybe infinite scrolling should be one of them, but what about website dark mode?

@mxmou
Copy link
Member

mxmou commented Apr 26, 2021

The editor is not different pages, whereas the forums and the profiles are.

It still doesn't make sense for editor addons to behave differently than website addons in any way.

RedGuy12 pushed a commit to RedGuy12/ScratchAddons that referenced this issue Oct 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: addon.json About the addon.json file structure scope: core Related to the core script/extension workings type: enhancement New feature for the project
Projects
None yet
5 participants