Update your extensions’ maxVersion with perl
Whenever a new version of Firefox comes out, there are invariably a few extensions that won’t work with it. Not because the extension’s functionality is no longer suited, but because of a value that is set too low- the maxVersion. That tells Firefox that the extension is only compatible with a certain version of Firefox. You can update the extension by opening it up, and changing the maxVersion to the current Firefox version, or even higher. The easiest way to do this is to use a perl script to do it for you.
If you don’t have perl installed on your Windows machine, it’s a free download here: ActivePerl
It’s an easy setup, just click a few buttons, then you’re done. Then copy and paste the following into a new file and call it maxversion-updater.pl or anything, really, as long as you have the pl extension.
The easiest way to find where your profile folder is this:
Start > Run > %appdata%\Mozilla\Firefox\Profiles
Copy the 8 digits before the .folder and paste them in the script below.
#!/usr/bin/perl
use File::Find;
use strict;
# Firefox extension update script, written by Eric Hamiter
#
# This script will attempt to update extensions used on
# earlier builds of Firefox by changing the maxVersion fields.
# It will probably work, but might accidentally set
# your house on fire. I don't accept responsibility for what
# might happen, so use at your own risk.
#
# Modify the following lines to point the variable to your
# Firefox profile directory and specify the new Firefox version.
my $default_folder="xxxxxxxx.default";
my $new_version="1.5";
# The rest of the script requires no modification.
my $max="em:maxVersion";
my $def="$ENV{'APPDATA'}\\Mozilla\\Firefox\\Profiles\\$default_folder";
my $directory="$def\\extensions";
find (\&change, $directory);
sub change
{
my @newMax;
my $oldMax;
if ( $File::Find::name =~ /\.rdf$/ ) {
open (FILE, $File::Find::name ) or
die "Cannot open file: $!";
print "\n" . $File::Find::name . "\n";
while ( $oldMax = <FILE> ) {
$oldMax =~ s/<$max>.*</<$max>$new_version</i;
$oldMax =~ s/$max=".*"/$max="$new_version"/i;
push(@newMax, $oldMax);
}
close FILE;
open ( OUTFILE, ">$File::Find::name" ) or
die "Cannot open file: $!";
print ( OUTFILE @newMax );
close ( OUTFILE );
undef( @newMax );
}
}
-->
