MozillaZine

Themer

Talk about add-ons and extension development.
alanjstr
Moderator

User avatar
 
Posts: 9100
Joined: November 5th, 2002, 4:43 pm
Location: Anywhere but here

Post Posted December 15th, 2002, 6:48 pm

ehume wrote:
djst wrote:
alanjstr wrote:
ehume wrote:
djst wrote:Can't you invoke a javascript command from the command-line?


This sounds interesting. How do we do that?

Ed


Type in the URL box:

javascript:functionName(param1,param2,param3)


I was talking about a command-line way of invoking a javascript command, and I've found the solution:

phoenix.exe "javascript:whatever();"

So, something like this could actually work, and would make the requested built-in theme installer on the Preferences window obsolete:

phoenix.exe "javascript:InstallTrigger.installChrome(InstallTrigger.SKIN, %1, 'Phoenix Theme');"


So how does one use that? Especially, how does one identify the location of 'Phoenix Theme' so that Windows (e.g.) can find it to install it?

Ed


Actually, the third element is just a string that will appear in the dialog. the %1 is what would be replaced.
Tools... Folder Options ... File Types ... jar
Figure out how to get into the settings for it and add a new application to assist in opening. Depending on your version of Windows, things get wonky from here.

If you're using Linux, then you'll create a bash script themeInsta.sh or something.

Stefan

User avatar
 
Posts: 2051
Joined: November 5th, 2002, 2:46 am

Post Posted December 15th, 2002, 7:22 pm

alanjstr wrote:
Well, jar actually stands for Java Archive (or at least it used to). Not all jar files are Mozilla themes. Most aren't. That said, I still don't know why they chose gzipped files named as .jar. A theme .xpi is merely a wrapper (with it's own insecurities).


Yes, but simply putting .xpi instead of .jar allows you to handle it much more easily.
And I agree that the real problem here is the not so bright™ decision of using .jar for the zipped files.

Mayby it's time to intorduce a new extension that would be more suitable?
something like .thm perhaps?

Thumper

User avatar
 
Posts: 8037
Joined: November 4th, 2002, 5:42 pm
Location: Linlithgow, Scotland

Post Posted December 15th, 2002, 9:08 pm

Yeah, that's what I thought, a custom extension for the zip just like every other theme app in the world uses. I don't see it happening in Phoenix only though, that's the problem, and what with the browser's internals developing so fast it might not be a great idea to have a separate file format right now.

But currently, having Themer built into the Themes pref page (once it gets de-uglified) seems like the best course of action.

- Chris

cdn

User avatar
 
Posts: 999
Joined: November 4th, 2002, 5:47 pm
Location: UK

Post Posted December 16th, 2002, 1:45 am

thumperward wrote:But currently, having Themer built into the Themes pref page (once it gets de-uglified) seems like the best course of action.

- Chris


you're only jealous because this sassenach has a better avatar than you : P

djst
Moderator

User avatar
 
Posts: 2826
Joined: November 5th, 2002, 1:34 am
Location: Sweden

Post Posted December 16th, 2002, 4:19 am

alanjstr wrote:
ehume wrote:
djst wrote:
alanjstr wrote:
ehume wrote:
djst wrote:Can't you invoke a javascript command from the command-line?


This sounds interesting. How do we do that?

Ed


Type in the URL box:

javascript:functionName(param1,param2,param3)


I was talking about a command-line way of invoking a javascript command, and I've found the solution:

phoenix.exe "javascript:whatever();"

So, something like this could actually work, and would make the requested built-in theme installer on the Preferences window obsolete:

phoenix.exe "javascript:InstallTrigger.installChrome(InstallTrigger.SKIN, %1, 'Phoenix Theme');"


So how does one use that? Especially, how does one identify the location of 'Phoenix Theme' so that Windows (e.g.) can find it to install it?

Ed


Actually, the third element is just a string that will appear in the dialog. the %1 is what would be replaced.
Tools... Folder Options ... File Types ... jar
Figure out how to get into the settings for it and add a new application to assist in opening. Depending on your version of Windows, things get wonky from here.

If you're using Linux, then you'll create a bash script themeInsta.sh or something.


If this indeed works, the next step would be to add this file type association to the future Phoenix installer.

Thumper

User avatar
 
Posts: 8037
Joined: November 4th, 2002, 5:42 pm
Location: Linlithgow, Scotland

Post Posted December 16th, 2002, 5:33 am

Associating JARs with Phoenix isn't wise. The majority of JARs on my PC have nothing to do with skinning or Phoenix. It's perfect for a custom extension though.

- Chris

Return to Extension Development


Who is online

Users browsing this forum: No registered users and 3 guests