YouTube Multi Downloader v4.4 (MP3, FHD, AVI, MP4, FLV, WKV, ACC, M4V, etc) - Saveclipbro.com

No ads, this script helps to add a download button. Saveclipbro.com features the fastest ways to download YouTube videos and audios, ensuring quality. Supported Services: YouTube, Dailymotion, Vimeo, Twitter, Vine, Facebook, Instagram, Xvideos, CNN, SoundCloud, Redtube, Freesound, Pornhub, Reddit, Liveleak and more! You will like!

当前为 2019-02-06 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name YouTube Multi Downloader v4.4 (MP3, FHD, AVI, MP4, FLV, WKV, ACC, M4V, etc) - Saveclipbro.com
  3. // @description No ads, this script helps to add a download button. Saveclipbro.com features the fastest ways to download YouTube videos and audios, ensuring quality. Supported Services: YouTube, Dailymotion, Vimeo, Twitter, Vine, Facebook, Instagram, Xvideos, CNN, SoundCloud, Redtube, Freesound, Pornhub, Reddit, Liveleak and more! You will like!
  4. // @namespace https://greasyfork.org/users/152924
  5. // @homepageURL https://greasyfork.org/scripts/34613
  6. // @supportURL https://greasyfork.org/scripts/34613/feedback
  7. // @author Punisher
  8. // @version 4.4
  9. // @date 2019-02-06
  10. // @icon https://i.imgur.com/np7OreN.png
  11. // @compatible chrome
  12. // @compatible firefox
  13. // @compatible opera
  14. // @compatible safari
  15. // @license CC BY-NC-ND 4.0 International. https://creativecommons.org/licenses/by-nc-nd/4.0/
  16. // @match *://*.youtube.com/*
  17. // ==/UserScript==
  18.  
  19. (function() {
  20. if (document.getElementById("polymer-app") || document.getElementById("masthead") || window.Polymer) {
  21. setInterval(function() {
  22. if (window.location.href.indexOf("watch?v=") < 0) {
  23. return false;
  24. }
  25. if (document.getElementById("meta-contents") && document.getElementById("punisher") === null) {
  26. Addytpolymer();
  27. }
  28. }, 100);
  29. setElement = function(url) {
  30. var regExp = /^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#\&\?]*).*/;
  31. var match = String(url).match(regExp);
  32. return (match&&match[7].length==11)? match[7]: false;
  33. };
  34.  
  35. } else {
  36. setInterval(function() {
  37. if (window.location.href.indexOf("watch?v=") < 0) {
  38. return false;
  39. }
  40. if (document.getElementById("watch8-sentiment-actions") && document.getElementById("punisher") === null) {
  41. AddhtmlDV();
  42. }
  43. }, 100);
  44. setElement = function(url) {
  45. var regExp = /^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#\&\?]*).*/;
  46. var match = String(url).match(regExp);
  47. return (match&&match[7].length==11)? match[7]: false;
  48. };
  49. }
  50.  
  51. function AddhtmlDV() {
  52. if (document.getElementById("watch8-sentiment-actions")) {
  53. var wrap = document.getElementById('watch8-sentiment-actions');
  54. var button = "<div id='punisher' style='display: inline-block; margin-left: 10px; vertical-align: middle;'>";
  55. button += "<a href=\"https://www.saveclipbro.com/convert?main_search%5BlinkToDownload%5D=" + encodeURIComponent(document.URL) + '&main_search%5Bsubmit%5D=' + "\" title=\"Download\" target=\"_blank\"" + "style=\"display: inline-block; font-size: inherit; height: inherit; border: 1px solid rgb(112, 112, 112); border-radius: 3px; padding-left: 28px; cursor: pointer; vertical-align: middle; position: relative; line-height: 22px; text-decoration: none; z-index: 1; color: rgb(255, 255, 255);\">";
  56. button += "<i style=\"position: absolute; display: inline-block; left: 6px; top: 3px; background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6Y2M9Imh0dHA6Ly9jcmVhdGl2ZWNvbW1vbnMub3JnL25zIyIgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIiB4bWxuczpzdmc9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2IiB2aWV3Qm94PSIwIDAgMTYgMTYiIGlkPSJzdmcyIiB4bWw6c3BhY2U9InByZXNlcnZlIj48cGF0aCBkPSJNIDQsMCA0LDggMCw4IDgsMTYgMTYsOCAxMiw4IDEyLDAgNCwwIHoiIGZpbGw9IiNmZmZmZmYiIC8+PC9zdmc+); background-size: 12px; background-repeat: no-repeat; background-position: center center; width: 16px; height: 16px;\"></i>";
  57. button += "<span style=\"padding-right: 12px;\">Download</span></a></div>";
  58. var style = "<style>#punisher button: -moz-focus-inner {padding: 0; margin:0} #punisher a {background-color: #3a3a3a} #punisher a:hover {background-color: #3a3a3a} #punisher a:active {background-color: #3a3a3a}</style>";
  59. var tmp = wrap.innerHTML;
  60. wrap.innerHTML = tmp + button + style;
  61. }
  62. }
  63.  
  64. function Addytpolymer() {
  65. var buttonDiv = document.createElement("span");
  66. buttonDiv.id = "punisher";
  67. buttonDiv.style.width = "100%";
  68. buttonDiv.style.marginTop = "5px";
  69. buttonDiv.style.padding = "12px 0";
  70. var addButton = document.createElement("a");
  71. addButton.appendChild(document.createTextNode("DOWNLOAD"));
  72. addButton.style.width = "100%";
  73. addButton.style.cursor = "pointer";
  74. addButton.style.height = "inherit";
  75. addButton.style.backgroundColor = "#3a3a3a";
  76. addButton.style.color = "#ffffff";
  77. addButton.style.padding = "10px 22px";
  78. addButton.style.margin = "0px 0px";
  79. addButton.style.border = "0";
  80. addButton.style.borderRadius = "2px";
  81. addButton.style.fontSize = "1.4rem";
  82. addButton.style.fontFamily = "inherit";
  83. addButton.style.textAlign = "center";
  84. addButton.style.textDecoration = "none";
  85. addButton.href = "https://www.saveclipbro.com/convert?main_search%5BlinkToDownload%5D=" + encodeURIComponent(document.URL) + '&main_search%5Bsubmit%5D=';
  86. addButton.target = "_blank";
  87. buttonDiv.appendChild(addButton);
  88. var targetElement = document.querySelectorAll("[id='subscribe-button']");
  89. if(targetElement){
  90. for(var i = 0; i < targetElement.length; i++){
  91. if(targetElement[i].className.indexOf("ytd-video-secondary-info-renderer") > -1){
  92. targetElement[i].appendChild(buttonDiv);
  93. }
  94. }
  95. }
  96. }
  97. })();