Board Thread:Support Requests - Designing Your Wikia/@comment-28776531-20151125154716

How do I add this to Chat.js on my wiki? It makes a YouTube video show up when a link to one is entered in the chat. I also can't find anything that enables me to edit like that rectangular box that says "Custom JavaScript status". Does anyone know how to enable that? The code is below if anyone knows what I'm talking about.

// /** * Replace YouTube video or playlist URL with YouTube video or playlist * Copyright © 2012, User:AnimatedCartoons */ setInterval(function {    "use strict";    var $video1 = $('.Chat .message a[href*="www.youtube.com/watch?v="]').text,        video2 = $video1.replace('www.youtube.com/watch?v=', 'www.youtube-nocookie.com/embed/'),        video3,        $playlist1 = $('.Chat .message a[href*="www.youtube.com/playlist?list="]').text,        playlist2 = $playlist1.replace('www.youtube.com', 'www.youtube-nocookie.com/embed'),        playlist3;    if (video2.indexOf('http://') === 0) {        video3 = video2.slice(7);    } else if (video2.indexOf('https://') === 0) {        video3 = video2.slice(8);    } else if (playlist2.indexOf('http://') === 0) {        playlist3 = playlist2.slice(7);    } else if (playlist2.indexOf('https://') === 0) {        playlist3 = playlist2.slice(8);    }    $('.Chat .message a[href*="www.youtube.com/watch?v="]').replaceWith(' '); $('.Chat .message a[href*="www.youtube.com/playlist?list="]').replaceWith(' '); }, 1); //  