Bluestream accessibility fix

Switch off Bluestream animations to help disabled users

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         Bluestream accessibility fix
// @namespace    http://www.disabilityrightsuk.org
// @version      1.5
// @description  Switch off Bluestream animations to help disabled users
// @author       Dr S
// @include      https://*.bluestreamacademy.com/*
// @include      http://*.bluestreamacademy.com/*
// @run-at document-end
// @grant none

// ==/UserScript==

(function() {

    if (typeof window.doreveal != "undefined") {

        var s = window.doreveal.toString(); // save doreveal function's javascript code to a string

        // Make cunning modifications
        s = s.replace(new RegExp("duration:[ ]?[0-9]+(\.[0-9]+)?,[ ]?delay:[ ]?[0-9]+(\.[0-9]+)?","g"),"duration:0.1, delay:0.1");
        s = s.replace(new RegExp("duration:[ ]?[0-9]+(\.[0-9]+)?","g"), "duration:0.1"); // regular expression , g=find all
        s = s.replace(new RegExp("delay:[ ]?[0-9]+(\.[0-9]+)?","g"), "delay:0.1");
        s = s.replace(new RegExp("setTimeout\(\"[ ]?showNext\(\)\"[ ]?,[ ]?[0-9]+[ ]?\)","g"),"setTimeout(\"showNext()\",500)");

        s = s + " setTimeout(\"showNext()\",500); ";

        // Run the doctored function!
        window.eval("document.getElementById(\"buttonNext\").style.visibility = \"visible\";");
        window.eval(s);
    }

})();