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
// make bookmarklet with https://promincproductions.com/devtools/bookmarklet-generator/ | |
function clipVideo () { | |
const title = ytplayer.config.args.title; | |
const person = ytplayer.config.args.author; | |
const url = "https://www.youtube.com/watch?v=" + ytplayer.config.args.video_id; | |
const text = `- 🎥️\nTitle:: ${title}\nChannel:: ${person}\n\t- Embed\n{{video ${url}}}\n\t- Notes`; | |
const type = "text/plain"; | |
const data = [new ClipboardItem({ [type]: text })]; | |
navigator.clipboard.write(data).then(() => { |