Question

I was sitting here wondering if it's possible to write a greasemonkey script that would detect sites like payperclick and mute the audio so the ad isn't heard.

I realize that I could accomplish the same thing in a better fashion by simply removing the ad text through a greasemonkey script but for purposes of curiousity, I wondered if you can disable the audio through javascript.

Was it helpful?

Solution

The only way I can see this being possible is if:

1)the ad has its own "mute button" which called a javascript function...in which case you could just call that function yourself.

2) The plugin the ad is using for audio has a javascript API (same as 1)

3) IE only: some bizarre IE ActiveX thing that could probably do it...by accessing stuff that it probably shouldn't.

All of these I consider extremely doubtful

Any other possibility would be too low level for javascript to have access to (or at least I seriously hope that is the case). A browser by itself has no volume controls....all multimedia are done by plugins.

OTHER TIPS

Other than completely stripping the <embed> element, it's a no-go; JavaScript simply doesn't have the power to access the volume controls of Flash media... yet. : )

You could try removing the autostart attribute on the embed element or setting it to false.

maybe the aswer, pass by control the browser.... maybe something that generat some incompatility in some browsers but not hack, and only controlling the browser or keyboard by user choice

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top