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
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.
Download a .phr file from the links here and save the file somewhere handy, like the Desktop.
Open the PithHelmet Rule Editor (Command-Shift-E)
Drag the .phr file into the list of rules on the left side of the editor window.
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 |
F |
go directly to external links, without framing |
burris |
|
|
amazon.com |
M |
kill the refocus so Amazon no longer pops to the front on load |
||
|
amazon.co.uk |
M |
remove the promotonal ad below the navigation bar |
Stormwolf |
|
|
anonymizer.com |
M |
disables the status scroller script |
Stormwolf |
|
|
atptennis.com |
M |
view mercedes-benz video streams in external player |
rahul |
|
|
boingboing.net |
C |
remove side columns |
rahul |
|
|
del.icio.us |
C |
Jon Hicks |
||
|
cnet.com |
M |
strip ads from cnet sites |
rahul |
|
|
cocoa.mamasam.com |
F |
redirects URLs from cocoa.mamasam.com to cocoabuilder.com |
||
|
digi.no |
O |
removes scrolling text links |
||
|
globeandmail.com |
F |
removes annoying news ticker |
||
|
gmail.com |
C |
removes ad pane from GMail |
||
|
gmail.com |
F |
|||
|
google.com |
M |
removes text ads from Google |
Stormwolf |
|
|
howstuffworks.com |
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 |
M |
removes ad pane from IMDB |
Stormwolf |
|
|
macupdate.com |
M |
removes ad pane from Mac Update |
Stormwolf |
|
|
macworld.com |
O |
fixes large whitespace areas |
||
|
megaupload.com |
M |
removes wait time from download page |
Stormwolf |
|
|
netflix.com |
M |
put queue in random order |
||
|
news.bbc.co.uk |
C |
no news ticker; centered content |
rahul |
|
|
nwsource.com |
M |
strip ads from seattleTimes, PI, etc... |
rahul |
|
|
nytimes.com |
C |
removes ad pane from article |
||
|
nytimes.print.phr |
F |
redirects NY Times stories to the print version |
||
|
PHPBB forums |
M |
removes signatures from PHPBB forums |
Stormwolf |
|
|
salon.com.print.phr |
F |
redirects Salon pages to print version (req. login) |
||
|
si.com |
F |
restores an image map blocked by BadSense |
||
|
theregister.com |
M |
removes ads from main RSS feed |
Stormwolf |
|
|
en.wikipedia.org |
F |
redirects Wikipedia pages to their printer-friendly version |
||
|
wired.com |
M |
adds access keys for next/prev links in articles |
||
|
woot.com |
F |
For woot.com RSS feed, replaces thumbnail with large image |
||
|
yahoo.com |
C |
removes ads from Yahoo |
||
|
youtube.com |
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 |
|
* |
J |
add prev/next/up/digit accesskeys (C-j, C-l, C-i), remove others; kill new windows; no auto textfield focus |
rahul |
|
|
* |
J |
lite version of alphakeys.phr (kill new windows, accesskeys w/o digit links) |
rahul |
|
|
* |
J |
stops links from opening in new windows (from a GreaseMonkey script) |
Scaryfish |
|
|
* |
M |
removes js that tries to resize or move windows (from Privoxy) |
||
|
* |
F |
changes "foo" in location bar to " |
||
|
* |
M |
replaces "Your Ad Here" to "Your Ad Not Here" (comical) |
Stormwolf |
|
|
* |
J |
Greasemap: inserts a Google Map showing locations mentioned in the page content (www.vinq.com/greasemap) |
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:
be named .pl, .py or .sh
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
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
.*[launch|music].yahoo.com
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
http://www.fscript.org
3. Download the current Filterset.G ruleset from
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
Wikir