Bypass YouTube age verification

Bypass YouTube age verification without logging in.

目前為 2015-08-16 提交的版本,檢視 最新版本

  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. // @license https://creativecommons.org/publicdomain/zero/1.0/
  8. // @compatible firefox
  9. // @compatible chrome
  10. // @oujs:author tfr
  11. // @include http://www.youtube.com/watch*
  12. // @include https://www.youtube.com/watch*
  13. // @version 5
  14. // @grant none
  15. // ==/UserScript==
  16.  
  17. /* Version 5: Update metadata block */
  18. /* Version 4: Correct string search index from 1 to -1 */
  19. /* Version 3: https://greasyfork.org/es/forum/discussion/4509 */
  20. /* Version 2: Error in code, bypass in playlists was not working */
  21.  
  22. /* This script is licensed under CC0 / Dieses Skript steht unter CC0:
  23. * http://creativecommons.org/publicdomain/zero/1.0/deed.de
  24. * http://creativecommons.org/publicdomain/zero/1.0/deed.en */
  25.  
  26. if(window.document.getElementById("watch7-player-age-gate-content"))
  27. {
  28. var videoid = window.location.search.substr(window.location.search.indexOf("v=") + 2);
  29. if(videoid.indexOf("&") > -1)
  30. {
  31. videoid = videoid.substr(0, videoid.indexOf("&"));
  32. }
  33. videoid = decodeURIComponent(videoid);
  34. window.document.getElementById("player-api").remove();
  35. var playerparent = window.document.getElementById("player-unavailable");
  36. var playerframe = window.document.createElement("iframe");
  37. playerframe.setAttribute("src", "//www.youtube.com/embed/" + videoid + "?autoplay=1&showinfo=0");
  38. playerframe.setAttribute("id", "player-frame");
  39. playerframe.setAttribute("style", "position:absolute; z-index:99999; width:100%; height:100%;");
  40. playerparent.appendChild(playerframe);
  41. }