Skip to content

Commit

Permalink
remove debug info
Browse files Browse the repository at this point in the history
  • Loading branch information
nunsez committed Sep 26, 2024
1 parent ad07961 commit 8518b26
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
4 changes: 2 additions & 2 deletions dist/bookmarklet-video-speed.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 1 addition & 9 deletions main.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @file A script to control the speed of html5 video playback in the browser.
* @author Alexander Mandrikov <mad.nunsez@gmail.com>
* @version 2.1.1
* @version 2.1.2
* @license AGPLv3
* @see {@link https://github.com/nunsez/bookmarklet-video-speed GitHub} for further information.
*/
Expand Down Expand Up @@ -101,8 +101,6 @@ class State {
}

refresh(_mutationRecords: MutationRecord[]) {
console.log("_mutationRecords", _mutationRecords);
console.log("refresh", this.searchTimeoutId, this.controller);
clearTimeout(this.searchTimeoutId);

this.searchTimeoutId = setTimeout(() => {
Expand All @@ -112,17 +110,13 @@ class State {
}

terminate() {
console.log("terminate observer", this.observer);
console.log("terminate oldController", this.controller);
console.log("terminate searchTimeoutId", this.searchTimeoutId);
clearTimeout(this.searchTimeoutId);
this.observer.disconnect();
this.controller.el.remove();
this.videos.forEach((v) => v.playbackRate = DEFAULT_SPEED / 100);
}

setSpeed(newSpeed: number) {
if (!this.controller) return;
if (Number.isNaN(newSpeed)) return;

// The 0.05x playback rate is not in the supported playback range
Expand All @@ -142,8 +136,6 @@ class State {
this.controller.range.value = speedString;
this.videos.forEach((v) => v.playbackRate = this.speed / 100);

console.log("set speed", this.videos, this.controller);

localStorage.setItem(STORAGE_ID, speedString);
}
}
Expand Down

0 comments on commit 8518b26

Please sign in to comment.