Zybooks Autoplay

October 04, 2019 1 minute

Both these scripts work with tampermonkey.

Autoplay script.

// ==UserScript==
// @name         Zybooks Automator
// @namespace    https://noguera.dev
// @version      1.1
// @description  Autocomplete Zybooks animations at 2x speed and brute-force participation multiple choice.
// @author       Michael Noguera
// @match        https://learn.zybooks.com/zybook/*/chapter/*/section/*
// @require      https://raw.githubusercontent.com/uzairfarooq/arrive/master/minified/arrive.min.js
// ==/UserScript==

(function() {
    'use strict';
    // watch animation thingies
    document.arrive("button.start-button", function(start_button) {
        start_button.click();
    });
    document.arrive("div.play-button.bounce", function(play_button) {
        play_button.click();
    });
    // 2x speed
    document.arrive("input[aria-label='2x speed'][value='false']", function(checkbox) {
        checkbox.click();
    });
    // brute force multiple choice
    document.arrive("input[type='radio']", function(multiple_choice) {
        multiple_choice.click();
    });
})();

Allow print without obnoxious watermarking.

// ==UserScript==
// @name         Zybooks Print Formatter
// @namespace    https://noguera.dev
// @version      1.1
// @description  Removes the watermarks from a Zybooks print export.
// @author       Michael Noguera
// @match        https://learn.zybooks.com/zybook/*/chapter/*/print
// @require      https://raw.githubusercontent.com/uzairfarooq/arrive/master/minified/arrive.min.js
// ==/UserScript==

(function() {
    'use strict';
    document.arrive("div.water-mark-top", {onceOnly: true}, function(watermark) {
        watermark.style.display = "none";
    });
    document.arrive("div.water-mark-bottom", {onceOnly: true}, function(watermark) {
        watermark.style.display = "none";
    });
})();