Or calling the macro only manually, only when needed, not automatically after every page load ($OnLoad). The catch is that would of course require again a shortcut/menu/button, but if you don't mind that it's another possibility. In that case the toggle could be included.
Hmmm ... I might try that later. It might also be necessary for the macro to force a reload of the YouTube page if it hasn't been invoked before loading the page.
No, the page doesn't need to be reloaded. I commented out the $OnLoad statement in the original macro with #. Then I wrote a brand-new macro called YTdownload, which looks like this:
setpref(BOOL, "media.autoplay.enabled", false);
setpref(BOOL, "media.fragmented-mp4.enabled", false);
setpref(BOOL, "media.ogg.enabled", false);
setpref(BOOL, "media.wave.enabled", false);
setpref(BOOL, "media.webm.enabled", false);
setpref(BOOL, "media.windows-media-foundation.enabled", false);
setpref(BOOL, "media.windows-media-foundation.play-stand-alone", false);
setpref(BOOL, "media.windows-media-foundation.use-dxva", false);
statusbar("HTML5 enabled: ".$_x);
It first disables HTML5, then invokes the download macro. It only requires a single shortcut (I assigned ALT Y). It's not really more convenient, because in my original approach, where the script was allowed to be invoked automatically ($OnLoad), only a single shortcut was required for toggling HTML5. In fact, my second approach would leave HTML5 disabled after the download, so I'd still have to toggle it back on later.
Using KM 75.0 on Windows 7 (x86)
My personal Website. No ads, no scripts, no cookies -- no kidding!
Edited 2 time(s). Last edit at 08/12/2017 02:49AM by foliator.