您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Adds a download button to YouTube videos which allows you to download the MP3 of the video with MediaHuman YouTube to MP3
当前为
// ==UserScript== // @name YouTube to MP3 Downloader Button // @description Adds a download button to YouTube videos which allows you to download the MP3 of the video with MediaHuman YouTube to MP3 // @author FaySmash // @include http*://*.youtube.com/* // @include http*://youtube.com/* // @include http*://*.youtu.be/* // @include http*://youtu.be/* // @run-at document-end // @version 2.0 // @namespace youtube.to.mp3.downloader.button // ==/UserScript== function AddButton() { var subscribeButtonContainer = document.querySelectorAll("yt-button-shape.style-scope.ytd-subscribe-button-renderer"); if (typeof subscribeButtonContainer[0] !== "undefined"){ subscribeButtonContainer[0].style.display = "unset"; } var subscribeButton = document.querySelectorAll("yt-button-shape.style-scope.ytd-subscribe-button-renderer > button"); if (typeof subscribeButton[0] !== "undefined"){ subscribeButton[0].style.width = "200px"; } var downloadButton = document.createElement("button"); if (typeof downloadButton !== "undefined"){ downloadButton.id = "downloadButton" downloadButton.appendChild(document.createTextNode("Download MP3")); downloadButton.style.width = "200px"; downloadButton.style.height = "36px"; downloadButton.style.border = "0"; downloadButton.style.borderRadius = "18px"; downloadButton.style.cursor = "pointer"; downloadButton.style.fontFamily = "inherit"; downloadButton.style.textTransform = "uppercase"; downloadButton.onclick = function() { document.location.href = 'yt2mp3://' + (location.href); } } var targetElement = document.querySelectorAll("yt-button-shape.style-scope.ytd-subscribe-button-renderer"); if (typeof targetElement[0] !== "undefined"){ targetElement[0].appendChild(downloadButton); } } setInterval(function() { if (document.getElementById("count") && document.getElementById("downloadButton") === null) AddButton(); }, 100);