Feed Sign in with OpenID OpenID

Simon Willison’s Weblog

Fixing Paul Graham’s Footnotes

I’m a big fan of Paul Graham’s essays, the latest of which is How to Start a Startup. There’s just one niggling problem with them: Paul makes extensive use of footnotes, but provides no way of jumping from the reference in the text to the footnote at the bottom of the page and back up again. Instead, you have to manually down to the bottom of the article and back up again every time you hit a footnote reference.

I really should be finishing up my packing for SxSW (my bus leaves in an hour and a half), but I couldn’t resist knocking up a quick greasemonkey script to fix the problem. Install and enjoy. If you haven’t installed greasemonkey you can get the same effect by manually activating this bookmarklet: Fix Paul Graham’s Footnotes.

This is Fixing Paul Graham’s Footnotes by Simon Willison, posted on 11th March 2005.

Tagged ,

View blog reactions

Next: Choice SxSW quotes

Previous: Problems with Trac? Switch to FSFS

11 comments

  1. Here's a related script:
    http://sharedobject.org/greasemonkey/paul.graham.u ser.js

    Jonas Galvez - 11th March 2005 04:32 - #

  2. Thanks, Simon. Installed.

    And I learned a bit about both RegEx and String.replace() from the code. Bonus!

    Jeremy Dunck - 11th March 2005 15:12 - #

  3. Pretty cool; but I get an error on the second line ("To install,"). The /* and */ don't seem to be commenting it out.

    I changed the code to use // and it worked fine.

    Joe W. - 11th March 2005 15:31 - #

  4. Joe:
    Were you installing with the context menu, or by navigating to the script, then using Tools > Install User Script...?

    I'm asking because I installed the latter way, and didn't have any problem. I'm running FF 1.0.1 and GM 0.2.1. If this is a GM bug, I'd like to nail down the reproducing steps.

    Thanks!

    Jeremy Dunck - 11th March 2005 21:51 - #

  5. I just tried both ways (context menu and navigating to the script) and received the error both times. I tried the context menu first, browsed to the Paul Graham site, got the error (it's reported as line 66, I presume because there's other js on that page). Then I uninstalled that script and navigated to the script and used Tools > Install User Script. I'm running Firefox 1.0 and GM 0.2.2. Hope this helps.

    Joe W. - 12th March 2005 22:15 - #

  6. Now all we need is a script that shows the text commented out of the HTML in Graham's essays, then we will have the perfect for-just-one-site bookmarklet set.

    Richard - 13th March 2005 03:52 - #

  7. Thanks for the intro into this bit of tech. The screen display and printing of footnotes and endnotes is a recurring problem for documenters.

    A while ago I cooked up an IE-only approach using CSS and a tiny script that solved some of the conflicts between the needs of the screen and the print versions. The solution uses the onbeforeprint event so I never found a way to generalize it to Mozilla-spawn.

    Print Endnotes in IE

    Brett Merkey - 13th March 2005 21:39 - #

  8. I'm terribly envious that you're in SxSW...

    Jeremy Hawkins - 16th March 2005 23:34 - #

  9. I haven't forgotten you, Joe.

    Also, anyone that likes this may also like this user script which sets the text to be 800 pixels wide, instead of Graham's narrow setting. Yes, of course, this could be done in a CSS user stylesheet.

    Jeremy Dunck - 18th March 2005 05:24 - #

  10. very good

    hangzhouren - 15th June 2005 19:16 - #

  11. http://www.hangzhou98.com/mfdy/ here also discuss it!

    fafda - 15th June 2005 19:18 - #

Comments are closed.

Previously hosted at http://simon.incutio.com/archive/2005/03/11/footnotes

A django site