您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
在YouTube页面添加下载按钮,点击后跳转到youtubepp.com
// ==UserScript== // @name 一键下载youtube 1080P高清视频 // @namespace http://tampermonkey.net/ // @version 1.1 // @description 在YouTube页面添加下载按钮,点击后跳转到youtubepp.com // @author Cantan Tam // @match https://www.youtube.com/* // @grant GM_addStyle // @license MIT // ==/UserScript== (function() { 'use strict'; GM_addStyle(` .download-button { display: inline-block; margin: 4px 6px; padding: 12px 16px; border-radius: 20px; background-color: #f2f2f2ff; color: #000; font-size: 14px; line-height: 1; cursor: pointer; transition: background-color 0.3s; } .download-button:hover { background-color: #ffb380ff; } `); function createDownloadButton() { var subscribeButton = document.querySelector("#subscribe-button"), downloadButton = document.createElement("a"); downloadButton.innerHTML = "Download"; downloadButton.classList.add("yt-uix-button", "yt-uix-button-subscribe-branded", "yt-uix-button-size-default", "download-button"); downloadButton.addEventListener("click", function() { var currentUrl = window.location.href, newUrl = currentUrl.replace("www.youtube.com/watch?v=", "tomp3.cc/youtube-downloader/"); window.open(newUrl, "_blank"); }); if (subscribeButton) { subscribeButton.parentNode.insertBefore(downloadButton, subscribeButton.nextSibling); } } // 等待页面加载完成后创建下载按钮 window.addEventListener("load", createDownloadButton); })();