File:  [mozdev] / basic / src / compact-xml
Revision 1.1: download - view: text, annotated - select for diffs - revision graph
Wed Aug 26 02:17:36 2009 UTC (8 years, 3 months ago) by basic
Branches: MAIN
CVS tags: cookiebutton_0_9_3, cookiebutton_0_9_2, HEAD
firefox 3.5 only
recompressed png files
combined css files
combined javascript files
get rid of dynamic script loading
remove old unused rdf chrome registration files
strip xml/xul/js/css files to make them smaller

#!/usr/bin/perl

open(FILE, '<', $ARGV[0]) or die $!;

undef $/;
$file = <FILE>;
$file =~ s%<!--(:?[^-]|-[^-]|--[^>])*-->%%sg;
$file =~ s%\s+% %sg;
$file =~ s%> <%><%sg;
close(FILE);
open(FILE, '>', $ARGV[0]) or die $!;
print FILE $file;
close(FILE);

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>