您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
use it in right click menu
// ==UserScript== // @name copy youtube video current time url(in right click menu) // @namespace http://tampermonkey.net/ // @version 0.1 // @description use it in right click menu // @author You // @include https://www.youtube.com/watch?v=* // @include https://www.youtube.com/watch?app=* // @icon https://www.google.com/s2/favicons?sz=64&domain=ik4.es // @run-at context-menu // @license MIT // @grant none // ==/UserScript== (function() { var url= window.location.href; url=url.replace('https://www.youtube.com/watch?v=', 'https://youtu.be/'); var time= document.getElementById("movie_player").getCurrentTime(); time=~~time; let text = url.concat('?t=',time); copyContent(text); })(); async function copyContent(text) { try { await navigator.clipboard.writeText(text); console.log('Content copied to clipboard'); /* Resolved - text copied to clipboard successfully */ } catch (err) { console.error('Failed to copy: ', err); /* Rejected - text failed to copy to the clipboard */ } }
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址