ff-youtube-all-html5 icon indicating copy to clipboard operation
ff-youtube-all-html5 copied to clipboard

Support for Youtube SPF

Open look997 opened this issue 9 years ago • 3 comments

Please use this code to support for Youtube SPF

    var MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver;
    var observer = new MutationObserver(function(mutations) {
        if (mutations[0].attributeName === 'class' && mutations[0].target.classList.contains("page-loaded")) {
            // your code
        }
    });

    observer.observe(document.querySelector('body'), {attributes: true} );

look997 avatar May 02 '15 14:05 look997

I just checked the current implementation and it still seems to work fine (except for the quality settings). Do you have any specific problems? Having said that, checking for page-loaded indeed seems much more sensible than the current approach.

klemens avatar May 02 '15 16:05 klemens

Yes. Start videos paused and quality settings.

look997 avatar May 02 '15 16:05 look997

Implementing the former should be no problem, the quality-settings however rely on being run before any of the youtube code has the chance to run, which is why the addon disables spf by default.

klemens avatar May 02 '15 16:05 klemens