Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Looking at the extensions gallery for Chromium there seems to be a number of flash-blocking extensions available:

alt text

A couple with very similar names even. I've been using ClicktoFlash in Safari and am used to it just flat out working everywhere. Unfortunately after using FlashBlock by Ruzanow for a bit I've noticed it gets a bit "Hinky" at times (blocking the flash by collapsing the div so you can't click to enable it, etc.)

I have a feeling there may be some other extensions/scripts out there not listed above that are better. Ultimately I'd like to find a flash blocker that works as well as ClickToFlash does in Safari.

share|improve this question

6 Answers 6

up vote 5 down vote accepted
+100

Apart from true extensions/add-ons, one could also use Greasemonkey scripts. This normally requires either an add-on or built-in browser support. But for non-HTTPS sites on a Mac one can use GlimmerBlocker to add such script to all browsers in one go:

GlimmerBlocker is implemented as an http proxy, so the stability of Safari [or any browser, Arjan] isn't compromised because it doesn't use any hacks. It is even compatible with all other browsers and other native Mac OS X applications which uses http, e.g. NetNewsWire.

You'll always be able to upgrade Safari [or any browser] without breaking GlimmerBlocker (or waiting for a new release); and you'll be able to upgrade GlimmerBlocker without upgrading Safari [or any browser]. This makes it much easier to use the beta versions [..].

Apart from simply blocking references to .swf, one could also use its Transform option to rewrite the HTML. But the easiest solution is the GlimmerBlocker feature to add any JavaScript to any page:

  • Add a new Rule (optionally, first add a new Filter to store the Rule)
  • Set "Rule Type" to "Whitelist URL, optionally modifying content"
  • On the "javascript" pane add the source of, for example, the AdBlock Greasemonkey script by Alexey Ruzanov.

I have not used Alexey Ruzanov's real add-on, but in his Greasemonkey script pressing Option-F toggles whitelisting of the current website. To temporarily enable some specific Flash, click the Flash icon that is shown for blocked content. Right-click (or Ctrl-click) that icon for more options, including copying the Flash URL. Unfortunately, whether or not a site is whitelisted is remembered using either DOM Storage or cookies, and both are browser-specific. So, enabling Flash in one browser does not enable it in another.

And of course, as a bonus one gets GlimmerBlocker's ad blocking, for plain HTTP sites.

However, beware:

  • FlashBlock uses HTML local storage, and hence might leave a trail on your local harddisk for each site you visit, regardless if it uses Flash and even in private browsing modes.

  • This cannot be used to filter secure HTTPS pages. The proxy cannot peek into the content, let alone change it. Even more, GlimmerBlocker cannot block on IP address either: the value for "Host" is really the value of the Host header, which it cannot see in HTTPS traffic. That aside, blocking on IP address is easier done in a hosts file.

  • Even when viewing a plain HTTP page, then references to HTTPS resources cannot be blocked either. Like to stop HTTP websites from telling Google and Facebook what you're viewing, blocking <iframe src="https://plusone.google.com/..."> really needs you to change the HTML of the page that you're viewing. Browser add-ons do a much better job there, and are probably also updated when domains change. Still, for those who insist to do it in GlimmerBlocker: one could rewrite specific domains to some dummy. On the "transform" pane, set "Only for content-type" to "any text type", and add:

    // Rewrite "plusone.google.com" to "plusone.google.com.blocked", and so on:
    replace(/(plusone\.google\.com)/g, "$1.blocked");
    replace(/(apis\.google\.com)(\/js\/plusone)/g, "$1.blocked$2");
    replace(/(facebook\.com)/g, "$1.blocked");
    replace(/(facebook\.net)/g, "$1.blocked");
    replace(/(fbcdn\.net)/g, "$1.blocked");
    

    This will still fail if some JavaScript writes out the domain names in a way that is not easily recognized by simple text replacement.

Like for Firefox one needs the original add-on, but Opera and Chrome have built-in support. See Wikipedia for more browser details.

share|improve this answer

Based strictly on features:

Flashblock by Josorek

  • Can Block Flash or Silverlight or Both
  • You have an options pane
  • You can add to and remove from your whitelist of sites
  • You can additionally configure settings for the placeholder icon (position, transparency)

Flashblock by Ruzanow

  • Will Block both Flash and Silverlight
  • You can Add a site to the whitelist by visiting the site in question, right clicking on the placeholder icon and choosing to disable Flashblock for this site. (there does not seem to be a way to undue this, or further manage the whitelist.

Kill Flash

  • Some sites are whitelisted by default including YouTube and Gmail (there seems to be no way to add new sites to this whitelist, or remove existing ones.)
share|improve this answer
    
ruzanow's flashblock also gives you a whitelist, if you right click on a flash element. –  yanokwa Jan 2 '10 at 17:28
    
I've extended my answer a bit: GlimmerBlocker fails when using HTTPS. So I guess mine is not the best answer. Feel free to accept your own as the best ;-) –  Arjan Jul 24 '11 at 17:37

i use flashblock by ruzanow and it works well for me.

share|improve this answer

You might use an ad-blocker for Chrome that also blocks flash. One such is:
AdBlock+ Element Hiding Helper (by ruzanow).

However, you could also move to ChromePlus, a Chrome port, which supports real ad-blocking.
This article says:

The add-on(extensions) for Chrome can only hide the ADs but not block them before loading. ChromePlus can block the ADs before loading according to the AdblockPlus rules(the rules with no "##" are for blocking before loading but not hiding). For example, if a flash is blocked according to this kind of AdblockPlus rule, it is not rendered at all, it is blocked when it just received from the network.

EDIT

Another Chrome port that contains a built-in ad-blocker is SRWare's Iron browser.

A beta version for the Mac is available for download. The ad-block function is still not available on this beta version, but is on the way.

share|improve this answer
    
it looks like ChromePlus is windows only –  Bryan Schuetz Jan 7 '10 at 19:30
    
Yes, it does. Sorry about that, as it would have solved the problem. –  harrymc Jan 7 '10 at 20:16
    
See my edit. However, you're a bit too early for the ad-blocker. –  harrymc Jan 7 '10 at 20:46

Here's another one that has recently come into the scene:

FlashControl

  • Blocks Flash
  • Flash can be re-blocked without reloading the page. Can also disable rendering by changing the visibility state
  • Options pane
  • Whitelist and blacklist management
  • Filters can use regular expressions and the asterisk wildcard
  • Configuration settings include placeholder color and transparency

Some of these features aren't available in Flashblock by Josorek, but it definitely does a good job of blocking flash.

FlashBlock by Ruzanow stores its whitelist in an HTML cookie, so you'll lose it after the browser's cookies are deleted. There's no way of managing this data, so any sites that you've whitelisted will remain in that state; since there's no way of undoing any modifications, we are faced with a dilemma: delete the cookie or use a second blocker to block flash on sites that FlashBlock has whitelisted.

I recommend FlashBlock by Josorek.

share|improve this answer

This is actually now built into Chrome now. It's an experimental feature, but it works great.

Here's a "How To" article on the subject: http://www.howtogeek.com/58058/how-to-enable-flashblock-in-chrome-and-make-it-5000-more-secure/

share|improve this answer
    
Welcome to Super User! It would be nice to include the essential parts of the answer here, and provide the link only for future reference. –  slhck Aug 14 '11 at 17:43
    
My Chrome Version 20.0.1132.47 for Mac doesn't have thi soption in about:flags –  Anon Guy Jul 2 '12 at 8:23

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.