Tartışmalar » Greasy Fork Geri Bildirimi

Custom script variables on the Install page

woxxomMod
§
Gönderildi: 14.02.2015

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.

§
Gönderildi: 28.02.2015

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.

§
Gönderildi: 17.03.2015

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;
    ...........

§
Gönderildi: 17.03.2015
Düzenlendi: 17.03.2015
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 ;}

§
Gönderildi: 02.04.2015
Düzenlendi: 02.04.2015

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

Cevap paylaş

Yanıt göndermek için oturum açın.