mirror of
https://github.com/SoPat712/Speeder.git
synced 2026-10-08 19:05:02 -04:00
fix double controller on Coursera
This commit is contained in:
1 parent
9f4bfaa510
commit
7e0ca9c97c
1 file changed
+9
-1
@@ -218,7 +218,15 @@ chrome.extension.sendMessage({}, function(response) {
|
||||
function checkForVideo(node, parent, added) {
|
||||
if (node.nodeName === 'VIDEO') {
|
||||
if (added) {
|
||||
if (!node.classList.contains('vsc-initialized')) {
|
||||
if (!node.classList.contains('vsc-initialized') && !node.dataset['vscid']) {
|
||||
new tc.videoController(node, parent);
|
||||
}
|
||||
// if the video has already been initialized, then it has been mutated
|
||||
// we may need to update the controller location to reflect this
|
||||
else {
|
||||
let id = node.dataset['vscid'];
|
||||
let ctrl = document.querySelector(`div[data-vscid="${id}"]`);
|
||||
if (ctrl) ctrl.remove();
|
||||
new tc.videoController(node, parent);
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user