Discussions » Greasy Fork Feedback

Custom script variables on the Install page

woxxomMod
§
Posted: 2015-02-14

Custom script variables on the Install page

It'd be nice to have custom variables on the Install page like on userstyles.org:

var someColor = /*[[optionColor]]*/;
var someText = /*[[optionText]]*/;
............
someElement.style.setProperty('color', someColor);
someElement.textContent = someText;
...........

This will benefit a lot of simple scripts that don't have their own setup dialogs and it'll make GreasyFork the best script repository.

§
Posted: 2015-02-28

See it the same way ... You can include such things as options for your script and if you install the script from any other place, it's not possible to provide such features.

§
Posted: 2015-03-17

What will happen when script auto updating, especially without script host supporting this feature? What about new version comes up with some new features or new options? How can a user change his settings without loos GM_setValue?

How to show source code to user? how to make user be able to check the source code? Will some malicious code such as auto follow or send cookies to author's server hide behind settings?

Also, I think there should be some default values, so that install codes without setting should works, like following one or something else.


    var someColor = /*[[optionColor]*/'#fff'/*[optionColor]]*/;
    var someText = /*[[optionText]*/'Hello'/*[optionText]]*/;
    ............
    someElement.style.setProperty('color', someColor);
    someElement.textContent = someText;
    ...........

§
Posted: 2015-03-17
Edited: 2015-03-17
Also, I think there should be some default values, so that install codes without setting should works

here is a trick that I use in Stylish:

code:

/[[optionColor]]/ #00f /* /
settings:
blue (default)
#00f /
red
#f00 /* green
#0f0 /*
edit: i've learned how to put line numbers into the code block ;}

§
Posted: 2015-04-02
Edited: 2015-04-02

There are multiple libraries available for userscripts to implement options. Or one could write it's own settings dialog. This is not possible for UserStyles. So I understand the need for it on userstyles.org.

I don't really see the point for this for UserScripts. And with the already mentioned problems (updates, other repositories, source code, storing settings), this seems like more problems then solutions.

-1

Post reply

Sign in to post a reply.