A
A
Alexander Taratin2015-08-15 03:22:51
YouTube
Alexander Taratin, 2015-08-15 03:22:51

How is copying a link to the clipboard implemented in the new youtube player?

How is copying a link to the clipboard implemented in the new youtube player? It seems that no swf is loaded and no embed/object tags are created, or am I looking badly?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Stanislav, 2015-08-15
@Taraflex

Through execcommand, does not work in FF yet.

<!DOCTYPE html>
<html>
  <head>
  </head>
  <body>
    <p> select some text and press button

    <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
    <button onclick="document.execCommand('copy');">copy me!</button>
  </body>
</html>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question