LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   create themes on firefox! (https://www.linuxquestions.org/questions/linux-software-2/create-themes-on-firefox-262021/)

mcgrath0087 12-03-2004 12:59 AM

create themes on firefox!
 
Well, since version 1.0 came out, I have been stuck with mozilla.org created themes. That just won't do. I stumbled on some code that will let you browse to your own .jar files, and swap out the theme. Paste into a text file, and open with firefox... browse to you .jar file, and voila instant theme.

Hopefully this helps out a few people.

What I have done is I downloaded the plastikfox theme, and swapped out the .png files for icons created in the 'sparkling' icon set. seems to match KDE perfectly now. (maybe there was an easier way to do this.)

cheers!



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


All times are GMT -5. The time now is 03:39 AM.