Where did you install Firefox from? Help Mozilla uncover 3rd party websites that offer problematic Firefox installation by taking part in our campaign. There will be swag, and you'll be featured in our blog if you manage to report at least 10 valid reports!

Поиск в Поддержке

Избегайте мошенников, выдающих себя за службу поддержки. Мы никогда не попросим вас позвонить, отправить текстовое сообщение или поделиться личной информацией. Сообщайте о подозрительной активности, используя функцию «Пожаловаться».

Learn More

How to allow my plugin on trusted sites (my sites) in firefoxProfile ?

  • 2 ответа
  • 1 имеет эту проблему
  • 1 просмотр
  • Последний ответ от cor-el

more options

I have a plugin "4game" and i try to test a site which uses this plugin. How i can allow launching and using this plugin in firefox ? It looks like there https://support.mozilla.org/en-US/kb/how-allow-java-trusted-sites

But i have to do it in my tests (webdriver) I tried to specify

               firefoxProfile.setPreference("plugins.click_to_play", true);
               firefoxProfile.setPreference("plugin.state.flash", 0);
               firefoxProfile.setPreference("plugin.state.4game", 2);

But it doesn't work for me

I have a plugin "4game" and i try to test a site which uses this plugin. How i can allow launching and using this plugin in firefox ? It looks like there https://support.mozilla.org/en-US/kb/how-allow-java-trusted-sites But i have to do it in my tests (webdriver) I tried to specify firefoxProfile.setPreference("plugins.click_to_play", true); firefoxProfile.setPreference("plugin.state.flash", 0); firefoxProfile.setPreference("plugin.state.4game", 2); But it doesn't work for me

Выбранное решение

Are you saying that you need to do this in a fresh profile created just for the test?

If you can re-use an existing profile:

The easiest way is to watch for the plugin notification on the address bar (looks like a Lego block), click that, and use "Allow and Remember".

The next easiest way is to use the Page Info dialog's Permissions panel. When on the site hosting the content, you can open that using either:

  • right-click and choose View Page Info
  • (menu bar) Tools > Page Info
  • click the padlock or globe in the address bar > More Information

On the Permissions panel, you can "Allow" a specific plugin for the site.

Do any of those work for you?

If you cannot re-use an existing profile:

I doubt you will be able to do a site-specific exception, but yes, setting the plugin.state.identifier preference to 2 should allow all sites.

I don't know what the identifier is. Have you checked a running instance of Firefox to see whether it is simply 4game or it's another string?

Прочитайте этот ответ в контексте 👍 0

Все ответы (2)

more options

Выбранное решение

Are you saying that you need to do this in a fresh profile created just for the test?

If you can re-use an existing profile:

The easiest way is to watch for the plugin notification on the address bar (looks like a Lego block), click that, and use "Allow and Remember".

The next easiest way is to use the Page Info dialog's Permissions panel. When on the site hosting the content, you can open that using either:

  • right-click and choose View Page Info
  • (menu bar) Tools > Page Info
  • click the padlock or globe in the address bar > More Information

On the Permissions panel, you can "Allow" a specific plugin for the site.

Do any of those work for you?

If you cannot re-use an existing profile:

I doubt you will be able to do a site-specific exception, but yes, setting the plugin.state.identifier preference to 2 should allow all sites.

I don't know what the identifier is. Have you checked a running instance of Firefox to see whether it is simply 4game or it's another string?

more options

You can use a mozilla.cfg file in the Firefox program folder to specify new (default) values or to lock prefs.

Place a local-settings.js file in the defaults\pref folder where also the channel-prefs.js file is located to specify using mozilla.cfg.

pref("general.config.filename", "mozilla.cfg");

These functions can be used in the mozilla.cfg file:

defaultPref();	// set new default value
pref();		// set pref, but allow changes in current session
lockPref();	// lock pref, disallow changes

See: