Zappatic
About SafariTidy

The Safari Tidy plugin is a small plugin that lets you validate the webpages you browse for (x)html compliance. The actual validation is done by Tidy and the W3C validator. This plugin was initially modeled after a similar plugin for Firefox, which can be found here.

How it works

In the bottom right corner of each browser window you will see the amount of warnings and errors the current page has, along with a small icon.

Everything's OK
Everything's OK
Warnings present!
Warnings present!
Errors present!
Errors present!

If you enable the W3C validator, you'll get two sets of results. The W3C results are on the left, the Tidy results are on the right.

W3C and Tidy validation results
W3C and Tidy validation results

Clicking on the Tidy results will show the source of the current page. The default 'view-source' window of Safari is extended so that it shows all the errors and warnings in a list. The lines containing errors are highlighted so they can be located easily. Doubleclicking on a warning or error in the list will position the cursor at the correct location in the html source text.

Tidy results
Tidy results

Clicking on the W3C results will open a new browser window, containing the report generated by the W3C validator.

W3C results
W3C results
Download
Installation
  • Unzip the file you downloaded by doubleclicking on it.
  • Install SIMBL
  • Copy safaritidy-sl.bundle to the SIMBL plugins folder ( /Library/Application Support/SIMBL/Plugins/ ).
  • Restart Safari.
Deinstallation
  • Remove the safaritidy-sl.bundle file from the SIMBL plugins folder ( /Library/Application Support/SIMBL/Plugins/ ).
  • Restart Safari.
Disclaimer

The software is provided as-is, and I take no responsibility for any unwanted side effects or problems by using it.

If you like the plugin, please consider a small donation.

Known issues
  • Cmd-E in the view-source window does not work.
  • SafariStand source editing conflicts with line numbering. Disable line numbering in the preferences to circumvent.
  • Hide/Show statusbar - plugin may remain invisible.
  • Snow Leopard: due to a different plugin injection mechanism, the first browser window that opens will not visualize the validation results. Opening a new window will show the validation results in the statusbar.
  • HTML5 not (yet) supported
Changelog
  • 07 september 2009 — version 0.2.8
    • compatible with 64-bit Safari 4 on Snow Leopard
    • added the W3C validation engine
  • 11 june 2009 — version 0.2.7
    • compatible with Safari 4
  • 2 march 2009 — version 0.2.6
    • compatible with Safari 4 Beta 1
    • highlight error rows instead of coloring text
  • 18 march 2008 — version 0.2.5
    • compatible with Safari 3.1
    • compatible with SafariSource 1.7.4 (be sure to download the latest version of SafariSource!)
  • 19 november 2007 — version 0.2.4
    • compatible with Safari 3 on Leopard (10.5) and Tiger (10.4.11)
  • 28 october 2007 — version 0.2.3 (Leopard only)
    • ONLY compatible with Leopard (10.5)
    • enabled find-functionality in view-source window
    • view-source window is not editable anymore
  • 12 june 2007 — version 0.2.2b
    • ONLY compatible with Safari 3 Beta
  • 28 june 2006 — version 0.2.1
    • compatible with 10.4.7 release of Safari
    • can now be installed as SIMBL plugin
    • fix repaint bug in status bar when switching tabs
    • fix crashing bug in line numbering
    • fix bug in shift-jis encoding handling
  • 27 may 2006 — version 0.2
    • added preference panel
    • added line numbers in view-source window
    • added version checking
    • various encoding issues solved
    • ignore text/xml mimetypes
    • customizable visualisation of message in statusbar
    • bugfix: divider bar in view-source remembers position
    • bugfix: better line ending handling
  • 22 may 2006 — version 0.1.1
    • make the plugin compatible with SafariSource (syntax coloring plugin)
  • 20 may 2006 — version 0.1
    • initial version