Themer

Talk about add-ons and extension development.
User avatar
alanjstr
Moderator
Posts: 9100
Joined: November 5th, 2002, 4:43 pm
Location: Anywhere but here
Contact:

Post by alanjstr »

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.
User avatar
Stefan
Posts: 2051
Joined: November 5th, 2002, 2:46 am

Post by Stefan »

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?
User avatar
Thumper
Posts: 8037
Joined: November 4th, 2002, 5:42 pm
Location: Linlithgow, Scotland
Contact:

Post by Thumper »

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
Posts: 999
Joined: November 4th, 2002, 5:47 pm
Location: UK
Contact:

Post by cdn »

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
User avatar
djst
Moderator
Posts: 2826
Joined: November 5th, 2002, 1:34 am
Location: Sweden
Contact:

Post by djst »

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.
User avatar
Thumper
Posts: 8037
Joined: November 4th, 2002, 5:42 pm
Location: Linlithgow, Scotland
Contact:

Post by Thumper »

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
Post Reply