Jump to content


Photo
- - - - -

Firefox Offline Theme Installer


  • Please log in to reply
31 replies to this topic

#1 TituFama

TituFama

    Super WinMatrixian

  • Member
  • 2,392 posts

Posted 23 October 2004 - 09:43 PM

There is no option available in Firefox for browsing and insatlling the themes. You have to install the thems online directly from the server.

But if you have downloaded a skin and now want to install it from hard disk offline?

There is one easiest way to build your own Firefox theme installer.
Copy the below code and paste it in notepad now save the file with .HTML extraction (example: Theme Installer.html)

And your Firefox theme installer is ready.
Open the HTML file with Firefox and browse the .JAR theme file from hard disk :D

<script type="text/javascript">
function installTheme(where) {
var file = '';
if (where == 'local') {
file = 'file:///' + escape(document.getElementById('filename').value.replace(/\\/g,'/'));
} else {
file = document.getElementById('url').value;
}
InstallTrigger.installChrome(InstallTrigger.SKIN, file, getName(file));
}
function getName(raw) {
var grabFileStart = raw.lastIndexOf('/');
var grabFileEnd = raw.lastIndexOf('.');
if (grabFileStart >= grabFileEnd) {
return 'Invalid file name';
} else {
return raw.substring(grabFileStart + 1,grabFileEnd);
}
}
function installThemeNow(file) { 
InstallTrigger.installChrome(InstallTrigger.SKIN, file, getName(file));
return true;
}
</script>
<style type="text/css">
<!--
.style2 {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-weight: bold;
	font-size: 12px;
}
-->
</style>



<table width="80%" border="0" align="center" cellpadding="0" cellspacing="2" bgcolor="#0099FF">
  <tr>
    <td bgcolor="#F5F4ED"><br><div align="center"><span class="style2">Install Firefox .JAR theme from Harddisk<br><br></span>
        <form><input id="filename" type="file">
         
        <input value="Install" onclick="installTheme('local');" type="button">
        </form>
    </div></td>
  </tr>
</table>


#2 Cyclops

Cyclops

    CyclopsTheRedEye

  • WM Admin
  • 1,025 posts

Posted 24 October 2004 - 02:20 AM

Code is working fine.
Thank you.

#3 Power User Z

Power User Z

    Z

  • Member
  • 1,595 posts

Posted 24 October 2004 - 04:27 AM

Thanks for the installer TituFama
There is a Firefox extension which does the same work but that's not compatible with Firefox 1.0

Edited by Power User Z, 24 October 2004 - 04:42 AM.


#4 elositocandela

elositocandela

    DJ AZTEC IN THE HOUSE

  • Member
  • 1,154 posts

Posted 24 October 2004 - 06:24 AM

thanks man very usefull

#5 Benji

Benji

    Active WinMatrixian

  • Member
  • 816 posts

Posted 24 October 2004 - 05:51 PM

Did You yourself code this?
(not implying anything such as plagerism but i think this is very impressive)

#6 ReynoldsM

ReynoldsM

    Reynolds Medila

  • Elites
  • 2,147 posts

Posted 24 October 2004 - 06:08 PM

Great, if this is your own code

#7 Aqua Structure

Aqua Structure

    long-time listener, first-time caller

  • Member
  • 1,595 posts

Posted 24 October 2004 - 07:05 PM

Thanks for the code, but if you didn't make it yourself be sure to give credit to whoever did. :)

#8 Neofall

Neofall

    Matrixian

  • Elites
  • 1,709 posts

Posted 24 October 2004 - 11:37 PM

WOW. Thanks TituFama

#9 Benji

Benji

    Active WinMatrixian

  • Member
  • 816 posts

Posted 25 October 2004 - 12:48 AM

Thanks you. Now i can use kol's Longhorn theme FINALLY!!!!!

#10 Liquid Snake

Liquid Snake

    I live in a 3D world

  • Validating
  • 1,598 posts

Posted 25 October 2004 - 01:28 AM

Great job TituFama
Try to make the installer more beautiful with style sheet :D

#11 Caleb

Caleb

    Super WinMatrixian

  • Member
  • 1,672 posts

Posted 25 October 2004 - 04:24 AM

Awesome job :D

#12 Siraka_Serion_Semi

Siraka_Serion_Semi

    S3

  • Global Moderator
  • 2,227 posts

Posted 25 October 2004 - 06:31 AM

Nice skin installer

#13 Virus Smith

Virus Smith

    ..not an agent.

  • Member
  • 1,707 posts

Posted 25 October 2004 - 09:15 PM

This is a must have tool for all the Firefox users
Thanks for the code man

#14 FX Soldier

FX Soldier

    FX

  • Member
  • 1,677 posts

Posted 26 October 2004 - 01:07 AM

WOW. Thank you :rolleyes:

#15 Sushee XP

Sushee XP

    Super WinMatrixian

  • Member
  • 1,224 posts

Posted 26 October 2004 - 11:13 PM

That's nice. Thank you very much

#16 WinTrunix

WinTrunix

    WinTrunix

  • Member
  • 764 posts

Posted 27 October 2004 - 01:39 PM

Very useful tool for me

#17 Integrated System

Integrated System

    What?

  • Member
  • 1,820 posts

Posted 28 October 2004 - 06:24 AM

Really nice

#18 Aqua Structure

Aqua Structure

    long-time listener, first-time caller

  • Member
  • 1,595 posts

Posted 29 October 2004 - 01:16 AM

I don't understand how to apply the sub-styles of the Longhorn themes.

#19 cmkumar2k

cmkumar2k

    Super WinMatrixian

  • Elites
  • 5,084 posts

Posted 29 October 2004 - 03:49 AM

wow.. gr8 work!

#20 Eleazar

Eleazar

    My First Post!

  • Members
  • 1 posts

Posted 31 October 2004 - 09:31 PM

u can also open the Theme dialog box and drag and drop the .JAR into it

voila!

Want to comment?

Register or Sign In to go completely ad-free!