Created
October 28, 2019 10:43
-
-
Save ttodua/58945df800e1831efc8c46c6bd805498 to your computer and use it in GitHub Desktop.
This file contains 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: use_DIRECT_COPY=true; function fallbackCopyTextToClipboard(text) { var textArea = document.createElement("textarea"); textArea.value = text; textArea.style.position="fixed"; document.body.appendChild(textArea); textArea.focus(); textArea.select(); try { var successful = document.execCommand("copy"); } catch (err) { promptCopy1(text); } document.body.removeChild(textArea); } function promptCopy1(text){ prompt("url", text); }; (function(){ var yt=document.getElementById("movie_player"); var data=yt.getVideoData(); var text=data["title"] + " " + "https://youtu.be/"+data["video_id"]+"?t="+Math.floor(yt.getCurrentTime()); if (use_DIRECT_COPY) fallbackCopyTextToClipboard(text); else {promptCopy1(text);} })(); void(0); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment