You are not logged in.

#1 2015-05-10 11:34:45

FlowIt
Member
Registered: 2014-10-25
Posts: 239

Firefox Addons: Custom addon does not run

PS: My problem changed a little bit. In the first post you see my original problem, please see #4 for the current one.

Hey everyone,
to collect some traffic data I call Firefox from a bash script. I use a proxy to connect to the loading speed is rather low. To be sure to collect all the traffic of the http connection I issue a sleep command (currently set to 60s to be sure, but some sites are loaded faster). 60s seems to be ok, but the script runs in a loop (250 to 500 iterations) and this means hours of waiting. Is there a command or trick how I can find out about the status of the website?
I thought of capturing the traffic twice, using one instance for the real data and one instance to measure inter arrival times and stopping if the time differences become too big. But this slows down the capturing (at least in my setup) and I can't be sure that the data isn't falsified.
There is the page loading symbol on each tab. An API call to request this information would solve my problem but I haven't found such a thing.

Last edited by FlowIt (2015-05-10 19:43:32)

Offline

#2 2015-05-10 12:03:35

oliver
Member
Registered: 2007-12-12
Posts: 448

Re: Firefox Addons: Custom addon does not run

Do you have to use firefox?  Have you looked at curl?

Offline

#3 2015-05-10 12:30:55

FlowIt
Member
Registered: 2014-10-25
Posts: 239

Re: Firefox Addons: Custom addon does not run

Yes, I need Firefox. I have to use a specialized profile, including add-ons like ad blocker. No way around.

Offline

#4 2015-05-10 14:28:07

jsoy9pQbYVNu5nfU
Member
Registered: 2013-04-19
Posts: 108

Re: Firefox Addons: Custom addon does not run

You could write a little chrome add-on ('chrome' means that the add-on has full access to all Firefox APIs) using JetPack which listens for a tab to finish loading and eventually creates an empty file on the local file system. In your script, you could wait for this to happen using inotifywait from inotify-tools.

Perhaps there are more elegant ways to go about this, but I am not really familiar with Firefox or JS internals.

Last edited by jsoy9pQbYVNu5nfU (2015-05-10 14:32:54)

Offline

#5 2015-05-10 19:41:33

FlowIt
Member
Registered: 2014-10-25
Posts: 239

Re: Firefox Addons: Custom addon does not run

Thanks 2ion, that really helped. But there is still a problem: I can run my addon in the development environment (via xpi run) and everything works fine, but if I export my addon to an xpi file and install it in my Firefox profile it won't work. I tried this both with the tutorial example and my little addon, both don't work.
PS: I changed the topic title so hopefully someone with experience will look here.

Offline

Board footer

Powered by FluxBB