Set wmode="transparent" for flash players. Please.
|
|
I ·seriously· need this tweak.
I need to set wmode="transparent" for flash (mostly, YouTube & JW) players.
Even if wmode is already set elsewhere (for example, AFAIK, the trick won't work in the proper youtube video page, because the player does not seem to be in an embed tag, but I think it would be too much to ask you to find a way to also apply wmode="transparent" there. I'd be very happy with the Thanks. Please help me. |
|
|
But what kind of result are you expecting? I see no difference after setting wmode="transparent". |
|
|
Long story short, my Firefox 3 refuses to scroll when mouse is over most Flash players (http://forums.techguy.org/all-other-software/73...). BUT It doesn't happen with wmode="transparent" Flash Players.
I've tried all the textbook troubleshooting options, during last hell of a week and a half: research the problem, try to think it through, reinstall Flash (countless times), check FF safe-mode, FF blank-profile, Portable FF, crosscheck against other browsers, write to 3 support forums, carefully check npswf32.dll registry keys, etcetera, etcetera, etcetera, etcetera, and at the end I came out empty-handed, exhausted and sick of it. Really sick of it. That simple script would be a dirty, tricky, ugly way to patch it, I know, but it would really help me for the time being, until <strike> a magic fairy comes down to my PC and</strike> I manage to find a real solution for that. That's why I'm asking here instead of trying to reverse-engineer YT userscripts and make it myself without bothering anyone: I just can't. I have to ´get it out of my mind. I ·seriously· need this tweak. |
|
|
I've not tested it, but if you just want it after every embeds = document.getElementsByTagName("embed")
for (i = 0; i < embeds.length; i++)
embeds[i].setAttribute("wmode", "transparent")
|
|
|
Thank you, Znerp, but sadly it doesn't seem to work like I expected. I am testing it with http://htmlsandbox.com: I add the script after an embed code, and it works as it should. The wmode is transparent, and I can scroll it with the mouse wheel. But for some reason it clashes with ...But, even on those cases, if I just write Thank you very much anyway. |
|
|
Almost direct copy-paste from another thread: for (var ems = document.embeds, i = 0, em; em = ems[i]; i++) {
em.setAttribute('wmode', 'transparent');
var nx = em.nextSibling, pn = em.parentNode;
pn.removeChild(em);
pn.insertBefore(em, nx);
}Tried it on YT. In my ff2 it only makes sense when embed is focused: until I click the player I can scroll with cursor over it without any wmode set. Sadly this trick doesn't allow keyboard shortcuts to work: I hate having to click outside of flash before ctrl+w`ing the tab. |
|
|
¡FUNCIONA!¡¡¡¡FUNCIONAAA!!!
Oh my God! Oh my God! I'm! I'm! I'm gonna do the Dance of The Ultimate Victory now.
PS: It even works in Youtube.com. Dancing again. |
|
|
Lol. Difference made. |
|
|
I believe this is a very common problem (I have it, Vista, Firefox 3.0.3), and this is the only place I've found anyone claiming to have a solution. At first I couldn't get it to work, probably because I never used Greasemonkey before deciding to try this solution. But I educated myself a bit about script syntax, and I finally got it working. Here's the complete script that seems to work for me, in case any other newbies are trying to install it but (like me a few minutes ago) don't even realize that you have to expand the command into a function:
// ==UserScript==
// @name scroll_flash
// @namespace http://userscripts.org/forums/2/topics/3090#posts-15687
// ==/UserScript==
(function() {
for (var ems = document.embeds, i = 0, em; em = ems[i]; i++) {
em.setAttribute('wmode', 'transparent');
var nx = em.nextSibling, pn = em.parentNode;
pn.removeChild(em);
pn.insertBefore(em, nx);
}
}) ();
|
|
|
// ==UserScript==
// @name Wmode transparent
// @namespace http://userscripts.org/users/23652
// @description Wmode transparent
// @include *
// ==/UserScript==
var i, e, newE, embeds = document.evaluate("//embed",document,null,6,null);
for(i=0; i<embeds.snapshotLength; i++) {
e=embeds.snapshotItem(i);
newE = e.cloneNode(true);
newE.setAttribute('wmode', 'transparent');
e.parentNode.replaceChild(newE, e);
}
|
