ClickToPlugin Help


How do I uninstall ClickToPlugin?

Open Safari’s preferences from the Safari menu in the menu bar; click on the Extensions tab, then click on ClickToPlugin in the left column; finally, click the Uninstall button in the right-hand pane.

How do I access ClickToPlugin’s preferences?

There are three ways to access ClickToPlugin’s preference pane:

Starting with Safari 7, the last two methods only work on web pages whose security policy allows the loading of iframes.

Should I use ClickToPlugin and/or ClickToFlash?

You should not use both, and there is no reason to use ClickToFlash instead of ClickToPlugin. No matter what your intended usage is, ClickToFlash will not be more efficient than ClickToPlugin. ClickToFlash only exists for historical reasons.

Does the replacement of plug-ins by HTML5 require these plug-ins to be installed?

No. However, websites can check if your browser supports a given plug-in, and change the page accordingly. For example, Facebook does not insert the Flash player into the page unless Flash is enabled, so there’s nothing for ClickToPlugin to replace.

Can I use wild cards in the whitelists?

All whitelist-like text fields in the preferences support regular expressions. For a string to be considered as a regular expression, it must be preceded by the @ symbol. These regular expressions must follow the Javascript syntax (in particular, lookbehinds are not supported). Invalid regular expressions are ignored.

Can you move the extension’s preferences back to the dedicated area in Safari’s preferences?

Not until all of the following are possible within that dedicated area: language localization; displaying the list of installed plug-ins; customizable keyboard shortcuts; multiline text areas.

Can you add HTML5 replacements for …?

I will not add killers to the extension from now on. Extra killers and instructions to make new ones can be found here.

Why would I want to allow invisible plug-ins?

“Invisible plug-ins” refer to plug-in objects so small that they are difficult to see or click. Sometimes such objects provide important functionality for a web page, so allowing them automatically may be convenient. However, for security and privacy reasons, automatically allowing invisible plug-ins on arbitrary pages is not recommended: they are often used to spy on your browsing habits and can store cookies that bypass any of the browser’s privacy settings. Moreover, it is possible for a plug-in object to be small at first but grow once it is loaded.

Why does ClickToPlugin slow down the SunSpider Javascript benchmark?

This is a bug in Safari which affects all extensions that use messaging from the global page to content scripts. It does not indicate that there is something wrong with these extensions, nor that they have a negative effect on Safari’s performance in real-life usage.

In the case of ClickToPlugin, removing the unique listener to message events from the content scripts (which is not needed for ClickToPlugin’s core functionality) results in a SunSpider benchmark which is identical to that obtained with no extensions.

What’s up with YouTube in Safari 8+?

Starting from Safari 8, YouTube is completely Flash-free. As a result, ClickToPlugin should have no effect on YouTube. Nevertheless, by popular request, the YouTube killer in ClickToPlugin includes a hack that forces YouTube to offer the old Flash player. This has the following consequences:

Why is the performance of YouTube’s own HTML5 player in Safari < 6 significantly worse than ClickToPlugin’s or even than Flash?

Because you have Perian installed and YouTube’s HTML5 player uses the WebM version of the video instead of the H.264 version when possible. YouTube does not provide a way to choose the H.264 version, but this can be done using a custom script such as this one or by upgrading to Safari 6 which hides WebM playback capability on YouTube.

Can I change the default style of the placeholders?

Yes, you can override any extension’s styles in your user stylesheet (selected in Safari’s Advanced preferences). You only have to make sure that your selectors have higher specificity than those in ClickToPlugin’s stylesheet.

Can you add more playback controls for AirPlay?

No. The ability to stop playback on an AirPlay device is provided by the Media Center extension. Finer control is not possible from Safari.

Is it possible to send a whole playlist via AirPlay?

No, this is not possible for technical reasons. To view a whole playlist on an AirPlay device, each track must be sent separately.

What license is your code under?

All my code on GitHub is under the WTFPL license.

Can you make a Chrome or Firefox version of ClickToPlugin?


Solutions to common issues

“This web page does not work with ClickToPlugin enabled, but does when ClickToPlugin is disabled. Surely there is a bug in ClickToPlugin!”

More likely the web page’s functionality relies on a hidden or very small plug-in object which ClickToPlugin blocks. In many cases the “Load All Plug-ins” command is enough to restore the web page to a working state. A permanent solution for all cases is the following. Select the “Block plug-ins manually” checkbox in the preferences and reload the page. For every plug-in object on the page, a dialog will appear: click OK to block the object and Cancel to load it. Use this to find out which objects must be loaded for the page to work, and match their sources (given in the dialogs) using the source whitelist.

“Flash is not blocked on YouTube anymore!”

This never has and will never happen. What happens is that YouTube now has its own HTML5 player which looks very similar to its Flash player. The HTML5 player is used instead of the Flash player if you are enrolled in YouTube’s HTML5 trial.

“No matter how I tweak the setting, I cannot prevent this video from autoplaying!”

This video is probably an HTML5 video and not a plug-in. Such videos cannot be blocked with ClickToPlugin.

“The option to view videos in QuickTime Player does not work!”

There are two known causes:

“This video cannot be downloaded / viewed in QuickTime Player / viewed on my AirPlay device!”

This can happen for a variety of reasons over which ClickToPlugin has no control. For example, the server can refuse to respond to requests made from Safari’s downloader or from an Apple TV, and there are video formats that can be played in Safari but not in QuickTime Player or on a given AirPlay device.

“I whitelisted a page but some plug-ins are still being blocked!”

This is because a single tab can contain documents whose URLs are different than the URL displayed in the Address Field. To find out the URL of the document containing a blocked object, select the “Block plug-ins manually” checkbox in the preferences, right-click the object’s placeholder, and choose “Get Plug-in Info”.

“I’ve read this whole page carefully but I still have a problem!”

Uninstall and reinstall the extension (this will reset the extension’s settings). If that doesn’t fix your problem, then you can contact me and I’ll be happy to help.

Known bugs

See the list of open issues on GitHub.

Safari bugs

This is a list of known bugs in the latest release of Safari or in the WebKit nightly builds that affect parts of the extension.

Report Description
#44023 The Java plug-in cannot be blocked when embedded via an <applet> element.
#74451 The presence of any beforeload event listener can break scripts that rely on an image’s load event.
rdar://9950247 Listening to message events on safari.self slows down the SunSpider Javascript benchmark significantly.
#23364 Subpixel antialiasing is disabled in hardware accelerated layers. As soon as a media element starts playing, the text in its controls, in ClickToPlugin’s source selector, and in ClickToPlugin’s preference window will be affected.