Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- javascript:(function(){
- var video = document.querySelector('#movie_player > div.html5-video-container > video');
- var time = Math.floor(video.currentTime);
- var h = Math.floor(time / 3600);
- var m = Math.floor((time / 60) % 60);
- var s = time % 60;
- var formattedTime = (h > 0) ? h + ':' + zeroPadding(m) + ':' + zeroPadding(s) : zeroPadding(m) + ':' + zeroPadding(s);
- function zeroPadding(num){return (Array(2).join('0') + num).slice(-2);}
- navigator.clipboard.writeText(formattedTime + ' ');
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement