Reset original value about:config firefox via javascript

Discussions and Tech Support related to the iMacros Firefox Add-on, including the built-in Javascript scripting interface for playing .js files.
Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the Google search box (at the top of each forum page) to see if a similar problem or question has already been addressed. This will search the entire contents of the forums as well as the iMacros Wiki.
3. We can respond much faster to your posts if you include the following information:

CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST

Answering your own posts (e.g. attempting to "bump" your topic) drops your topic from the list of unanswered threads, so it may actually receive less views.

Reset original value about:config firefox via javascript

by provoquestosito on Fri Nov 23, 2018 2:07 pm

I need to reset value in firefox about:config with javascript or imacros.

I use firefox 56 imacros 8.9.7 and windows 7 64 bit.

I found the javascript compatible with imacros to set value in about:config via javascript.

To set the value in about config i use this code:

Code: Select all
iimPlayCode("URL GOTO=about:config\n WAIT SECONDS=1");
var prefs = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
prefs.setBoolPref("pdfjs.disabled", true);
prefs.setIntPref("browser.download.folderList", 2);
prefs.setCharPref("browser.download.dir", "C:\");


Now i want to know if exist a similar solution to reset the value to return with original values.

Image

Thanks
provoquestosito
 
Posts: 46
Joined: Fri Jan 29, 2010 5:43 pm

Re: Reset original value about:config firefox via javascript

by chivracq on Sat Nov 24, 2018 6:24 am

provoquestosito wrote:I need to reset value in firefox about:config with javascript or imacros.

I use
Code: Select all
firefox 56 imacros 8.9.7 and windows 7 64 bit.


I found the javascript compatible with imacros to set value in about:config via javascript.

To set the value in about config i use this code:

Code: Select all
iimPlayCode("URL GOTO=about:config\n WAIT SECONDS=1");
var prefs = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
prefs.setBoolPref("pdfjs.disabled", true);
prefs.setIntPref("browser.download.folderList", 2);
prefs.setCharPref("browser.download.dir", "C:\");


Now i want to know if exist a similar solution to reset the value to return with original values.

Image

Thanks

Hein...?, Oh...!?, already saw this Thread, already did "some Thinking", but didn't reply because FCI not mentioned..., hum, here it is though... Maybe you silently updated your OP...? But "registered in 2010 and 40 Posts" is new Info for me now, you only had some "History" about Batch Files, not on our Forum then I guess...?

Ah no, found it, ... on SOF:
- Reset original value about:config firefox via javascript or imacros
And yep indeed, FCI not mentioned... :roll:
No pb to post parallel Threads in different Tech Forums, but maintain the same "Quality" everywhere... Why do you mention your FCI here and not on SOF...!? :roll: => FCIM for SOF...
+ Upload your Screenshot here directly to your Thread instead of some external Image Hosting Site as all those Sites all go dark or commercial or clean up their Data after a while which renders such Threads useless with some empty Image Container... And 'imgur' is the only one I haven't blocked myself, because widely used on SOF indeed...

Hum, registered in 2010 and 40 Posts, Okay..., then I guess that could/would explain why you mention your FCI here and not on SOF, I haven't checked your "History" yet, I hope you don't have any (older) Threads waiting for 'Follow-up/Finish and share Script' Status from your Side... (Or this is your "chance" to finish them "correctly" and useful for the Forum, I'll check again "tomorrow" after some sleep... :wink: )
Hum, 2010, oh..., nice, you'll be of pretty Advanced Level then I guess, good-good...! :D
Hum, first Thread I check (on SOF) => FCI not mentioned and no Follow-up, I guess you still have some mini "Homework" to do then, ah-ah...! :wink: And probably the same on our Forum, I reckon... OK, I'll check tomorrow... (And don't think to be "clever" by deleting older Threads if you didn't get any Answer then :shock: , but managed to solve that Qt by yourself..., => share your Solution and how you solved your Pb..., there are no "stupid" Qt's... :idea: )
Last edited by chivracq on Sat Nov 24, 2018 8:29 am, edited 1 time in total.
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 7712
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: Reset original value about:config firefox via javascript

by provoquestosito on Sat Nov 24, 2018 8:26 am

Hello

I answered the problem on SOF, sorry but I had forgotten to answer and approve the proposed solution for another thread

Do you know javascript and can you answer the question?

So far no one has been able to find a solution to the difficult question I have posted

Thanks
provoquestosito
 
Posts: 46
Joined: Fri Jan 29, 2010 5:43 pm

Re: Reset original value about:config firefox via javascript

by chivracq on Sat Nov 24, 2018 8:46 am

provoquestosito wrote:Hello

I do not understand the meaning of your answer.

Do you know javascript and can you answer the question?

So far no one has been able to find a solution to the difficult question I have posted

Thanks

Oh well, OK, then never mind... 8)

(And I guess you can check my Posts to find out what I "know"..., but "difficult question" sounds scary... :shock: )
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 7712
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: Reset original value about:config firefox via javascript

by provoquestosito on Sun Nov 25, 2018 1:57 pm

@chivracq

Currently I have not found any solution on the internet to my problem.

I'm not even sure that there is a solution, do you have any links to show me to deepen?

I also searched with the search engine but I did not find any answer, thank you
provoquestosito
 
Posts: 46
Joined: Fri Jan 29, 2010 5:43 pm

Re: Reset original value about:config firefox via javascript

by chivracq on Sun Nov 25, 2018 6:22 pm

provoquestosito wrote:@chivracq

Currently I have not found any solution on the internet to my problem.

I'm not even sure that there is a solution, do you have any links to show me to deepen?

I also searched with the search engine but I did not find any answer, thank you
Oh yeah, you don't sound very "fut-fut" I would think, ah-ah...! :roll:

I have not found any solution on the internet to my problem.
Yeah well, first ask your Qt a bit correctly and maybe you'll get an Answer, and only then you can "search the Internet", or do you still believe in Babies being brought to your Home by Storks...!? You and I both "make Internet", youpidoo...! 8)

"first ask your Qt a bit correctly" => Was perfect here on our Forum actually, I asked you to mention your FCI on SOF in your parallel Thread...
+ Follow up on your previous Threads, I checked one on SOF, with no Follow-up, => Show-Killer for me to help Users... :roll:

I'm not even sure that there is a solution, do you have any links to show me to deepen?
Yep of course, read again my first Reply here...!
And give me a "Sign" when you think that "maybe" there is a Solution, then only then I might go looking for it... :idea:

So far no one has been able to find a solution to the difficult question I have posted
=> Tja, no wonder, ah-ah...! :wink:
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 7712
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: Reset original value about:config firefox via javascript

by chivracq on Sun Nov 25, 2018 7:29 pm

Yeah, sorry, I don't get it...!

What's the point of asking a Qt on a Technical Forum if you already "know" there is no Answer because you didn't manage to google "it"...!?
That's the Purpose of a TechForum I would think, ah-ah...! :roll:
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 7712
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: Reset original value about:config firefox via javascript

by provoquestosito on Mon Nov 26, 2018 10:27 am

hello @chivracq even if you did not know how to solve my problem I thank you anyway.

I'm still looking for a solution only for javascript expertsm this is a very hard question.

Best Regards
provoquestosito
 
Posts: 46
Joined: Fri Jan 29, 2010 5:43 pm

Re: Reset original value about:config firefox via javascript

by provoquestosito on Wed Nov 28, 2018 1:03 pm

The solution is this

Code: Select all
var prefs = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
prefs.clearUserPref("layout.css.devPixelsPerPx");


prefs.clearUserPref is the code to reset firefox about:config value change "layout.css.devPixelsPerPx" with the voice to reset.

Thanks to me for find this very very hard solution.

Have a nice day
provoquestosito
 
Posts: 46
Joined: Fri Jan 29, 2010 5:43 pm

Re: Reset original value about:config firefox via javascript

by chivracq on Thu Nov 29, 2018 12:19 am

provoquestosito wrote:The solution is this

Code: Select all
var prefs = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
prefs.clearUserPref("layout.css.devPixelsPerPx");


prefs.clearUserPref is the code to reset firefox about:config value change "layout.css.devPixelsPerPx" with the voice to reset.

Thanks to me for find this very very hard solution.

Have a nice day

Yeah sure, always "very very hard solution" to read the Documentation, ah-ah...! But Thanks for sharing of course... :wink:
'resetBranch()' would do the job also btw, but it looks like it was never implemented...
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 7712
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: Reset original value about:config firefox via javascript

by provoquestosito on Thu Nov 29, 2018 4:48 pm

@chivracq

How clever you are after I find the solution you make confirm what I write.

You do not know imacros and do you not know javascript for this you have not answered for days.

Study and learn again you do not know imacros and javascript.

In fact, for days you have not written anything because you are not prepared.

Study and study again you need to study.

Bye
provoquestosito
 
Posts: 46
Joined: Fri Jan 29, 2010 5:43 pm

Re: Reset original value about:config firefox via javascript

by chivracq on Thu Nov 29, 2018 8:10 pm

provoquestosito wrote:@chivracq

How clever you are after I find the solution you make confirm what I write.

You do not know imacros and do you not know javascript for this you have not answered for days.

Study and learn again you do not know imacros and javascript.

In fact, for days you have not written anything because you are not prepared.

Study and study again you need to study.

Bye

"You do not know imacros..."
=> Yeah, sure...!, compare my 7.5K Posts and the 100's or 1000's of Users I've already helped, with your mere 46 Posts only asking, euh sorry begging for Help with "PLEASE HELP ME" in nearly all your previous Threads, most with no Follow-up from your Side, or even asking "can you write the complete macro...?" while you joined in 2010 and should be answering all Threads on the Forum... Sorry but you are a bit of a Joke, ah-ah...! 8)
Hum, I guess you "qualify" for the Title of "Troll of the Month"... :D
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 7712
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)


Return to iMacros for Firefox

Who is online

Users browsing this forum: No registered users and 10 guests

-->