Trimming Off the Internet #
Anyone wondering about MouseHole 2? Rany Keddo has posted some instructions for winding it up. And, along with that, he posts one of the first MouseHole 2 scripts out there.
Whitelist.rb, for using Mr. T to stop you from wandering when you’re working.
class Whitelist < MouseHole::App
name "whitelist"
namespace "purzelbaumcorp.de"
description "fend off the time thieves!"
version "0.1"
%w{mail.google.com corelib.rubyonrails.org blog.purzelbaumcorp.de}.
each do |site|
- url("http://#{site}/*")
end
+ url("http://*")
# the pages flow through here
def rewrite(page)
page.document.at("html").innerHTML= %{
<body>
<div style='text-align: center; margin-top:40px;'>
<img src='http://www.doyouremember.co.uk/images/mr-t.gif' />
<div style='font-size:27pt; color:#aaa;'>
Pity the fool!
</div></div>
</body>
}
end
end
If I may interject, the rewrite method could also be written:
def rewrite(page)
page.html do
body do
div :style => 'text-align: center; margin-top: 40px;' do
img :src => 'http://www.doyouremember.co.uk/images/mr-t.gif'
div "Pity the fool!", :style => 'font-size:27pt; color:#aaa;'
end
end
end
end
Oh, and, if you use this: please consider unblocking RedHanded! It’s not that distracting and it’s super-helpful. Right, guys?


Joe Ruby
You aint got no time for the jibba-jabba!
technomancy
Cool! Does Mousehole 2 allow Hoodwink’d? My JS hoodwinking gear has been broke for ages. (Latest version, lest ye ask.)
Asztal
I don’t see why not. It’s just a script injection really, right?
MenTaLguY
Well, there’s a bit more than that (some HTML injection too), but basically yeah. Anyway, it’s certainly within Mousehole’s capabilities.
Mousehole-the-classic-version (nee hoodlum) was actually born of a desire to wink without greasy monkeys loitering about.
why
I’ve just been waiting for things to come together. You know: hpricot had to be born. But it’s about time to wrap things up.
zimbatm
well said why :_) does it mean that Camping 1.5 will be released soon ?
jchris
i’m actually just testing mouse hole (1.2) capturing of POSTs.