Skip to content

Instantly share code, notes, and snippets.

@yazinsai
Last active July 23, 2020 10:04
Show Gist options
  • Select an option

  • Save yazinsai/65144a42ce387de26eed14d1b662122a to your computer and use it in GitHub Desktop.

Select an option

Save yazinsai/65144a42ce387de26eed14d1b662122a to your computer and use it in GitHub Desktop.

Revisions

  1. yazinsai revised this gist Jul 23, 2020. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions speedUpVideos.js
    Original file line number Diff line number Diff line change
    @@ -4,4 +4,5 @@ const speedUp = (v) => v.playbackRate = 2;
    const videos = elemsIn('video', document);
    const iframes = elemsIn('iframe', document);

    videos.forEach(speedUp);
    iframes.forEach((f) => elemsIn('video', f.contentWindow.document).forEach(speedUp));
  2. yazinsai created this gist Jul 23, 2020.
    7 changes: 7 additions & 0 deletions speedUpVideos.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    const elemsIn = (tag, parent) => Array.from(parent.getElementsByTagName(tag));
    const speedUp = (v) => v.playbackRate = 2;

    const videos = elemsIn('video', document);
    const iframes = elemsIn('iframe', document);

    iframes.forEach((f) => elemsIn('video', f.contentWindow.document).forEach(speedUp));