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

[FireMonkey] Fill default value for name and match for userscript/userstyle #628

Open
char101 opened this issue Mar 1, 2024 · 3 comments
Labels

Comments

@char101
Copy link

char101 commented Mar 1, 2024

Hi,

Can FireMonkey fill the name attribute (using current tab url domain) of new userscript/userstyle and match attribute (using current tab url) like what violetmonkey/stylish do?

This will save the effort of having to copy paste the url from the previous tab to the editor.

@erosman
Copy link
Owner

erosman commented Mar 1, 2024

Do you mean from the toolbar popup?
If so, that is possible.

However, do people use ➕JS or ➕CSS to write a new script for the current tab all the time?

it might make it messier with custom templates.

  • What if user has a preset for the name and/or URL in their template?
  • What if user prefers to use include instead of match?

@char101
Copy link
Author

char101 commented Mar 1, 2024

Do you mean from the toolbar popup?

Yes from the toolbar popup.

However, do people use ➕JS or ➕CSS to write a new script for the current tab all the time?

I think it is reasonable to assume that creating a new script or style from the toolbar button is for the current tab and not for some other domain.

it might make it messier with custom templates.
What if user has a preset for the name and/or URL in their template?
What if user prefers to use include instead of match?

Do FireMonkey supports custom userscript/userstyle template? Sorry I searched in the issues/discussions/help and couldn't find about it.

I think these two problems can be solved using custom userscript/usertyle template with variables. For example

// ==UserScript==
// @name             ${host}
// @match            ${scheme}://${host}/*
// @version          1.0
// ==/UserScript==

Other pattern that I have seen is to present a menu, e.g.

@erosman
Copy link
Owner

erosman commented Mar 1, 2024

Do FireMonkey supports custom userscript/userstyle template? Sorry I searched in the issues/discussions/help and couldn't find about it.

From Help

💾 Save Template
Save the currently displaying Script/CSS as a Template

I think these two problems can be solved using custom userscript/userstyle template with variables.

  • When creating a new script from the popup, those would have a meaning
  • When creating a new script from the Options page, those would not have a meaning

Passing the Tab URL to the Options page and then parsing it, is not a problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants