Legacy Video Quality on Crunchyroll

Forces the legacy video quality settings for the video stream on crunchyroll

// ==UserScript==
// @name         Legacy Video Quality on Crunchyroll
// @namespace    http://tampermonkey.net/
// @version      2025-08-20(hotfix)
// @description  Forces the legacy video quality settings for the video stream on crunchyroll
// @author       Some random dude from reddit
// @match        *static.crunchyroll.com/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=crunchyroll.com
// @grant        GM_getValue
// @grant        GM_setValue
// @run-at document-start
// @license MIT
// ==/UserScript==

function doStuff() {
    let configDelta;
    configDelta = localStorage.getItem('Vilos:ConfigDelta');

    console.log(configDelta);
    if(!configDelta) setTimeout(function() { doStuff(); }, 200);
    else {
        if(configDelta.qualitySettings) configDelta.qualitySettings.enabled = false;
        else configDelta = JSON.parse('{"ads":{"adSystem":"GoogleAdManager","adTech":"CSAI","minimumDurationThreshold":420,"truex":true},"playbackSpeed":{"enabled":true},"qualitySettings":{"enabled":false}}');
        localStorage.setItem('Vilos:ConfigDelta', JSON.stringify(configDelta));
    }
}

doStuff();