This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Instagram video controls | |
| (function () { | |
| const videos = document.getElementsByTagName('video'); | |
| for (let i = 0; i < videos.length; ++i) { | |
| const video = videos[i]; | |
| video.setAttribute('controls', ''); | |
| } | |
| const videoPlayerDivs = document.querySelectorAll('div[aria-label="Video player"]'); | |
| for (let i = 0; i < videoPlayerDivs.length; ++i) { | |
| const videoPlayerDiv = videoPlayerDivs[i]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| blobDownload = function(url, fileName) { | |
| var a = document.createElement('a'); | |
| a.style = 'display: none'; | |
| a.href = url; | |
| a.download = fileName; | |
| document.body.appendChild(a); | |
| a.click(); | |
| }; | |
| // RAI Play example |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| table.wikitable thead>tr>th[role~=columnheader] { | |
| position: sticky; | |
| top: 0px; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| videoRangeLoop = function(video, fromTime, toTime, playbackRate) { | |
| video.ontimeupdate = function() { | |
| (video.currentTime >= toTime) && (video.currentTime = fromTime); | |
| }; | |
| playbackRate && (video.playbackRate = playbackRate); | |
| video.currentTime = fromTime; | |
| video.play(); | |
| } | |
| // Youtube example |