Bypass YouTube age verification

Bypass YouTube age verification without logging in.

目前为 2015-06-05 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Bypass YouTube age verification
  3. // @name:de Youtube-Altersverifikation umgehen
  4. // @namespace tfr
  5. // @description Bypass YouTube age verification without logging in.
  6. // @description:de Umgehe die Altersverifikation ohne Einloggen.
  7. // @include http://www.youtube.com/watch*
  8. // @include https://www.youtube.com/watch*
  9. // @version 3
  10. // @grant none
  11. // ==/UserScript==
  12.  
  13. /* Version 3: https://greasyfork.org/es/forum/discussion/4509 */
  14. /* Version 2: Error in code, bypass in playlists was not working */
  15.  
  16. /* This script is licensed under CC0 / Dieses Skript steht unter CC0:
  17. * http://creativecommons.org/publicdomain/zero/1.0/deed.de
  18. * http://creativecommons.org/publicdomain/zero/1.0/deed.en */
  19.  
  20. if(window.document.getElementById("watch7-player-age-gate-content"))
  21. {
  22. var videoid = window.location.search.substr(window.location.search.indexOf("v=") + 2);
  23. if(videoid.indexOf("&") > 1)
  24. {
  25. videoid = videoid.substr(0, videoid.indexOf("&"));
  26. }
  27. videoid = decodeURIComponent(videoid);
  28. window.document.getElementById("player-api").remove();
  29. var playerparent = window.document.getElementById("player-unavailable");
  30. var playerframe = window.document.createElement("iframe");
  31. playerframe.setAttribute("src", "//www.youtube.com/embed/" + videoid + "?autoplay=1&showinfo=0");
  32. playerframe.setAttribute("id", "player-frame");
  33. playerframe.setAttribute("style", "position:absolute; z-index:99999; width:100%; height:100%;");
  34. playerparent.appendChild(playerframe);
  35. }