#!/usr/bin/env ruby


style = "<head>\n<style type=\"text/css\">\n#sidebar-b { display: none ! important }\n#sidebar-c { display: none ! important }\nspan.class1 { display: none ! important }\np.posted > iframe { display: none ! important }\n#content { width: 800px }\n</style>"

def head_match(line)
   return line =~ /<head>/
end

while line = STDIN.gets do
   if head_match(line) 
      line.sub!(/<head>/, style)
   end
   unless line =~ /<!-- BB editors' Plugs -->/ .. line =~ /<!-- End BB editors' plugs -->/
      puts line
   end
end

