// ==UserScript== // @name CrunchyRoll Theater Mode // @namespace https://bblok.tech // @version 1.0 // @description W I D E V I E W // @author Theblockbuster1 // @icon https://www.crunchyroll.com/favicons/favicon-32x32.png // @require https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js // @match https://www.crunchyroll.com/* // @match https://crunchyroll.com/* // @grant none // @downloadURL none // ==/UserScript== var jq = jQuery.noConflict(); jq(function() { if (!jq('#showmedia_video_player')[0]) return; // only run on a video page // some parts "borrowed" and edited from https://chrome.google.com/webstore/detail/crunchyroll-theater-mode/fccfjcklfpanhmcgbpcmpjhgindhmlbp jq('head').prepend(``); jq('').insertBefore('.showmedia-submenu #sharing_add_queue_button'); jq(`
  • `).prependTo('.header-userpanel > ul'); let parent = jq('#showmedia_video_box').parent(); jq('#toggle-theater').click(function() { if (jq(this).hasClass('not-queued')) { jq(this).removeClass('not-queued').addClass('in-queue'); jq('body').addClass('crunchyroll-theater-mode'); document.documentElement.style.setProperty('--player-height', jq('#showmedia_video_player').css('height')); document.documentElement.style.setProperty('--container-width', jq('#template_container').css('width')); } else { jq(this).removeClass('in-queue').addClass('not-queued'); jq('body').removeClass('crunchyroll-theater-mode'); } }); jq(window).resize(function() { document.documentElement.style.setProperty('--player-height', jq('#showmedia_video_player').css('height')); document.documentElement.style.setProperty('--container-width', jq('#template_container').css('width')); }); });