Detect if plugin is running

Add-ons for Pale Moon and other applications
General discussion, compatibility, contributed extensions, themes, plugins, and more.

Moderators: FranklinDM, Lootyhoof

Pelican
Fanatic
Fanatic
Posts: 220
Joined: 2018-02-23, 06:51

Detect if plugin is running

Unread post by Pelican » 2018-08-13, 22:42

Our custom browser supports a couple of NPAPI plugins and we would like to detect if those plugins are running so that we can accommodate them better.

We considered detecting if their Object tags or mimetype were found in the HTML but because some users inject the object tag using JavaScript that makes it too late... after the page loads.

So I am wondering if via the plugin container or whatever, can PM detect if a plugin is running by DLL name or mimetype?
Last edited by Pelican on 2018-08-14, 01:51, edited 1 time in total.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35474
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Detect if plugin is running

Unread post by Moonchild » 2018-08-14, 04:36

You can check which plugins are enabled with navigator.plugins -- whether they are actually loaded at any point in time depends on web content requests (and they are unloaded after a set idle time to reduce resource usage).
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

Pelican
Fanatic
Fanatic
Posts: 220
Joined: 2018-02-23, 06:51

Re: Detect if plugin is running

Unread post by Pelican » 2018-08-14, 05:58

Yes navigator.plugins will tell if they are installed/enabled, but I need to know when are being used... start to finish.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35474
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Detect if plugin is running

Unread post by Moonchild » 2018-08-14, 06:50

You'll probably have to write an interface for that then to expose the internals of the plugin host. There is no standard way to query this AFAIK, because it is offloaded to the platform internals.
Last edited by Moonchild on 2018-08-14, 06:51, edited 1 time in total.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

Locked