-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathff_for_BBB.js
More file actions
29 lines (25 loc) · 919 Bytes
/
ff_for_BBB.js
File metadata and controls
29 lines (25 loc) · 919 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// ==UserScript==
// @name FastForward BBB AAU
// @version 0.1
// @description Fast Foward Button for big blue button installation of university klagenfurt
// @author Karim Krell
// @match https://bbb.aau.at/playback/presentation/2.0/playback.html*
// @grant none
// ==/UserScript==
window.setTimeout(()=>{
$('<button class="button" style="background-image: url(https://pics.freeicons.io/uploads/icons/png/19603807591586787983-512.png);filter: invert(100%);" id="forward">Faster</button><span style="color:white" id="speedval">1x</span>').insertAfter("[class='acorn-timer']")
console.log('losgehts')
$('#forward').on("click",
function(){
let speed =parseFloat($('#video').attr('speed'))
if(isNaN(speed)) {
speed=1.25
} else {
speed+0.25>2?speed=1:speed+=0.25
}
$('#video').attr('speed',speed)
$('#video')[0].playbackRate = speed
$('#speedval').text(speed+'x')
}
)
}, 2000)