Reset original value about:config firefox via javascript

Discussions and Tech Support specific to the iMacros Firefox add-on.
Forum rules
iMacros EOL - Attention!

The renewal maintenance has officially ended for Progress iMacros effective November 20, 2023 and all versions of iMacros are now considered EOL (End-of-Life). The iMacros products will no longer be supported by Progress (aside from customer license issues), and these forums will also no longer be moderated from the Progress side.

Thank you again for your business and support.

Sincerely,
The Progress Team

Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
provoquestosito
Posts: 78
Joined: Sat Jan 30, 2010 12:43 am

Reset original value about:config firefox via javascript

Post by provoquestosito » Fri Nov 23, 2018 9: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
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Reset original value about:config firefox via javascript

Post by chivracq » Sat Nov 24, 2018 1:24 pm

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 3:29 pm, edited 1 time in total.
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
provoquestosito
Posts: 78
Joined: Sat Jan 30, 2010 12:43 am

Re: Reset original value about:config firefox via javascript

Post by provoquestosito » Sat Nov 24, 2018 3:26 pm

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
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Reset original value about:config firefox via javascript

Post by chivracq » Sat Nov 24, 2018 3:46 pm

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)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
provoquestosito
Posts: 78
Joined: Sat Jan 30, 2010 12:43 am

Re: Reset original value about:config firefox via javascript

Post by provoquestosito » Sun Nov 25, 2018 8: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
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Reset original value about:config firefox via javascript

Post by chivracq » Mon Nov 26, 2018 1:22 am

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)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Reset original value about:config firefox via javascript

Post by chivracq » Mon Nov 26, 2018 2:29 am

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)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
provoquestosito
Posts: 78
Joined: Sat Jan 30, 2010 12:43 am

Re: Reset original value about:config firefox via javascript

Post by provoquestosito » Mon Nov 26, 2018 5:27 pm

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: 78
Joined: Sat Jan 30, 2010 12:43 am

Re: Reset original value about:config firefox via javascript

Post by provoquestosito » Wed Nov 28, 2018 8: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
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Reset original value about:config firefox via javascript

Post by chivracq » Thu Nov 29, 2018 7: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)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
provoquestosito
Posts: 78
Joined: Sat Jan 30, 2010 12:43 am

Re: Reset original value about:config firefox via javascript

Post by provoquestosito » Thu Nov 29, 2018 11: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
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Reset original value about:config firefox via javascript

Post by chivracq » Fri Nov 30, 2018 3:10 am

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)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
Post Reply