C0NPAQ / Youtube Channel Playlist

// ==UserScript==
// @name        Youtube Channel Playlist
// @description Script loads all the channels videos as current playlist, each time you view a video without a playlist - ATTENTION 05/2018 : It is fixed now!
// @namespace   youtubehaaaaxxXxXxx0rz
// @include       http*://*youtube.*/*
// @run-at      document-start
// @license MIT
// @author C0NPAQ
// ==/UserScript==

if ( /v=/.test(window.location.search) && ! /&list=/.test(window.location.search)) {

    window.location.replace( 
		  window.location.protocol + "//"
                + window.location.host
                + window.location.pathname
                + window.location.search
		+ "&feature=BFa&list=ULKwm-CtgFTb8&lf=mfu_in_order"
                + window.location.hash
		);
}


// SHIT SHAVER CODE
// or else, script will only load if you press F5 each time!

function fuckthatshit(a) 
{
        a.classList.remove('yt-uix-redirect-link');
        a.classList.remove('spf-link');
        a.removeAttribute('data-sessionlink');
        a.removeAttribute('rel');
        a.removeAttribute('data-visibility-tracking');
        a.removeAttribute('aria-hidden');
        old = a.href;
        if (a.title==old) a.title=a.href;
}
      
    new MutationObserver(function(_,self) {
        console.time('clean');
        for (let link of document.links) {
            if (!link.classList.contains('cleaned')) {
                fuckthatshit(link);
                link.classList.add('cleaned');
            }
        }
        console.timeEnd('clean');
    }).observe(document, {childList:true, subtree:true});