Via icon indicating copy to clipboard operation
Via copied to clipboard

Scripts ordering

Open fagci opened this issue 2 years ago • 2 comments

Will be nice to have an ability to order scripts to prioritize loading by naming it.

For example:

1. framework
2. plugin
3. plugin
Other script

Just wrote toolbar (script 1) and trying to add buttons (scripts 2, 3) in some order.

For now, solution is to wrap "plugin" scripts with:

window.setTimeout(function() {
//...
}, 42);

where 42 is priority =)

fagci avatar Jul 04 '22 14:07 fagci

If you have the order of these scripts, why not merge them into a new script in order?

maggch97 avatar Jul 05 '22 05:07 maggch97

Modularity is better. Small scripts editing is simpler on smartphone than huge.

Also, I think implementing this feature is cheap, but it brings:

  1. organizing "user" scripts
  2. controllable loading order

But your solution will work better, than setting timeouts.

fagci avatar Jul 05 '22 06:07 fagci

I also think you should merge scripts. A script is more like a class than a function.

tuyafeng avatar Nov 23 '22 09:11 tuyafeng