BlockFlash2

By varanasi Last update Nov 12, 2011 — Installed 62,067 times.

Script Summary: Hides Flash animations until you click on individual [Play Flash] buttons. (v 0.4.) (Update of BlockFlash and BlockFlash-Revisited)



Here it is again! I apologize for deleting this well-used script -- and all the comments! I am genuinely sorry.

This script doesn't completely block Flash elements in a page. Rather it "hides" them and substitutes a "button" that you may "press" to make individual Flash elements visible if you like.

It's simple, quick, and much less sophisticated than FlashBlock. For most folks, this does most of the job they want done most of the time: it stops noxious, moving, distracting flash ads while letting you choose to see useful flash content.

(If this script is not enough for you, give the FlashBlock plugin a try.)

If you have problems, post a note. It's hard to test a script designed to work on everything on the web, so pointing to problem sites and describing the trouble helps a great deal.

I have left it up to users to "exclude" sites. If there's a site on which you always want to see the flash content - youtube, for example - just use the standard Greasemonkey method to exclude the site. To make a short story long, navigate to the site you want to exclude, choose Tools/Greasemonkey/Manage User Scripts..., highlight BlockFlash2 on the left, and click the Add button closest to the bottom on the right. Click OK on the box that pops up. Close the Manage User Scripts window, reload the page, and you should be cool.

simon! reports in the Discussions that BlockFlash2 "works on Epiphany on both Ubuntu 8.10 Intrepid Ibex; Ubuntu 9.04 Jaunty Jackalope; Fedora 11 etc. (in short: Epiphany / GNOME)." He has linked to some discussion about flash blocking and Epiphany. (Thanks, simon!!)

-------------------

To do:
Replace small element handling.
Make loading order consistent regardless of cache etc.
Consider making Flash territory that doesn't collapse match the page background.

Version history:

Revised by v - varanasi
Revised by AP - Andrew Pennebaker (andrew.pennebaker@gmail.com)
Author: JvdO = Jos van den Oever (jos@vandenoever.info)

0.41 - 2011-04-9 - v - fixed name bug per swiney's suggestion (duh!) and improved stop/start per d0uub
0.4 - 2009-03-27 - v - improved [Play Flash] operation and removed the ability to ignore some flash elements.
0.31 - 2008-03-24 - v - improved [Play Flash] operation, added preference and default not to tag 1 pixel flash elements
0.3 - 2007-10-07 - v - eliminated anonymous function, condensed code
0.2 - 2007-10-06 - v - substituted xpath function for getElement and forEach in place of for loop
0.1 - 2007-09-26 - v - added code to find flash in embed tags (not just object tags), revised structure, included code by pix to improve on and off.
0.1 - 2007-09-26 - v - added code to find flash in embed tags (not just object tags), revised structure, included code by pix to improve on and off.

BlockFlash_Revisited - 2006-11-28 - AP - http://userscripts.org/scripts/show/6532
BlockFlash - 2006-02-12 - JvdO - http://userscripts.org/scripts/show/3204

Inspiration for this script comes from the removeFlash script and the FlashBlock firefox extension.