MouseHoleTwo: whitelist.rb

File whitelist.rb, 0.6 kB (added by lwu, 19 months ago)

Example whitelist script

Line 
1class Whitelist < MouseHole::App
2  title "whitelist"
3  namespace "purzelbaumcorp.de"
4  description "fend off the time thieves!"
5  version "0.15"
6
7  %w{mail.google.com corelib.rubyonrails.org blog.purzelbaumcorp.de}.
8    each do |site|
9    - url("http://#{site}/*")
10  end
11
12  + url("http://*")
13
14  # the pages flow through here
15  def rewrite(page)
16    page.html do
17      body do
18        div :style => 'text-align: center; margin-top: 40px;' do
19          img :src => 'http://www.doyouremember.co.uk/images/mr-t.gif'
20          div "Pity the fool!", :style => 'font-size:27pt; color:#aaa;'
21        end
22      end
23    end
24  end
25end