1. Jakub Piotr Cłapa
  2. wrzuta.safariextension


Clone wiki

wrzuta.safariextension / Home


Download the extension bundle for Safari 5.

If you don't use wrzuta.pl then you may want to read about some implementation details below. :)

About Wrzuta.pl HTML5ifier

This extension for Safari 5 changes the audio player on the wrzuta.pl site from Flash to the HTML5 audio tag, removes some adds and optionally cleans the site layout (and completely reorganizes the home page). It also adds download links to flv video and mp3 audio files.

The audio & video downloads are based on the Wrzuta.pl Downloader! light userscript by ajambro. The HTML5ifier is based on Wrzuta HTML5-ifier by look997. The redesign is partially mine (I rewrote most of the front page CSS hack to use floats instead of absolute positioning and added some ad blockers) and partially based on the wrzuta.pl redesign & tweak userstyle by dikamilo.

Extension settings

The ad blocking functionality and the site redesign can be controlled via the new extensions panel in Safari preferences. I was not aware of any other extensions using the settings API when I was working on this.

Contrary to Apple documentation the settings seem to be only available on the global page and to get notifications you have to use safari.extension.settings.addEventListener with the "change" event (the example in the Guide is using the "safari.self" object which silently fails; the explanation in the Guide is correct but IMHO not obvious).


I also did not find any examples of removeContentStyleSheet. It seams that even if i pass the same URL to addContentStyleSheetFromURL and removeContentStyleSheet it removes all the stylesheets used in the extensions (as if it ignored it's argument and worked like removeContentStyleSheets). It may also be because of the late hour and my broken thinking. :) In any case I would love to hear about a solution other then reapplying all the stylesheets (including the static ones from Info.plist) after every removal.