Suppose I have an extension that has 3 files in includes
directory:
includes/all.js includes/one.js includes/two.js
two.js
depends on one.js
and both of them have 'guard comments':
// ==UserScript== // @include http://*.example.com/* // @include https://*.example.com/* // ==/UserScript==
all.js
loads for every page.
My question is: in what order those .js files will be processed by Opera on http://foobar.example.com/
page?
There are some rumors that the order is alphabetical, but I cannot find a definitive source of this claim.
When we first shipped user javascript support, I noticed that some users started developing libraries and wanted to control the load / execution order. Some of them assumed the order would be alphabetical (at the time it was random, perhaps by file creation time or some such) and would prefix their library file names with A- to make them run first. So I told the developer "let's just implement what people expect and run the scripts in alphabetical order".
It's probably my fault that this is neither documented nor tested..