Access to proxy parameters

Capt'n Flash contact at captnflash.fr
Fri Jun 9 15:44:04 UTC 2017


Hello,

 

We are trying to migrate our Firefox extension to the new webextension
standard, and we have some difficulties.

 

1.       We need to open the proxies preferences. Not changing it, but only
open. Actually, we do : 

openDialog("chrome://browser/content/preferences/connection.xul");

 

How can we do the same with webextension ?

 

 

2.       We need to get the real html source of the current tab, and to pas
sot to an external binary. Actuelly, we do :

 

var _prefService =
Cc["@mozilla.org/preferences-service;1"].getService(Ci.nsIPrefBranch);

 

        _prefService.setBoolPref("view_source.editor.external", true);

        _prefService.setCharPref("view_source.editor.path", "app.exe");

_prefService.setCharPref("view_source.editor.args", "add_source_file");

 

// send ctrl-u

var utils =
window.QueryInterface(Components.interfaces.nsIInterfaceRequestor).getInterf
ace(Components.interfaces.nsIDOMWindowUtils); utils.sendKeyEvent("keypress",
117, 117, 2);

 

//clear specific params

       _prefService.setBoolPref("view_source.editor.external", false);

       _prefService.setCharPref("view_source.editor.path", "");

_prefService.setCharPref("view_source.editor.args", "");

 

How can we do the same with webextension ?

 

Many thanks for your response

 

Best regards,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.mozilla.org/private/webextensions-support/attachments/20170609/4164652a/attachment.html>


More information about the Webextensions-support mailing list