Omar Omar - 1 year ago 91
Javascript Question

Copy value to clipboard via Javascript command inserted in Address Bar

I'm able to get the current time of a Youtube playing video via inserting this JavaScript command to the address bar:


What I'm looking for is to get this video current time value to clipboard instead of displaying it within an alert box.

I'm using Chrome.

Answer Source

Copying to clipboard is easiest done using a lightweight open-source Javascript library. clipboard.js and clipboard-js both work in my experience.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download