support
support copied to clipboard
[FireMonkey] Fill default value for name and match for userscript/userstyle
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.
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
includeinstead ofmatch?
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.
- Write new userscript
- Write new userscript for https://example.com/**/*
- Write new userscript for https://example.com/path
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.