Last active
July 11, 2016 07:51
-
-
Save jsveron23/8909576 to your computer and use it in GitHub Desktop.
Bookmarklet to add tweet with start time when you watching Youtube
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
javascript:(function(){var u=location.href;p=document.getElementById('movie_player');var ct=p.getCurrentTime();var m=Math.floor(ct/60);var s=ct-m*60;s=s<9?0+''+s:s;s=Math.floor(s);var rt=m+'m'+s+'s';var nu=u+'&t='+rt;window.open('http://twitter.com/share?text'+encodeURIComponent('Watch this! - '+document.getElementsByTagName('title')[0].innerHTML)+'&url='+encodeURIComponent(nu)+'&hashtags=thisisit')})(); | |
/* | |
* If you wanna add tweet something to Twitter in Youtube, then use this. I just made for fun... | |
* If you just found something funny when watch youtube video in the moment, then use it. | |
* This url gonna make direct youtube url with start time by parameter. | |
* If press url from your tweet which is you have mentioned, then he/she will watch exactly on the time you have watched... | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment