Bluestream accessibility fix

Switch off Bluestream animations to help disabled users

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

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

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

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.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==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);
    }

})();