MozillaZine

Idea for an extension (that I have no idea how to build)...

Talk about add-ons and extension development.
SifelltNeytandi
 
Posts: 29
Joined: July 2nd, 2004, 8:53 pm

Post Posted September 17th, 2005, 1:00 pm

I've got no experience in this kind of thing, but I've got a pretty good idea for an extension (if somebody else would be willing to build it :)). Basically, this program would add "Restart FireFox" to the File menu for those of us that are far too busy to close and re-open it ourselves after installing themese/extensions. If possible, it could even add a "Restart Firefox" button to the Extension/Theme manager, so that way we could restart it from the same box that pops up after we've installed an extension. Whatdya think?

Schrade

User avatar
 
Posts: 1187
Joined: March 17th, 2004, 12:24 am

Post Posted September 17th, 2005, 1:07 pm

Yeah I think it should be a menu option as well.

I currently have this ability using Customized Toolbar Buttons. I create my own button and then put this javascript into the CTB onClick section:
Code: Select all
a=Components.interfaces.nsIAppStartup,Components.classes["@mozilla.org/toolkit/app-startup;1"].getService(a).quit(a.eRestart | a.eAttemptQuit);


Works perfectly :) Very handy for people like me who are editing and testing themes/extensions a lot.
"Linux is for those who hate Windows, BSD is for those who love Unix." -Some Guy
Try my themes: QuBranch and QuTrunk
Fix Firefox's Resized image scrolling speed: <b>Bug 163975</b>

Pgr

User avatar
 
Posts: 233
Joined: October 28th, 2003, 10:00 am
Location: Lisbon, Portugal

Post Posted September 18th, 2005, 2:22 am

If this could save all your open tabs (at least the current URL, or their full history if possible) this would be a very interesting thing to inlcude in the main Firefox code. The current "just restart Firefox" is very inconvenient and unstylish.

If they can't get rid of restarting, then a button like this would definetively be a touch of class.

Schrade

User avatar
 
Posts: 1187
Joined: March 17th, 2004, 12:24 am

Post Posted September 18th, 2005, 12:21 pm

I use SessionSaver to save all my tabs and session history and whatnot. Try it out, works great.
"Linux is for those who hate Windows, BSD is for those who love Unix." -Some Guy
Try my themes: QuBranch and QuTrunk
Fix Firefox's Resized image scrolling speed: <b>Bug 163975</b>

Recall

User avatar
 
Posts: 1686
Joined: November 7th, 2004, 11:07 am
Location: United Kingdom

Post Posted September 18th, 2005, 12:51 pm

Schrade wrote:Yeah I think it should be a menu option as well.

I currently have this ability using Customized Toolbar Buttons. I create my own button and then put this javascript into the CTB onClick section:
Code: Select all
a=Components.interfaces.nsIAppStartup,Components.classes["@mozilla.org/toolkit/app-startup;1"].getService(a).quit(a.eRestart | a.eAttemptQuit);


Works perfectly :) Very handy for people like me who are editing and testing themes/extensions a lot.


Could you make an extension out of that? I would be very grateful.
Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1.9) Gecko/2008051206 Firefox/3.0

Mr. E
 
Posts: 57
Joined: November 19th, 2004, 3:31 pm

Post Posted September 18th, 2005, 1:11 pm

I made it into an extension, I will post it soon.

Zoolcar9

User avatar
 
Posts: 2225
Joined: November 9th, 2004, 6:45 pm
Location: Jakarta, Indonesia (UTC+7)

Post Posted September 18th, 2005, 1:26 pm

Schrade wrote:Yeah I think it should be a menu option as well.

I currently have this ability using Customized Toolbar Buttons. I create my own button and then put this javascript into the CTB onClick section:
Code: Select all
a=Components.interfaces.nsIAppStartup,Components.classes["@mozilla.org/toolkit/app-startup;1"].getService(a).quit(a.eRestart | a.eAttemptQuit);


Works perfectly :) Very handy for people like me who are editing and testing themes/extensions a lot.


I use the similar code :) but instead of CTB, I use MenuManipulator to add a menuitem on File menu and insert the code to 'onclick' attribute

Code: Select all
function restartFox() {  a=Components.interfaces.nsIAppStartup,Components.classes["@mozilla.org/toolkit/app-startup;1"].getService(a).quit(a.eRestart | a.eAttemptQuit); } if(event.button == 0) {  var restart = confirm("Restart Firefox?");  if(!restart) return;  restartFox();  } else if(event.button == 1) restartFox();
My Firefox information | Add-ons | GitHub

"With great power, comes great desire to show it off."

jedbro

User avatar
 
Posts: 1899
Joined: November 10th, 2002, 12:35 pm
Location: Mexico / Boulder Co.

Post Posted September 18th, 2005, 3:04 pm

Done.

Restart Firefox 0.2.

(added and Icon and Locale Support in 0.2)

Enjoy

-Jed
Last edited by jedbro on September 18th, 2005, 4:52 pm, edited 1 time in total.

Old Greg S
 
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post Posted September 18th, 2005, 4:33 pm

jedbro wrote:Done.

Restart Firefox 0.1.

Enjoy

-Jed

Seems to work well! Now, what's the possibility of this causing FF to crash? It restarts fairly quick which is good, but is there a possibility of being so quick that it still leaves FF as a running process causing it to crash on re-start? It hasn't happened but I'm just curious about that. Nice job on the extension!

jedbro

User avatar
 
Posts: 1899
Joined: November 10th, 2002, 12:35 pm
Location: Mexico / Boulder Co.

Post Posted September 18th, 2005, 4:53 pm

@Greg S:

Hmm, not sure.
It used the XPCOM interface mentioned above, so this is a feature that is built in to Firefox (used for Firefox Updates, etc.).
All this does is give an easy to access menuitem.

Having said that, I would think it is very stable. :D

Cheers
-Jed

Recall

User avatar
 
Posts: 1686
Joined: November 7th, 2004, 11:07 am
Location: United Kingdom

Post Posted September 18th, 2005, 5:10 pm

Works very nice mate! Restarts very quick too :)

If ya fancy improving it :wink:

1: Button that I can add for restart when I right click customize toolbar
2: Option to get rid of the do I want to restart.

Other than that its perfect :D
Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1.9) Gecko/2008051206 Firefox/3.0

Mr. E
 
Posts: 57
Joined: November 19th, 2004, 3:31 pm

Post Posted September 18th, 2005, 5:40 pm

The one that I have made has a toolbar button+, if you want I could post it, once I get back home.

symbol

User avatar
 
Posts: 175
Joined: February 6th, 2005, 12:46 am

Post Posted September 18th, 2005, 5:44 pm

Recall wrote:Works very nice mate! Restarts very quick too :)

If ya fancy improving it :wink:

1: Button that I can add for restart when I right click customize toolbar
2: Option to get rid of the do I want to restart.


This sounds like a great extension, but I'm gonna wait until Option #2 is implemented before installing.

Swami
 
Posts: 4221
Joined: September 25th, 2004, 11:32 pm

Post Posted September 18th, 2005, 10:57 pm

symbol wrote:This sounds like a great extension, but I'm gonna wait until Option #2 is implemented before installing.

http://forums.mozillazine.org/viewtopic ... 38#1752238

SifelltNeytandi
 
Posts: 29
Joined: July 2nd, 2004, 8:53 pm

Post Posted October 10th, 2005, 5:54 pm

Thanks! It's exactly what I was thinking. Great job!

Return to Extension Development


Who is online

Users browsing this forum: No registered users and 1 guest