1. Introduction

The basic idea is to share PithHelmet rule files (.phr) with other users.

There are only a few .phr files floating around right now. However, the GreaseMonkey project (a plugin for FireFox) has a [WWW] number of scripts that can usually be ported to PithHelmet with minimal difficulty. Unfortunately, Safari doesn't support XPath, which is often used to select bits of the DOM. If one of the scripts relies on XPath, it would need to be extensively rewritten.

If you don't see what you are looking for, ask. If you have a handy rule, share it with others. Each rule should work for one site (so as not to interfere with the Default Site Rule), and may be attached directly to this wiki page by anyone. (Well, you need to create an account on wikir, but that should only take minute.)

2. Installing

Installing is pretty simple, but slightly non-obvious.

  1. Download a .phr file from the links here and save the file somewhere handy, like the Desktop.

  2. Open the PithHelmet Rule Editor (Command-Shift-E)

  3. Drag the .phr file into the list of rules on the left side of the editor window.

  4. Click the "Apply" button at the bottom of the window (or just close the editor window) and you are done.

3. Creating A .phr File

Super simple - drag a rule out of the rule editor list to the Desktop - huzzah - a new .phr file.

4. The List

Here are a few links to custom rules (please keep these alphabetical):

Rule (T)ype: F = Filter, C = CSS, J = Javascript, M = Machete, O = Other

Site

File

T

Description

Author

about.com

unabout.phr

F

go directly to external links, without framing

burris

amazon.com

amazon.phr

M

kill the refocus so Amazon no longer pops to the front on load

MikeSolomon

amazon.co.uk

amazon.co.uk.phr

M

remove the promotonal ad below the navigation bar

Stormwolf

anonymizer.com

anonymizer.phr

M

disables the status scroller script

Stormwolf

atptennis.com

www.atptennis.com.phr

M

view mercedes-benz video streams in external player

rahul

boingboing.net

boingboing.net.phr

C

remove side columns

rahul

del.icio.us

[WWW] del.icio.us.phr

C

[WWW] delectible skin

Jon Hicks

cnet.com

cnet_ads.phr

M

strip ads from cnet sites

rahul

cocoa.mamasam.com

cocoa.mamasam.com.phr

F

redirects URLs from cocoa.mamasam.com to cocoabuilder.com

QwertyDenzel

digi.no

digi.no.phr

O

removes scrolling text links

MikeSolomon

globeandmail.com

globeandmail.phr

F

removes annoying news ticker

MikeSolomon

gmail.com

gmail.phr

C

removes ad pane from GMail

MikeSolomon

gmail.com

[WWW] gmail_secure.phr

F

[WWW] GMailSecure for PithHelmet

RyanIrelan

google.com

google3.phr

M

removes text ads from Google

Stormwolf

howstuffworks.com

howstuffworks.phr

F

changes URLs so you can get articles in their print form only. (note: works on electronics.howstuffworks.com only - rewrite for other sections)

dekay

imdb.com

imdb.com.phr

M

removes ad pane from IMDB

Stormwolf

macupdate.com

macupdate.com.phr

M

removes ad pane from Mac Update

Stormwolf

macworld.com

macworld.com.phr

O

fixes large whitespace areas

MikeSolomon

megaupload.com

megaupload.com.phr

M

removes wait time from download page

Stormwolf

netflix.com

netflix_queue_randomizer_v1.2.phr

M

put queue in random order

DaveHirsch

news.bbc.co.uk

bbcNews.phr

C

no news ticker; centered content

rahul

nwsource.com

nwsource_com.phr

M

strip ads from seattleTimes, PI, etc...

rahul

nytimes.com

nytimes.com.phr

C

removes ad pane from article

MikeSolomon

nytimes.print.phr

nytimes.print.phr

F

redirects NY Times stories to the print version

MichaelHall

PHPBB forums

phpbb2.phr

M

removes signatures from PHPBB forums

Stormwolf

salon.com.print.phr

salon.com.print.phr

F

redirects Salon pages to print version (req. login)

MichaelHall

si.com

bannersmlb.jpg.phr

F

restores an image map blocked by BadSense

ClintHepner

theregister.com

theregister.phr

M

removes ads from main RSS feed

Stormwolf

en.wikipedia.org

en.wikipedia.org.printerfriendly.phr

F

redirects Wikipedia pages to their printer-friendly version

MichaelHall

wired.com

wired.phr

M

adds access keys for next/prev links in articles

MikeSolomon

woot.com

woot-jpg.phr

F

For woot.com RSS feed, replaces thumbnail with large image

DZurn

yahoo.com

yahoo.com.phr

C

removes ads from Yahoo

MikeSolomon

youtube.com

youtube.phr

C,J

strip ads, add access keys for prev/next (C-j, C-l)

rahulSchmahul

Note: (all sites) rules have now been introduced. It's also possible to attach the accompanying filter/script to the Default Site Rule instead of having two similar rule domains.

Site

File

T

Description

Author

*

alphakeys.phr

J

add prev/next/up/digit accesskeys (C-j, C-l, C-i), remove others; kill new windows; no auto textfield focus

rahul

*

betakeys.phr

J

lite version of alphakeys.phr (kill new windows, accesskeys w/o digit links)

rahul

*

nonewwindows.phr

J

stops links from opening in new windows (from a GreaseMonkey script)

Scaryfish

*

no_resize_or_move.phr

M

removes js that tries to resize or move windows (from Privoxy)

WilliamCarrel

*

onewordsite.phr

F

changes "foo" in location bar to "[WWW] http://www.foo.com/"

DaveHirsch

*

youadnothere.phr

M

replaces "Your Ad Here" to "Your Ad Not Here" (comical)

Stormwolf

*

greasemap08safari.phr

J

Greasemap: inserts a Google Map showing locations mentioned in the page content (www.vinq.com/greasemap)

MarkTorrance

5. Other Sample Rules

These may require some fiddling to get them to work, so be prepared to spend a little time editing by hand.

sourceforge.net: enable direct download

various sites: remove PDF delay for journal articles

using javascript in the transmogrifier:

6. Machete

This is definitely more advanced. This is basically an "inline proxy" for a web page. This means that you can use a variety of scripting languages, programmed much like a CGI, to filter web pages or create extensive modifications.

Currently, Machete scripts must:

  1. be named .pl, .py or .sh

  2. have the execute bit set on them (chmod +x)

You set a machete script in the Advanced tab of a site rule.

Read the MacheteFaq

7. Non-Machete scripts

[perhaps this belongs elsewhere, but it seems to fit here]

7.1. mslaunch.js

The mlaunch.js script is not a Machete script, but it does perform Machete-like actions. It enables Safari users to view the videos on launch.yahoo.com. The script itself is a very simple port of the Greasemonkey script of [WWW] http://www.pooyak.com/p/pklaunch/. To use the script, save it as mlaunch.js, then:

1. create a PithHelmet Rule named launch.yahoo.com

2. set the Regex URL Match to

3. specify the filename for the script (mlaunch.js) in the Style tab under "Custom Javascript"

7.2. Filterset.G Importer

Due to the licensing of the Filterset.G ruleset, it cannot be redistributed. This script allows the user to download the ruleset themselves and then import it into PithHelmet. To import a Filterset.G ruleset, do the following:

1. Download the fsg2ph-v2 script. Save it as fsg2ph.

2. Download the F-Script tools from [WWW] http://www.fscript.org

3. Download the current Filterset.G ruleset from [WWW] http://www.pierceive.com

4. Start Safari

5. Start F-Script Anywhere and install a workspace in Safari (this lasts until Safari is restarted)

6. In Safari, choose FSA -> New F-Script Workspace. An interactive F-Script interpreter window appears.

7. At the F-Script prompt type: fsg2ph := sys load

This will pop up a dialog box. Navigate to where you saved the fsg2ph archive and select it.

8. At the F-Script prompt type: fsg2ph value:'/path/to/ruleset'

Where /path/to/ruleset should be the absolute path of where you saved the Filterset.G ruleset.

9. If all went well, you should now have a single PithHelmet rule named "Filterset.G Ruleset <RevisionID>" which represents the Filterset.G Ruleset

last edited 2007-03-27 03:42:17 by MikeSolomon