We're calling on all EU-based Mozillians with iOS or iPadOS devices to help us monitor Apple’s new browser choice screens. Join the effort to hold Big Tech to account!

Om de ûnderfining foar jo te ferbetterjen is tydlik de funksjonaliteit dan dizze website troch ûnderhâldswurk beheind. Wannear in artikel jo probleem net oplost en jo in fraach stelle wolle, kin ús stipemienskip jo helpe yn @FirefoxSupport op Twitter en /r/firefox op Reddit.

Sykje yn Support

Mij stipescams. Wy sille jo nea freegje in telefoannûmer te beljen, der in sms nei ta te stjoeren of persoanlike gegevens te dielen. Meld fertochte aktiviteit mei de opsje ‘Misbrûk melde’.

Mear ynfo

Dizze konversaasje is argivearre. Stel in nije fraach as jo help nedich hawwe.

I can't use imacros to change proxy value in about:config from firefox 34

  • 6 antwurd
  • 1 hat dit probleem
  • 31 werjeftes
  • Lêste antwurd fan stevejob

more options

myproxy.iim

URL GOTO=about:config URL GOTO=javascript:varprefb=Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);varstr=Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString);str.data="IP HERE";prefb.setComplexValue("network.proxy.http",Components.interfaces.nsISupportsString,str);

URL GOTO=about:config URL GOTO=javascript:gPrefBranch.setIntPref("network.proxy.http_port",PORT HERE);

URL GOTO=about:config URL GOTO=javascript:gPrefBranch.setIntPref("network.proxy.type",1);

I try above script many times for imacros but it doesn't work in about:config of firefox 34. Please tell me the way to resolve my problem. Thanks a lot URL GOTO=about:config URL GOTO=javascript:gPrefBranch.setIntPref("network.proxy.type",1);

myproxy.iim URL GOTO=about:config URL GOTO=javascript:varprefb=Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);varstr=Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString);str.data="IP HERE";prefb.setComplexValue("network.proxy.http",Components.interfaces.nsISupportsString,str); URL GOTO=about:config URL GOTO=javascript:gPrefBranch.setIntPref("network.proxy.http_port",PORT HERE); URL GOTO=about:config URL GOTO=javascript:gPrefBranch.setIntPref("network.proxy.type",1); I try above script many times for imacros but it doesn't work in about:config of firefox 34. Please tell me the way to resolve my problem. Thanks a lot URL GOTO=about:config URL GOTO=javascript:gPrefBranch.setIntPref("network.proxy.type",1);

Bewurke troch cor-el op

Alle antwurden (6)

more options

I notice a missing space in varprefb -> var prefb and varstr -> var str

varprefb=Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);

Note that such issues can happen if you paste text that have line breaks in a single line text field

var
prefb=Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);

You can check the editor.singleLine.pasteNewlines pref on the about:config page.

Bewurke troch cor-el op

more options

Thank you for your answer, but I haven't still resolved my problem

I access "about:config" in firefox. How can I modify "network.proxy.type 0" => "network.proxy.type 1" "network.proxy.socks 0" => "network.proxy.socks 64.31.22.131" "network.proxy.socks_port 0" => "network.proxy.socks 3127"

by using javascript code

Thank you a lot

more options

You can use the pref service to modify prefs. You do not need the about:config page.

more options

cor-el said

You can use the pref service to modify prefs. You do not need the about:config page.

I use below javascript code, but I could not change "network.proxy.http" in about:config firefox 34.

proxy.php <head> <script type="text/javascript">

function myfunction(){

var prefs=Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);

var str=Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString);

str.data="183.20.0.1"; prefs.setComplexValue("network.proxy.http",Components.interfaces.nsISupportsString,str);

</script> </head> <body> <button onclick="myfunction();">Click here</button> </body> </html>

Could you please give me an detailed example? Thank you a lot

more options

I'm not familiar with the iMacro extension, so it is possible that the above posted code stops working for other reasons and that the var prefix is there on purpose (based on convention), so I may have been wrong there.

I'm not sure what you intend to do with that network.proxy.http pref as it doesn't seem to exist for me on the about:config page and 183.20.0.1 is a normal String value that shouldn't require a complex value (setCharPref() would do).

See also:

You can check the Browser Console (Firefox/Tools > Web Developer) for error messages.

You would have to contact the iMacro author for support if the extension isn't working properly.

more options

Thank you a lot for your answers. Have a good day