Greasy Fork镜像 还支持 简体中文。

YouTube Download

On youtube click the download link to download youtube video.

目前為 2015-04-19 提交的版本,檢視 最新版本

  1. // ==UserScript==
  2. // @name YouTube Download
  3. // @namespace http://your.homepage/
  4. // @version 3.1
  5. // @description On youtube click the download link to download youtube video.
  6. // @author Henry Harris
  7. // @match https://www.youtube.com/*
  8. // @match http://catchvideo.net/*
  9. // @grant none
  10. // @require http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js
  11. // @run-at document-end
  12. // ==/UserScript==
  13.  
  14.  
  15.  
  16.  
  17.  
  18. $(document).ready ( function(){
  19. // -----------------------Runs on YOUTUBE--------------------------------------------------------------
  20. setInterval(function(){
  21. if(window.location.href.indexOf("you") > -1) {
  22. if ($('#watch7-headline').length > 0) {
  23. if ($('#downloadlnk').length > 0) {
  24. } else {
  25. var a = document.createElement('a');
  26. var linkText = document.createTextNode("Download");
  27. a.appendChild(linkText);
  28. a.id = "downloadlnk";
  29. a.title = "Download this video";
  30. a.onclick = function () {
  31. window.open("http://catchvideo.net/?url=" + document.URL)
  32. };
  33. //document.body.appendChild(a);
  34. document.getElementById("watch7-headline").appendChild(a);
  35. document.getElementById("downloadlnk").style.fontSize = "x-large";
  36. var br1 = document.createElement('br');
  37. document.getElementById("watch7-headline").appendChild(br1);
  38. var br2 = document.createElement('br');
  39. document.getElementById("watch7-headline").appendChild(br2);
  40. }
  41. }
  42. }
  43.  
  44. }, 2000);
  45. // --------------------------RUNS ON KEEPVID TO DOWNLOAD VIDEO--------------------------------------------
  46. if(window.location.href.indexOf("catch") > -1) {
  47. /*var iDiv = document.createElement('div');
  48.  
  49. iDiv.id = 'block';
  50. iDiv.className = 'block';
  51. document.getElementsByTagName('body')[0].appendChild(iDiv);
  52. iDiv.height = window.height();
  53. iDiv.width = window.width();
  54. $(iDiv).css({
  55. position: 'fixed',
  56. top: 0,
  57. right: 0,
  58. bottom: 0,
  59. left: 0,
  60. zIndex: 999
  61. });*/
  62.  
  63.  
  64.  
  65. if(!$('#javaUserWarning').is(':visible')) {
  66. setInterval(function(){
  67. if ($(".thumb")[0]){
  68. var els = document.getElementsByClassName('btn green');
  69. var href = els[0].href
  70. window.location = href
  71. setTimeout(function(){
  72. window.close();
  73. }, 2000);
  74. } else {
  75. //alert("test");
  76. }
  77. }, 3000);
  78. //document.getElementById("checkboxDisableJava1").checked = true;
  79.  
  80. } else {
  81. alert("Please check disable java applet and retry.");
  82. }
  83. }
  84. });
  85.  
  86. // -----------------------Runs on YOUTUBE--------------------------------------------------------------
  87. //$(document).keydown(function (e) {
  88. // if (e.keyCode == 113) {
  89. //window.open("http://keepvid.com/?url=" + document.URL)
  90. // var a = document.createElement("a");
  91. //a.href = "http://catchvideo.net/?url=" + document.URL;
  92. //var evt = document.createEvent("MouseEvents");
  93. //evt.initMouseEvent("click", true, true, window, 0, 0, 0, 0, 0, true, false, false, false, 0, null);
  94. //a.dispatchEvent(evt);
  95. //}
  96. //});

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址