How to change the extensions load order

732 views
Skip to first unread message

logic fei

unread,
Dec 28, 2022, 3:50:51 AM12/28/22
to Chromium Extensions
Hi there,

I am writing to ask for guidance on how to change the load order of extensions in Google Chrome.

I have noticed that extensions are sometimes loaded in a specific order, and I am interested in altering this order for specific purposes. Is it possible to change the load order of extensions in Chrome, and if so, how can this be done?

wOxxOm

unread,
Dec 28, 2022, 4:03:57 AM12/28/22
to Chromium Extensions, magico...@gmail.com
It depends on your definition of "load" as there are many things that load in an extension, but assuming it's about content scripts with the same `run_at` mode you need to remove the extensions and install them in the desired order.

Stefan Van Damme

unread,
Dec 28, 2022, 4:14:47 AM12/28/22
to Chromium Extensions, magico...@gmail.com
Hi magico...,

Do you mean the scripts of that Chrome extension are injected later or before? Then it is possible they use this in his manifest or service worker, the "run_at". That can be "document_idle", "document_start", or "document_end".

Thanks,
Stefan vd

logic fei

unread,
Dec 29, 2022, 12:31:58 AM12/29/22
to Chromium Extensions, wOxxOm, logic fei

Hi wOxxOm,

sorry for my terrible expression. You're right. That's all I meant. I have two extensions and they have the same `run_at` mode is `document_start`. I wanna to know which is first run when i open a new web. Here is my test code. https://github.com/magiconch/extensions. I find the order is up to the extensions' name, not the install order.  I wonder if this is normal? Can I change the order? btw, my chrome version is 108.0.5359.124 (arm64)

wOxxOm

unread,
Dec 29, 2022, 3:32:39 AM12/29/22
to Chromium Extensions, magico...@gmail.com, wOxxOm
> I find the order is up to the extensions' name, not the install order.

Then that's how it is now. This behavior is not regulated, so it may change in the future. I thought it's the installation order because webRequest works like this.

Since it's impossible to change the name of an extension from the web store you'll have to make a local copy of it e.g. by using https://robwu.nl/crxviewer, unpack it, remove _metadata folder, edit manifest.json, then load as an unpacked extension. You'll have to repeat the same when updating it to a new version.
Reply all
Reply to author
Forward
0 new messages