Skip to content

Instantly share code, notes, and snippets.

@jclusso
Created April 21, 2021 23:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jclusso/32a0837440a63a2cdc59a427b987087d to your computer and use it in GitHub Desktop.
Save jclusso/32a0837440a63a2cdc59a427b987087d to your computer and use it in GitHub Desktop.
Safety Serve Auto-Advance
// ==UserScript==
// @name Safety Serve Auto-Advance
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Auto-Advance
// @author You
// @match https://course.safetyserve.com/*
// @grant none
// @require http://code.jquery.com/jquery-3.4.1.min.js
// ==/UserScript==
(function() {
'use strict';
setInterval(function() {
var barFillWidth = $('.progress-bar-fill').innerWidth();
var barWidth = $('.progress-bar-seek').innerWidth();
if(barFillWidth == undefined) {
return;
}
if(barWidth == barFillWidth) {
$('.slide-control-button-next').trigger('click')
}
}, 100);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment