Blocking Flash In Opera

As reported first by Rijk, the easiest way to block Flash selectively in Opera 8 is to use the following User Stylesheet, which replaces Flash animations with clickable buttons so you can choose if you want to see them:

embed[type="application/x-shockwave-flash"] {content:"Flash"; outline: 1px dotted gray; color: #999; background: #333}
embed[type="application/x-shockwave-flash"].zichtbaar {content: normal; outline: none}

body:before {
position: absolute; visibility: hidden;
background-image: url("javascript:window.addEventListener('click', function(){var srcElem=window.event.srcElement;var tag=srcElem.tagName;if(tag=='EMBED') srcElem.className='zichtbaar';}, false)");
content:""}

You can either add this to your normal User CSS, or as a selectable stylesheet, see OperaUserCSS for more details on how to add it.

FlashBlocker? for Opera 9 versions [⊗]

New version 'Flashblock' for Opera 9. More effective blocking of Flash and use good-looking graphic buttons. Text-buttons also included.

Categories:

CategoryOpera
CategoryTechnical

Backlinks:
Comments [Hide comments/form]

not work in opera 9 beta2 / linux.
correct ?

87.236.224.106 (2006-05-24 04:22:38)

correct! that wont work on opera 9.
please update that instruction

81.197.251.210 (2006-06-13 01:56:59)

but it doesnt prevent the flash from pre-loading, does it? it only hides it after it is loaded

213.160.185.150 (2006-07-19 00:06:24)

there is a nice simple way, I added "enable plugins" button, to the view bar (the one with the eyeglasses)

right click view bar -> choose customize -> drag from the pref buttons.
you can disable/enable it this way, only requiring a reload of the page to change.

212.150.112.98 (2006-10-11 01:44:51)

Got this work on OpenBSD? 4.0 w/Opera 9.01. Only extra steps were

1) create "userJS" subdir of the .opera folder.
2) copy FlashBlocker_run.js to /home/<username>/.opera/userJS and set javascript options to look there for "user javascript files"

68.107.104.198 (2007-01-05 11:42:55)

Is there any run userJS along with a whitelist a sites that you want to allow flash for?

68.98.112.136 (2007-04-01 13:06:13)

The download url returns 403 forbidden. =/

84.251.144.131 (2007-04-13 13:40:55)

Followed directions to the letter, including the extra steps which were obviously necessary, mentioned in the comments. DOES NOT WORK AT ALL. Opera 9.20 on Slackware 11.0. And by the way, these instructions have been around for a while - long enough for me to have tried this all the way back into the 8.x days when I was running Mandrake.

Oh, for useful flashblock in opera!

SERIOUSLY! It's the only thing keeping Firefox installed on my system.

69.41.132.90 (2007-04-18 16:34:56)

Or you could use software to block ads...there's a lot of other solutions.

121.144.120.41 (2007-04-21 18:09:52)

".zichtbaar" my ass!

89.123.90.169 (2010-03-22 16:18:19)

As of release 10.50 and higher opera comes with an integrated Flash (or more precisely Plugin) blocker. It is called "On Demand Plugin" and you can change its settings via opera:config OR using available shortcut buttons:
my.opera.com/dude09/blog/on-demand-plugin-opera-turbo

87.105.249.145 (2010-07-01 07:03:40)

Add a comment to this page (use wiki formatting if needed, no HTML/BBCode please). Only registered users can submit links, your comment will be deleted otherwise: